27#include "neml2/solvers/NonlinearSolver.h"
28#include "neml2/misc/math.h"
64 virtual bool converged(
size_t itr,
const torch::Tensor &
nR,
const torch::Tensor &
nR0)
const;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:54
The nonlinear solver solves a nonlinear system of equations.
Definition Newton.h:39
virtual NonlinearSystem::Sol< true > solve_direction(const NonlinearSystem::Res< true > &r, const NonlinearSystem::Jac< true > &J)
Find the current update direction.
Definition Newton.cxx:128
Result solve(NonlinearSystem &system, const NonlinearSystem::Sol< false > &x0) override
Solve the given nonlinear system.
Definition Newton.cxx:48
virtual void prepare(const NonlinearSystem &, const NonlinearSystem::Sol< true > &)
Prepare solver internal data before the iterative update.
Definition Newton.h:49
virtual void update(NonlinearSystem &system, NonlinearSystem::Sol< true > &x, const NonlinearSystem::Res< true > &r, const NonlinearSystem::Jac< true > &J)
Update trial solution.
Definition Newton.cxx:110
virtual void final_update(NonlinearSystem &system, NonlinearSystem::Sol< true > &x, const NonlinearSystem::Res< true > &r, const NonlinearSystem::Jac< true > &J)
Do a final update to track AD function graph.
Definition Newton.cxx:119
virtual bool converged(size_t itr, const torch::Tensor &nR, const torch::Tensor &nR0) const
Check for convergence. The current iteration is said to be converged if the residual norm is below th...
Definition Newton.cxx:97
static OptionSet expected_options()
Definition Newton.cxx:34
Newton(const OptionSet &options)
Definition Newton.cxx:42
The nonlinear solver solves a nonlinear system of equations.
Definition NonlinearSolver.h:37
Definition of a nonlinear system of equations.
Definition NonlinearSystem.h:37
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:85
Definition CrossRef.cxx:31
Definition NonlinearSolver.h:50
Definition NonlinearSystem.h:67
Definition NonlinearSystem.h:45
Definition NonlinearSystem.h:89