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::SCPoissonSolverManager Class Reference

Class SCPoissonSolverManager is a singleton manager class to provide access to generic side-centered PoissonSolver implementations. More...

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

Public Types

using SolverMaker = SAMRAI::tbox::Pointer< PoissonSolver >(*)(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< PoissonSolverallocateSolver (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
 
SAMRAI::tbox::Pointer< PoissonSolverallocateSolver (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 std::string &precond_type, const std::string &precond_object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > precond_input_db, const std::string &precond_default_options_prefix, const std::string &sub_precond_type="", const std::string &sub_precond_object_name="", SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > sub_precond_input_db=SAMRAI::tbox::Pointer< SAMRAI::tbox::Database >(), const std::string &sub_precond_default_options_prefix="") const
 
void registerSolverFactoryFunction (const std::string &solver_type, SolverMaker solver_maker)
 

Static Public Member Functions

static SCPoissonSolverManagergetManager ()
 
static void freeManager ()
 

Static Public Attributes

static const std::string UNDEFINED = "UNDEFINED"
 
static const std::string DEFAULT_KRYLOV_SOLVER = "DEFAULT_KRYLOV_SOLVER"
 
static const std::string PETSC_KRYLOV_SOLVER = "PETSC_KRYLOV_SOLVER"
 
static const std::string DEFAULT_FAC_PRECONDITIONER = "DEFAULT_FAC_PRECONDITIONER"
 
static const std::string POINT_RELAXATION_FAC_PRECONDITIONER = "POINT_RELAXATION_FAC_PRECONDITIONER"
 
static const std::string DEFAULT_LEVEL_SOLVER = "DEFAULT_LEVEL_SOLVER"
 
static const std::string HYPRE_LEVEL_SOLVER = "HYPRE_LEVEL_SOLVER"
 
static const std::string PETSC_LEVEL_SOLVER = "PETSC_LEVEL_SOLVER"
 

Protected Member Functions

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

Detailed Description

Class SCPoissonSolverManager is a singleton manager class to provide access to generic side-centered PoissonSolver implementations.

Member Typedef Documentation

◆ SolverMaker

using IBTK::SCPoissonSolverManager::SolverMaker = SAMRAI::tbox::Pointer<PoissonSolver> (*)(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 side-centered PoissonSolvers.

Member Function Documentation

◆ allocateSolver() [1/2]

Pointer< PoissonSolver > IBTK::SCPoissonSolverManager::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 SCPoissonSolver object of the specified type.

◆ allocateSolver() [2/2]

Pointer< PoissonSolver > IBTK::SCPoissonSolverManager::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 std::string precond_type,
const std::string precond_object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database precond_input_db,
const std::string precond_default_options_prefix,
const std::string sub_precond_type = "",
const std::string sub_precond_object_name = "",
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database sub_precond_input_db = SAMRAI::tbox::Pointer<SAMRAI::tbox::Database>(),
const std::string sub_precond_default_options_prefix = "" 
) const

Allocate a new SCPoissonSolver object of the specified type with a preconditioner of a specified type.

Note
The preconditioner settings are used only when the parent solver is a KrylovLinearSolver.

◆ freeManager()

void IBTK::SCPoissonSolverManager::freeManager ( )
static

Deallocate the SCPoissonSolverManager instance.

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

◆ getManager()

SCPoissonSolverManager * IBTK::SCPoissonSolverManager::getManager ( )
static

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

Returns
A pointer to the solver manager instance.

◆ registerSolverFactoryFunction()

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

Register a solver factory function with the solver manager class.

Member Data Documentation

◆ DEFAULT_FAC_PRECONDITIONER

const std::string IBTK::SCPoissonSolverManager::DEFAULT_FAC_PRECONDITIONER = "DEFAULT_FAC_PRECONDITIONER"
static

Default FAC preconditioner types automatically provided by the manager class.

◆ DEFAULT_KRYLOV_SOLVER

const std::string IBTK::SCPoissonSolverManager::DEFAULT_KRYLOV_SOLVER = "DEFAULT_KRYLOV_SOLVER"
static

Default Krylov solver types automatically provided by the manager class.

◆ DEFAULT_LEVEL_SOLVER

const std::string IBTK::SCPoissonSolverManager::DEFAULT_LEVEL_SOLVER = "DEFAULT_LEVEL_SOLVER"
static

Default level solver types automatically provided by the manager class.

◆ UNDEFINED

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

Key to use for "undefined" solver types.


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