21 #ifndef __TPETRA_FACTORY_H 22 #define __TPETRA_FACTORY_H 26 #include <dolfin/common/types.h> 27 #include "TpetraVector.h" 28 #include "TensorLayout.h" 29 #include "GenericLinearAlgebraFactory.h" 44 std::shared_ptr<GenericMatrix>
create_matrix(MPI_Comm comm)
const;
47 std::shared_ptr<GenericVector>
create_vector(MPI_Comm comm)
const;
51 std::size_t rank)
const;
54 std::shared_ptr<GenericLinearOperator>
58 std::shared_ptr<GenericLinearSolver>
62 std::shared_ptr<GenericLinearSolver>
65 std::string preconditioner)
const;
68 std::map<std::string, std::string>
72 std::map<std::string, std::string>
std::map< std::string, std::string > krylov_solver_preconditioners() const
Return a list of available preconditioners.
Definition: TpetraFactory.cpp:88
std::shared_ptr< TensorLayout > create_layout(MPI_Comm comm, std::size_t rank) const
Create empty tensor layout.
Definition: TpetraFactory.cpp:46
std::shared_ptr< GenericVector > create_vector(MPI_Comm comm) const
Create empty vector.
Definition: TpetraFactory.cpp:40
std::shared_ptr< GenericLinearOperator > create_linear_operator(MPI_Comm comm) const
Create empty linear operator.
Definition: TpetraFactory.cpp:55
virtual ~TpetraFactory()
Destructor.
Definition: TpetraFactory.h:41
Base class for LinearAlgebra factories.
Definition: GenericLinearAlgebraFactory.h:46
std::shared_ptr< GenericMatrix > create_matrix(MPI_Comm comm) const
Create empty matrix.
Definition: TpetraFactory.cpp:35
static TpetraFactory & instance()
Return singleton instance.
Definition: TpetraFactory.h:79
std::shared_ptr< GenericLinearSolver > create_krylov_solver(MPI_Comm comm, std::string method, std::string preconditioner) const
Create Krylov solver.
Definition: TpetraFactory.cpp:70
std::map< std::string, std::string > krylov_solver_methods() const
Return a list of available Krylov solver methods.
Definition: TpetraFactory.cpp:82
std::map< std::string, std::string > lu_solver_methods() const
Return a list of available LU solver methods.
Definition: TpetraFactory.cpp:77
std::shared_ptr< GenericLinearSolver > create_lu_solver(MPI_Comm comm, std::string method) const
Create LU solver.
Definition: TpetraFactory.cpp:64
Tpetra linear algebra factory.
Definition: TpetraFactory.h:36