27#include "neml2/solvers/NonlinearSolver.h"
28#include "neml2/misc/math.h"
62 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:56
The nonlinear solver solves a nonlinear system of equations.
Definition Newton.h:39
virtual void prepare(const NonlinearSystem &, const Tensor &)
Prepare solver internal data before the iterative update.
Definition Newton.h:49
virtual std::tuple< bool, size_t > solve(NonlinearSystem &system, Tensor &x) override
Solve the given nonlinear system.
Definition Newton.cxx:48
virtual void update(NonlinearSystem &system, Tensor &x)
Update trial solution.
Definition Newton.cxx:111
virtual Tensor solve_direction(const NonlinearSystem &system)
Find the current update direction.
Definition Newton.cxx:127
virtual void final_update(NonlinearSystem &system, Tensor &x)
Do a final update to track AD function graph.
Definition Newton.cxx:120
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:98
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:100
Definition CrossRef.cxx:30