IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
IBTK::KrylovLinearSolverManager Class Reference

Class KrylovLinearSolverManager is a singleton manager class to provide access to generic KrylovLinearSolver implementations. More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/KrylovLinearSolverManager.h>

Public Types

using SolverMaker = SAMRAI::tbox::Pointer< KrylovLinearSolver >(*)(const std::string &solver_object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > solver_input_db, const std::string &solver_default_options_prefix)
 

Public Member Functions

SAMRAI::tbox::Pointer< KrylovLinearSolverallocateSolver (const std::string &solver_type, const std::string &solver_object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > solver_input_db, const std::string &solver_default_options_prefix) const
 
void registerSolverFactoryFunction (const std::string &solver_type, SolverMaker solver_maker)
 

Static Public Member Functions

static KrylovLinearSolverManagergetManager ()
 
static void freeManager ()
 

Static Public Attributes

static const std::string UNDEFINED = "UNDEFINED"
 
static const std::string DEFAULT = "DEFAULT"
 
static const std::string PETSC = "PETSC"
 

Protected Member Functions

 KrylovLinearSolverManager ()
 Default constructor.
 
 ~KrylovLinearSolverManager ()=default
 Destructor.
 

Detailed Description

Class KrylovLinearSolverManager is a singleton manager class to provide access to generic KrylovLinearSolver implementations.

Member Typedef Documentation

◆ SolverMaker

using IBTK::KrylovLinearSolverManager::SolverMaker = SAMRAI::tbox::Pointer<KrylovLinearSolver> (*)(const std::string& solver_object_name, SAMRAI::tbox::Pointer<SAMRAI::tbox::Database> solver_input_db, const std::string& solver_default_options_prefix)

Typedef for functions to construct KrylovLinearSolvers.

Member Function Documentation

◆ allocateSolver()

Pointer< KrylovLinearSolver > IBTK::KrylovLinearSolverManager::allocateSolver ( const std::string solver_type,
const std::string solver_object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database solver_input_db,
const std::string solver_default_options_prefix 
) const

Allocate a new KrylovLinearSolver object of the specified type.

◆ freeManager()

void IBTK::KrylovLinearSolverManager::freeManager ( )
static

Deallocate the KrylovLinearSolverManager instance.

It is not necessary to call this function at program termination since it is automatically called by the ShutdownRegistry class.

◆ getManager()

KrylovLinearSolverManager * IBTK::KrylovLinearSolverManager::getManager ( )
static

Return a pointer to the instance of the solver manager. Access to KrylovLinearSolverManager objects is mediated by the getManager() function.

Returns
A pointer to the solver manager instance.

◆ registerSolverFactoryFunction()

void IBTK::KrylovLinearSolverManager::registerSolverFactoryFunction ( const std::string solver_type,
SolverMaker  solver_maker 
)

Register a solver factory function with the solver manager class.

Member Data Documentation

◆ DEFAULT

const std::string IBTK::KrylovLinearSolverManager::DEFAULT = "DEFAULT"
static

Default Krylov solver types automatically provided by the manager class.

◆ UNDEFINED

const std::string IBTK::KrylovLinearSolverManager::UNDEFINED = "UNDEFINED"
static

Key to use for "undefined" solver types.


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