30 #ifndef IFPACK_DYNAMIC_FACTORY_H
31 #define IFPACK_DYNAMIC_FACTORY_H
40 #include "Teuchos_iostream_helpers.hpp"
78 const int overlap = 0,
79 bool overrideSerialDefault =
false);
104 static void Print(std::ostream& os = std::cout);
107 template <
typename PrecType,
bool StandAlone>
111 bool OverrideSerialDefault);
120 template <
typename PrecType,
bool StandAlone>
125 bool OverrideSerialDefault)
127 if (StandAlone || (Serial && !OverrideSerialDefault)) {
128 return new PrecType(Matrix);
134 #endif // IFPACK_DYNAMIC_FACTORY_H
static void Print(std::ostream &os=std::cout)
Prints the current list of registered preconditioners.
static std::map< std::string, builderFunction > PreconditionerMap_
static Ifpack_Preconditioner * buildPreconditioner(Epetra_RowMatrix *Matrix, int Overlap, bool Serial, bool OverrideSerialDefault)
Ifpack_AdditiveSchwarz: a class to define Additive Schwarz preconditioners of Epetra_RowMatrix's.
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
static bool Initialize()
Initializes the static data of the Ifpac_DynamicFactory class.
Ifpack_Preconditioner * Create(const std::string PrecType, Epetra_RowMatrix *Matrix, const int overlap=0, bool overrideSerialDefault=false)
Creates an instance of Ifpack_Preconditioner given the std::string name of the preconditioner type (c...
Ifpack_Preconditioner *(* builderFunction)(Epetra_RowMatrix *, int, bool, bool)
static int RegisterPreconditioner(const std::string PrecName, builderFunction PrecBuilder)
Register a new preconditioner with the factory.
static int NumPreconditioners_