30 #ifndef IFPACK_DYNAMIC_FACTORY_H
31 #define IFPACK_DYNAMIC_FACTORY_H
38 #include "Ifpack_ConfigDefs.h"
39 #include "Ifpack_Preconditioner.h"
40 #include "Teuchos_iostream_helpers.hpp"
41 #include "Ifpack_AdditiveSchwarz.h"
45 #include "Ifpack_Hypre.h"
77 Epetra_RowMatrix* Matrix,
78 const int overlap = 0,
79 bool overrideSerialDefault =
false);
98 builderFunction PrecBuilder);
104 static void Print(std::ostream& os = std::cout);
107 template <
typename PrecType,
bool StandAlone>
111 bool OverrideSerialDefault);
114 static std::map<std::string, builderFunction> PreconditionerMap_;
115 static int NumPreconditioners_;
116 static bool Initialized_;
120 template <
typename PrecType,
bool StandAlone>
122 Ifpack_DynamicFactory::buildPreconditioner(Epetra_RowMatrix* Matrix,
125 bool OverrideSerialDefault)
127 if (StandAlone || (Serial && !OverrideSerialDefault)) {
128 return new PrecType(Matrix);
134 #endif // IFPACK_DYNAMIC_FACTORY_H