21 #ifndef __DEFAULT_FACTORY_H 22 #define __DEFAULT_FACTORY_H 26 #include <dolfin/common/MPI.h> 27 #include <dolfin/common/types.h> 28 #include "GenericLinearAlgebraFactory.h" 49 virtual std::shared_ptr<GenericMatrix>
create_matrix(MPI_Comm comm)
const;
52 virtual std::shared_ptr<GenericVector>
create_vector(MPI_Comm comm)
const;
55 virtual std::shared_ptr<TensorLayout>
create_layout(MPI_Comm comm ,
56 std::size_t rank)
const;
59 virtual std::shared_ptr<GenericLinearOperator>
63 virtual std::shared_ptr<dolfin::GenericLinearSolver>
67 virtual std::shared_ptr<dolfin::GenericLinearSolver>
69 std::string preconditioner)
const;
std::map< std::string, std::string > krylov_solver_preconditioners() const
Return a list of available preconditioners.
Definition: DefaultFactory.cpp:80
DefaultFactory()
Constructor.
Definition: DefaultFactory.h:43
virtual std::shared_ptr< GenericVector > create_vector(MPI_Comm comm) const
Create empty vector.
Definition: DefaultFactory.cpp:37
virtual std::shared_ptr< TensorLayout > create_layout(MPI_Comm comm, std::size_t rank) const
Create empty tensor layout.
Definition: DefaultFactory.cpp:43
std::map< std::string, std::string > lu_solver_methods() const
Return a list of available LU solver methods.
Definition: DefaultFactory.cpp:68
Base class for LinearAlgebra factories.
Definition: GenericLinearAlgebraFactory.h:46
virtual std::shared_ptr< dolfin::GenericLinearSolver > create_krylov_solver(MPI_Comm comm, std::string method, std::string preconditioner) const
Create Krylov solver.
Definition: DefaultFactory.cpp:61
virtual ~DefaultFactory()
Destructor.
Definition: DefaultFactory.h:46
This class provides a general solver for linear systems Ax = b.
Definition: GenericLinearSolver.h:37
std::map< std::string, std::string > krylov_solver_methods() const
Return a list of available Krylov solver methods.
Definition: DefaultFactory.cpp:74
static GenericLinearAlgebraFactory & factory()
Return instance of default backend.
Definition: DefaultFactory.cpp:85
virtual std::shared_ptr< GenericMatrix > create_matrix(MPI_Comm comm) const
Create empty matrix.
Definition: DefaultFactory.cpp:32
virtual std::shared_ptr< dolfin::GenericLinearSolver > create_lu_solver(MPI_Comm comm, std::string method) const
Create LU solver.
Definition: DefaultFactory.cpp:55
virtual std::shared_ptr< GenericLinearOperator > create_linear_operator(MPI_Comm comm) const
Create empty linear operator.
Definition: DefaultFactory.cpp:49
Default linear algebra factory based on global parameter "linear_algebra_backend".
Definition: DefaultFactory.h:35