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"
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_;
120template <
typename PrecType,
bool StandAlone>
125 bool OverrideSerialDefault)
127 if (StandAlone || (Serial && !OverrideSerialDefault)) {
128 return new PrecType(Matrix);
Ifpack_AdditiveSchwarz: a class to define Additive Schwarz preconditioners of Epetra_RowMatrix's.
static int RegisterPreconditioner(const std::string PrecName, builderFunction PrecBuilder)
Register a new preconditioner with the factory.
static void Print(std::ostream &os=std::cout)
Prints the current list of registered preconditioners.
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: basic class for preconditioning in Ifpack.