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;
This class provides an interface to AztecOO iterative solvers that is compatible with the libMesh Lin...
virtual void clear() override
Release all memory and clear data structures.
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.
Real get_initial_residual()
void set_solver_type()
Tells AztecOO to use the user-specified solver stored in _solver_type.
virtual LinearConvergenceReason get_converged_reason() const override
~AztecLinearSolver()
Destructor.
virtual void print_converged_reason() const override
Prints a useful message about why the latest linear solve con(di)verged.
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.
AztecOO * _linear_solver
The AztecOO solver object.
This base class can be inherited from to provide interfaces to linear solvers from different packages...
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
const Parallel::Communicator & comm() const
Generic shell matrix, i.e.
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LinearConvergenceReason
Linear solver convergence flags (taken from the PETSc flags).