superLUfabric.hh

Go to the documentation of this file.
1 
6 #ifndef superLUfabric_hh
7 #define superLUfabric_hh
8 
9 #include "superLU.hh"
10 #include "solverFabric.hh"
11 #include "sparseMatrix.hh"
12 #include "CRS.hh"
13 
14 namespace concepts {
15 
16  // ********************************************************* SuperLUFabric **
17 
21  template<class F = Real>
22  class SuperLUFabric : public SolverFabric<F> {
23  public:
25  virtual Operator<F>* operator()() {return new Operator<F>(1,1);};
26  virtual SuperLU<F>* operator()(Operator<F>& matrix) {
27  if (dynamic_cast<concepts::CRSConvertable<F>*>(&matrix))
28  return new SuperLU<F>(matrix);
29  else {
30  concepts::SparseMatrix<F> tmpMatrix(matrix);
31  return new SuperLU<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 // superLUfabric_hh
Direct sparse solver for unsymmetric matrices.
Definition: superLU.hh:70
virtual Operator< F > * operator()()
Unused, avoids the "No return statement in function returning non-void [-Wreturn-type]" warning.
Abstract fabric class for linear solvers.
Definition: jdbsym.hh:16
virtual std::ostream & info(std::ostream &os) const
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
std::string typeOf(const T &t)
Return the typeid name of a class object.
Definition: output.hh:43
virtual SuperLU< F > * operator()(Operator< F > &matrix)
Fabric class for SuperLU.
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