20 #ifndef LIBMESH_TRILINOS_NOX_NONLINEAR_SOLVER_H 21 #define LIBMESH_TRILINOS_NOX_NONLINEAR_SOLVER_H 26 #if defined(LIBMESH_TRILINOS_HAVE_NOX) && defined(LIBMESH_TRILINOS_HAVE_EPETRA) 29 #include "libmesh/nonlinear_solver.h" 32 #include "libmesh/ignore_warnings.h" 33 #include "Epetra_Vector.h" 34 #include "Epetra_Operator.h" 35 #include "Epetra_RowMatrix.h" 36 #include "NOX_Epetra_Interface_Required.H" 37 #include "NOX_Epetra_Interface_Jacobian.H" 38 #include "NOX_Epetra_Interface_Preconditioner.H" 40 #include "libmesh/restore_warnings.h" 49 class Problem_Interface;
83 virtual void clear ()
override;
88 virtual void init (
const char *
name =
nullptr)
override;
94 virtual std::pair<unsigned int, Real>
99 const unsigned int)
override;
113 { libmesh_not_implemented();
return 0; }
135 template <
typename T>
141 _n_linear_iterations(0)
147 template <
typename T>
158 #endif // LIBMESH_TRILINOS_HAVE_NOX && LIBMESH_TRILINOS_HAVE_EPETRA 159 #endif // LIBMESH_TRILINOS_NOX_NONLINEAR_SOLVER_H std::string name(const ElemQuality q)
This function returns a string containing some name for q.
virtual ~NoxNonlinearSolver()
Destructor.
virtual int get_total_linear_iterations() override
Get the total number of linear iterations done in the last solve.
int _n_linear_iterations
Stores the total number of linear iterations from the last solve.
virtual void init(const char *name=nullptr) override
Initialize data structures if not done so already.
Problem_Interface * _interface
Solver interface.
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
This base class can be inherited from to provide interfaces to nonlinear solvers from different packa...
virtual std::pair< unsigned int, Real > solve(SparseMatrix< T > &, NumericVector< T > &, NumericVector< T > &, const double, const unsigned int) override
Call the Nox solver.
The libMesh namespace provides an interface to certain functionality in the library.
NOX::Solver::Generic * _solver
Nonlinear solver context.
virtual void clear() override
Release all memory and clear data structures.
const sys_type & system() const
This class provides an interface to nox iterative solvers that is compatible with the libMesh Nonline...
NonlinearImplicitSystem sys_type
The type of system.
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and non-linear solv...
NoxNonlinearSolver(sys_type &system)
Constructor.
virtual unsigned get_current_nonlinear_iteration_number() const override