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