25#include "neml2/models/ForwardEulerTimeIntegration.h"
26#include "neml2/tensors/SSR4.h"
39 "Perform forward Euler time integration defined as \\f$ s = s_n + (t - t_n) \\dot{s} "
40 "\\f$, where \\f$s\\f$ is the variable being integrated, \\f$\\dot{s}\\f$ is the variable "
41 "rate, and \\f$t\\f$ is time. Subscripts \\f$n\\f$ denote quantities from the previous time "
45 options.
set(
"variable").doc() =
"Variable being integrated";
48 options.
set(
"time").doc() =
"Time";
57 _var_rate_name(_var_name.with_suffix(
"_rate")),
58 _s(declare_output_variable<T>(_var_name.on(
"state"))),
59 _ds_dt(declare_input_variable<T>(_var_rate_name.on(
"state"))),
60 _sn(declare_input_variable<T>(_var_name.on(
"old_state"))),
62 _tn(declare_input_variable<
Scalar>(options.get<
VariableName>(
"time").on(
"old_forces")))
71 _s = _sn + _ds_dt * (_t - _tn);
75 auto I = T::identity_map(options());
79 _s.d(_ds_dt) =
I * (_t - _tn);
92 _s.d(_ds_dt, _tn) = -
I;
94 _s.d(_tn, _ds_dt) = -
I;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
static OptionSet expected_options()
Definition ForwardEulerTimeIntegration.cxx:35
ForwardEulerTimeIntegration(const OptionSet &options)
Definition ForwardEulerTimeIntegration.cxx:54
void set_value(bool out, bool dout_din, bool d2out_din2) override
The map between input -> output, and optionally its derivatives.
Definition ForwardEulerTimeIntegration.cxx:68
The accessor containing all the information needed to access an item in a LabeledAxis.
Definition LabeledAxisAccessor.h:44
The base class for all constitutive models.
Definition Model.h:53
@ UPDATING
Definition Model.h:188
static OptionSet expected_options()
Definition Model.cxx:33
static enum neml2::Model::Stage stage
Definition Model.cxx:30
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
const std::string & doc() const
A readonly reference to the option set's docstring.
Definition OptionSet.h:91
T & set(const std::string &)
Definition OptionSet.h:436
The (logical) scalar.
Definition Scalar.h:38
Definition CrossRef.cxx:32
LabeledAxisAccessor VariableName
Definition Variable.h:35