27#include "neml2/models/Model.h"
28#include "neml2/models/ModelNonlinearSystem.h"
29#include "neml2/solvers/NonlinearSolver.h"
30#include "neml2/models/Predictor.h"
48 void set_value(
bool out,
bool dout_din,
bool d2out_din2)
override;
54 std::shared_ptr<ModelNonlinearSystem>
_sys;
std::shared_ptr< ModelNonlinearSystem > _sys
The underlying nonlinear system that wraps around a Model.
Definition ImplicitUpdate.h:54
std::size_t last_iterations() const
Definition ImplicitUpdate.h:45
void apply_predictor()
Apply the predictor to set the initial guess for the nonlinear solve.
ImplicitUpdate(const OptionSet &options)
void to(const TensorOptions &options) override
Send model to a different device or dtype.
std::size_t _last_iterations
Last solve result.
Definition ImplicitUpdate.h:63
static OptionSet expected_options()
void link_input_variables(Model *submodel) override
void set_value(bool out, bool dout_din, bool d2out_din2) override
The map between input -> output, and optionally its derivatives.
std::shared_ptr< Model > _predictor
The predictor model to provide an initial guess for the nonlinear solve (optional).
Definition ImplicitUpdate.h:57
std::shared_ptr< NonlinearSolver > _solver
The nonlinear solver used to solve the nonlinear system.
Definition ImplicitUpdate.h:60
Model(const OptionSet &options)
Construct a new Model object.
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:54
Definition DiagnosticsInterface.h:31
c10::TensorOptions TensorOptions
Definition types.h:66