20 #ifndef LIBMESH_TRILINOS_AZTEC_LINEAR_SOLVER_H 21 #define LIBMESH_TRILINOS_AZTEC_LINEAR_SOLVER_H 26 #include "libmesh/libmesh_common.h" 27 #include "libmesh/linear_solver.h" 29 #ifdef LIBMESH_TRILINOS_HAVE_AZTECOO 33 #include "libmesh/ignore_warnings.h" 34 #include <Epetra_LinearProblem.h> 36 #include "libmesh/restore_warnings.h" 69 virtual void clear ()
override;
74 virtual void init (
const char *
name=
nullptr)
override;
80 virtual std::pair<unsigned int, Real>
84 const std::optional<double> tol = std::nullopt,
85 const std::optional<unsigned int> m_its = std::nullopt)
override 87 return this->
solve(matrix_in, matrix_in, solution_in, rhs_in, tol, m_its);
97 virtual std::pair<unsigned int, Real>
102 const std::optional<double> tol = std::nullopt,
103 const std::optional<unsigned int> m_its = std::nullopt)
override;
108 virtual std::pair<unsigned int, Real>
112 const std::optional<double> tol = std::nullopt,
113 const std::optional<unsigned int> m_its = std::nullopt)
override;
120 virtual std::pair<unsigned int, Real>
125 const std::optional<double> tol = std::nullopt,
126 const std::optional<unsigned int> m_its = std::nullopt)
override;
175 template <
typename T>
186 #endif // #ifdef LIBMESH_TRILINOS_HAVE_AZTECOO 187 #endif // LIBMESH_TRILINOS_AZTEC_LINEAR_SOLVER_H std::string name(const ElemQuality q)
This function returns a string containing some name for q.
~AztecLinearSolver()
Destructor.
Epetra_LinearProblem * _linear_problem
The Epetra linear problem object.
void get_residual_history(std::vector< double > &hist)
Fills the input vector with the sequence of residual norms from the latest iterative solve...
LinearConvergenceReason
Linear solver convergence flags (taken from the PETSc flags).
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
const Parallel::Communicator & comm() const
The libMesh namespace provides an interface to certain functionality in the library.
This base class can be inherited from to provide interfaces to linear solvers from different packages...
virtual void clear() override
Release all memory and clear data structures.
AztecLinearSolver(const libMesh::Parallel::Communicator &comm)
Constructor.
virtual std::pair< unsigned int, Real > solve(SparseMatrix< T > &matrix_in, NumericVector< T > &solution_in, NumericVector< T > &rhs_in, const std::optional< double > tol=std::nullopt, const std::optional< unsigned int > m_its=std::nullopt) override
Call the Aztec solver.
virtual void init(const char *name=nullptr) override
Initialize data structures if not done so already.
This class provides an interface to AztecOO iterative solvers that is compatible with the libMesh Lin...
void set_solver_type()
Tells AztecOO to use the user-specified solver stored in _solver_type.
virtual void print_converged_reason() const override
Prints a useful message about why the latest linear solve con(di)verged.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual LinearConvergenceReason get_converged_reason() const override
Generic shell matrix, i.e.
Real get_initial_residual()
AztecOO * _linear_solver
The AztecOO solver object.