30 #ifndef IFPACK_DYNAMIC_FACTORY_H
31 #define IFPACK_DYNAMIC_FACTORY_H
33 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
35 #warning "The Ifpack package is deprecated"
44 #include "Ifpack_ConfigDefs.h"
45 #include "Ifpack_Preconditioner.h"
46 #include "Teuchos_iostream_helpers.hpp"
47 #include "Ifpack_AdditiveSchwarz.h"
51 #include "Ifpack_Hypre.h"
84 const int overlap = 0,
85 bool overrideSerialDefault =
false);
104 builderFunction PrecBuilder);
110 static void Print(std::ostream& os = std::cout);
113 template <
typename PrecType,
bool StandAlone>
117 bool OverrideSerialDefault);
120 static std::map<std::string, builderFunction> PreconditionerMap_;
121 static int NumPreconditioners_;
122 static bool Initialized_;
126 template <
typename PrecType,
bool StandAlone>
131 bool OverrideSerialDefault)
133 if (StandAlone || (Serial && !OverrideSerialDefault)) {
134 return new PrecType(Matrix);
140 #endif // IFPACK_DYNAMIC_FACTORY_H
static void Print(std::ostream &os=std::cout)
Prints the current list of registered preconditioners.
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...
static int RegisterPreconditioner(const std::string PrecName, builderFunction PrecBuilder)
Register a new preconditioner with the factory.