Ifpack Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
Ifpack_DynamicFactory Class Reference

Ifpack_DynamicFactory. More...

#include <Ifpack_DynamicFactory.h>

Public Types

typedef Ifpack_Preconditioner *(* builderFunction) (Epetra_RowMatrix *, int, bool, bool)
 

Public Member Functions

Ifpack_PreconditionerCreate (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 (can fail with bad input).
 

Static Public Member Functions

static bool Initialize ()
 Initializes the static data of the Ifpac_DynamicFactory class.
 
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.
 
template<typename PrecType , bool StandAlone>
static Ifpack_PreconditionerbuildPreconditioner (Epetra_RowMatrix *Matrix, int Overlap, bool Serial, bool OverrideSerialDefault)
 

Static Private Attributes

static std::map< std::string, builderFunctionPreconditionerMap_
 
static int NumPreconditioners_ = 0
 
static bool Initialized_ = false
 

Detailed Description

Ifpack_DynamicFactory.

TODO: write class description

Author
Radu Popescu radu..nosp@m.pope.nosp@m.scu@e.nosp@m.pfl..nosp@m.ch
Date
2013-05-02

Definition at line 57 of file Ifpack_DynamicFactory.h.

Member Typedef Documentation

◆ builderFunction

typedef Ifpack_Preconditioner *(* Ifpack_DynamicFactory::builderFunction) (Epetra_RowMatrix *, int, bool, bool)

Definition at line 60 of file Ifpack_DynamicFactory.h.

Member Function Documentation

◆ Create()

Ifpack_Preconditioner * Ifpack_DynamicFactory::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 (can fail with bad input).

Parameters
PrecType(In) - String name of preconditioner type to be created.
Matrix(In) - Matrix used to define the preconditioner
overlap(In) - specified overlap, defaulted to 0.

Returns 0 if the preconditioner with that input name does not exist. Otherwise, return a newly created preconditioner object. Note that the client is responsible for calling delete on the returned object once it is finished using it!

Definition at line 181 of file Ifpack_DynamicFactory.cpp.

◆ Initialize()

bool Ifpack_DynamicFactory::Initialize ( )
static

Initializes the static data of the Ifpac_DynamicFactory class.

Returns true if initialization succeeded, otherwise false or FILE_NOT_FOUND

Definition at line 65 of file Ifpack_DynamicFactory.cpp.

◆ RegisterPreconditioner()

int Ifpack_DynamicFactory::RegisterPreconditioner ( const std::string PrecName,
Ifpack_DynamicFactory::builderFunction PrecBuilder )
static

Register a new preconditioner with the factory.

Parameters
PrecName- String name of the new preconditioner
PrecBuilder- function pointer to the builder function

Returns 0 if ok, otherwise 1

Definition at line 159 of file Ifpack_DynamicFactory.cpp.

◆ Print()

void Ifpack_DynamicFactory::Print ( std::ostream & os = std::cout)
static

Prints the current list of registered preconditioners.

Definition at line 171 of file Ifpack_DynamicFactory.cpp.

◆ buildPreconditioner()

template<typename PrecType , bool StandAlone>
Ifpack_Preconditioner * Ifpack_DynamicFactory::buildPreconditioner ( Epetra_RowMatrix * Matrix,
int Overlap,
bool Serial,
bool OverrideSerialDefault )
static

Definition at line 122 of file Ifpack_DynamicFactory.h.

Member Data Documentation

◆ PreconditionerMap_

std::map< std::string, Ifpack_DynamicFactory::builderFunction > Ifpack_DynamicFactory::PreconditionerMap_
staticprivate

Definition at line 114 of file Ifpack_DynamicFactory.h.

◆ NumPreconditioners_

int Ifpack_DynamicFactory::NumPreconditioners_ = 0
staticprivate

Definition at line 115 of file Ifpack_DynamicFactory.h.

◆ Initialized_

bool Ifpack_DynamicFactory::Initialized_ = false
staticprivate

Definition at line 116 of file Ifpack_DynamicFactory.h.


The documentation for this class was generated from the following files: