Teuchos - Trilinos Tools Package
Version of the Day
|
Repository of solver factories. More...
#include <Trilinos_Details_LinearSolverFactory.hpp>
Public Types | |
typedef Teuchos::RCP < LinearSolverFactory< MV, OP, NormType > > | factory_pointer_type |
Type of a reference-counted pointer to LinearSolverFactory. More... | |
typedef std::map< std::string, factory_pointer_type > | map_type |
Type of a data structure that looks up a LinearSolverFactory corresponding to a given package name. More... | |
Static Public Member Functions | |
static factory_pointer_type | getFactory (const std::string &packageName) |
Get a LinearSolverFactory from the given package. More... | |
static void | registerLinearSolverFactory (const std::string &packageName, const factory_pointer_type &factory) |
Register the given factory from a package. More... | |
Repository of solver factories.
MV | Type of a (multi)vector, representing either the solution(s) X or the right-hand side(s) B of a linear system AX=B. For example, with Tpetra, use a Tpetra::MultiVector specialization. A multivector is a single data structure containing zero or more vectors with the same dimensions and layout. |
OP | Type of a matrix or linear operator that LinearSolver understands. For example, for Tpetra, use a Tpetra::Operator specialization. |
NormType | Type of the norm of a residual. |
A LinearSolver knows how to solve linear systems AX=B. A LinearSolverFactory knows how to create LinearSolver instances. Each independent unit of code ("package") that wants to participate in the linear solver system, registers its own LinearSolverFactory using the nonmember functions Trilinos::Details::registerLinearSolverFactory(). Solvers may then get (inner) solver instances with Trilinos::Details::getLinearSolver() (see above in this file). Those two nonmember functions dispatch to this class' class (static) methods with the same names.
Definition at line 368 of file Trilinos_Details_LinearSolverFactory.hpp.
Trilinos::Details::Impl::LinearSolverFactoryRepository< MV, OP, NormType >::factory_pointer_type |
Type of a reference-counted pointer to LinearSolverFactory.
If C++11 is enabled, we use std::shared_ptr here, for improved thread safety. Teuchos does not require C++11.
Definition at line 378 of file Trilinos_Details_LinearSolverFactory.hpp.
Trilinos::Details::Impl::LinearSolverFactoryRepository< MV, OP, NormType >::map_type |
Type of a data structure that looks up a LinearSolverFactory corresponding to a given package name.
The compiler insists that this be public. This doesn't hurt encapsulation, because this class lives in an "Impl"(ementation) namespace anyway.
Definition at line 388 of file Trilinos_Details_LinearSolverFactory.hpp.
|
inlinestatic |
Get a LinearSolverFactory from the given package.
This is an implementation detail of the nonmember function with the same name (see above).
packageName | [in] Name of the package. This must be the same name as that used to register the package via registerLinearSolverFactory(). Package names are case sensitive. |
packageName
has been registered with a valid LinearSolverFactory, the pointer to the factory, else null. Definition at line 404 of file Trilinos_Details_LinearSolverFactory.hpp.
|
inlinestatic |
Register the given factory from a package.
This is an implementation detail of the nonmember function with the same name (see above).
packageName | [in] Name of the package registering the factory. Package names are case sensitive. |
factory | [in] That package's factory (must be nonnull). |
Definition at line 431 of file Trilinos_Details_LinearSolverFactory.hpp.