27#include "neml2/solvers/Solver.h"
28#include "neml2/solvers/LinearSolver.h"
29#include "neml2/equation_systems/NonlinearSystem.h"
std::shared_ptr< LinearSolver > linear_solver
Linear solver used by the nonlinear solver.
Definition NonlinearSolver.h:73
unsigned int miters
Maximum number of iterations.
Definition NonlinearSolver.h:79
virtual Result solve(NonlinearSystem &system)=0
Solve the given nonlinear system.
RetCode
Definition NonlinearSolver.h:41
@ MAXITER
Maximum number of iterations reached (without convergence).
Definition NonlinearSolver.h:45
@ FAILURE
Solver failed to converge.
Definition NonlinearSolver.h:47
@ SUCCESS
Solver converged successfully.
Definition NonlinearSolver.h:43
double rtol
Relative tolerance.
Definition NonlinearSolver.h:77
double atol
Absolute tolerance.
Definition NonlinearSolver.h:75
NonlinearSolver(const OptionSet &options)
void to(const TensorOptions &) override
Change the device and dtype of the solver's internal data.
static OptionSet expected_options()
Definition of a nonlinear system of equations, r(u) = 0.
Definition NonlinearSystem.h:44
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:52
Solver(const OptionSet &options)
Construct a new Solver object.
Definition DiagnosticsInterface.h:31
c10::TensorOptions TensorOptions
Definition types.h:66
Definition NonlinearSolver.h:51
std::size_t iterations
Number of iterations before convergence.
Definition NonlinearSolver.h:55
RetCode ret
Solver return code,.
Definition NonlinearSolver.h:53