20 #ifndef LIBMESH_LINEAR_SOLVER_H 21 #define LIBMESH_LINEAR_SOLVER_H 31 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS 55 template <
typename T>
class SparseMatrix;
56 template <
typename T>
class NumericVector;
57 template <
typename T>
class ShellMatrix;
107 virtual void init (
const char *
name =
nullptr) = 0;
178 const unsigned int) = 0;
203 const unsigned int) = 0;
227 const unsigned int) = 0;
240 const unsigned int) = 0;
313 template <
typename T>
320 template <
typename T>
324 return same_preconditioner;
327 template <
typename T>
329 std::pair<unsigned int, Real>
335 const unsigned int n_iter)
338 return this->solve(mat, *pc_mat, sol, rhs, tol, n_iter);
340 return this->solve(mat, sol, rhs, tol, n_iter);
344 template <
typename T>
346 std::pair<unsigned int, Real>
352 const unsigned int n_iter)
355 return this->solve(mat, *pc_mat, sol, rhs, tol, n_iter);
357 return this->solve(mat, sol, rhs, tol, n_iter);
363 #endif // LIBMESH_LINEAR_SOLVER_H std::string name(const ElemQuality q)
static std::unique_ptr< LinearSolver< T > > build(const libMesh::Parallel::Communicator &comm_in, const SolverPackage solver_package=libMesh::default_solver_package())
Preconditioner< T > * _preconditioner
virtual void print_converged_reason() const
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
SolverPackage default_solver_package()
LinearSolver(const libMesh::Parallel::Communicator &comm_in)
virtual void init(const char *name=nullptr)=0
Manages consistently variables, degrees of freedom, and coefficient vectors.
SolverConfiguration * _solver_configuration
void set_preconditioner_type(const PreconditionerType pct)
virtual std::pair< unsigned int, Real > adjoint_solve(SparseMatrix< T > &, NumericVector< T > &, NumericVector< T > &, const double, const unsigned int)
virtual std::pair< unsigned int, Real > solve(SparseMatrix< T > &, NumericVector< T > &, NumericVector< T > &, const double, const unsigned int)=0
void set_solver_type(const SolverType st)
An object whose state is distributed along a set of processors.
void attach_preconditioner(Preconditioner< T > *preconditioner)
void set_solver_configuration(SolverConfiguration &solver_configuration)
PreconditionerType preconditioner_type() const
virtual LinearConvergenceReason get_converged_reason() const =0
virtual void reuse_preconditioner(bool)
PreconditionerType _preconditioner_type
virtual void restrict_solve_to(const std::vector< unsigned int > *const dofs, const SubsetSolveMode subset_solve_mode=SUBSET_ZERO)
SolverType solver_type() const
virtual void init_names(const System &)
bool get_same_preconditioner()