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

Class NewtonKrylovSolverManager is a singleton manager class to provide access to generic NewtonKrylovSolver implementations. More...

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

Public Types

using SolverMaker = SAMRAI::tbox::Pointer< NewtonKrylovSolver >(*)(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< NewtonKrylovSolverallocateSolver (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 NewtonKrylovSolverManagergetManager ()
 
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

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

Detailed Description

Class NewtonKrylovSolverManager is a singleton manager class to provide access to generic NewtonKrylovSolver implementations.

Member Typedef Documentation

◆ SolverMaker

using IBTK::NewtonKrylovSolverManager::SolverMaker = SAMRAI::tbox::Pointer<NewtonKrylovSolver> (*)(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 NewtonKrylovSolvers.

Member Function Documentation

◆ allocateSolver()

Pointer< NewtonKrylovSolver > IBTK::NewtonKrylovSolverManager::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 NewtonKrylovSolver object of the specified type.

◆ freeManager()

void IBTK::NewtonKrylovSolverManager::freeManager ( )
static

Deallocate the NewtonKrylovSolverManager instance.

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

◆ getManager()

NewtonKrylovSolverManager * IBTK::NewtonKrylovSolverManager::getManager ( )
static

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

Returns
A pointer to the solver manager instance.

◆ registerSolverFactoryFunction()

void IBTK::NewtonKrylovSolverManager::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::NewtonKrylovSolverManager::DEFAULT = "DEFAULT"
static

Default Newton-Krylov solver types automatically provided by the manager class.

◆ UNDEFINED

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

Key to use for "undefined" solver types.


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