IBAMR  IBAMR version 0.19.
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IBTK::NewtonKrylovSolverManager Class Reference

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

#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
 
static const std::string DEFAULT
 
static const std::string PETSC
 

Protected Member Functions

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

Private Member Functions

 NewtonKrylovSolverManager (const NewtonKrylovSolverManager &from)=delete
 Copy constructor. More...
 
NewtonKrylovSolverManageroperator= (const NewtonKrylovSolverManager &that)=delete
 Assignment operator. More...
 

Private Attributes

std::map< std::string, SolverMakerd_solver_maker_map
 

Static Private Attributes

static NewtonKrylovSolverManagers_solver_manager_instance
 
static bool s_registered_callback
 
static unsigned char s_shutdown_priority
 

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.

Constructor & Destructor Documentation

◆ NewtonKrylovSolverManager() [1/2]

IBTK::NewtonKrylovSolverManager::NewtonKrylovSolverManager ( )
protected

◆ ~NewtonKrylovSolverManager()

IBTK::NewtonKrylovSolverManager::~NewtonKrylovSolverManager ( )
protecteddefault

◆ NewtonKrylovSolverManager() [2/2]

IBTK::NewtonKrylovSolverManager::NewtonKrylovSolverManager ( const NewtonKrylovSolverManager from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ getManager()

static 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.

◆ freeManager()

static 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.

◆ allocateSolver()

SAMRAI::tbox::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.

◆ registerSolverFactoryFunction()

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

Register a solver factory function with the solver manager class.

◆ operator=()

NewtonKrylovSolverManager& IBTK::NewtonKrylovSolverManager::operator= ( const NewtonKrylovSolverManager that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

Member Data Documentation

◆ UNDEFINED

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

Key to use for "undefined" solver types.

◆ DEFAULT

const std::string IBTK::NewtonKrylovSolverManager::DEFAULT
static

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

◆ PETSC

const std::string IBTK::NewtonKrylovSolverManager::PETSC
static

◆ s_solver_manager_instance

NewtonKrylovSolverManager* IBTK::NewtonKrylovSolverManager::s_solver_manager_instance
staticprivate

Static data members used to control access to and destruction of singleton data manager instance.

◆ s_registered_callback

bool IBTK::NewtonKrylovSolverManager::s_registered_callback
staticprivate

◆ s_shutdown_priority

unsigned char IBTK::NewtonKrylovSolverManager::s_shutdown_priority
staticprivate

◆ d_solver_maker_map

std::map<std::string, SolverMaker> IBTK::NewtonKrylovSolverManager::d_solver_maker_map
private

Mapping from solver type names to solver maker functions.


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