mumpsFabric.hh

Go to the documentation of this file.
1 
6 #ifndef mumpsfabric_hh
7 #define mumpsfabric_hh
8 
9 #include "mumps.hh"
10 #include "solverFabric.hh"
11 #include "sparseMatrix.hh"
12 #include "CRS.hh"
13 
14 namespace concepts {
15 
16  // *********************************************************** MumpsFabric **
17 
21  template<class F = Real>
22  class MumpsFabric : public SolverFabric<F> {
23  public:
25  virtual Operator<F>* operator()() {return new Operator<F>(1,1);};
26  virtual Mumps<F>* operator()(Operator<F>& matrix) {
27  if (dynamic_cast<concepts::CRSConvertable<F>*>(&matrix))
28  return new Mumps<F>(matrix);
29  else {
30  concepts::SparseMatrix<F> tmpMatrix(matrix);
31  return new Mumps<F>(tmpMatrix);
32  }
33  }
34  protected:
35  virtual std::ostream& info(std::ostream& os) const {
36  return os << concepts::typeOf(*this)<<"()";
37  }
38  };
39 
40 } // concepts
41 
42 #endif // mumpsfabric_hh
Fabric class for Mumps.
Definition: mumpsFabric.hh:22
virtual Mumps< F > * operator()(Operator< F > &matrix)
Definition: mumpsFabric.hh:26
virtual Operator< F > * operator()()
Unused, avoids the "No return statement in function returning non-void [-Wreturn-type]" warning.
Definition: mumpsFabric.hh:25
Abstract fabric class for linear solvers.
Definition: jdbsym.hh:16
virtual std::ostream & info(std::ostream &os) const
Definition: mumpsFabric.hh:35
Abstract class for an operator.
Definition: ARPACK.hh:16
Base class for operators which can be converted to Sparse Row Storage (CRS) or Sparse Column Storage ...
Definition: CRS.hh:30
MUMPS : MUltifrontal Massively Parallel sparse direct Solver.
Definition: mumps.hh:72
std::string typeOf(const T &t)
Return the typeid name of a class object.
Definition: output.hh:43
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich