25#include "neml2/models/WR2ImplicitExponentialTimeIntegration.h"
27#include "neml2/tensors/Rot.h"
28#include "neml2/tensors/WR2.h"
29#include "neml2/tensors/R2.h"
30#include "neml2/tensors/Vec.h"
40 options.doc() =
"Define the implicit discrete exponential time integration residual of a "
41 "rotation variable. The residual can be written as \\f$ r = s - \\exp\\left[ "
42 "(t-t_n)\\dot{s}\\right] \\circ s_n \\f$, where \\f$ \\circ \\f$ denotes the "
48 options.set(
"variable").doc() =
"Variable being integrated";
51 options.set(
"time").doc() =
"Time";
60 _var_rate_name(_var_name.with_suffix(
"_rate")),
61 _r(declare_output_variable<
Vec>(_var_name.on(
"residual"))),
62 _s_dot(declare_input_variable<
WR2>(_var_rate_name.on(
"state"))),
63 _s(declare_input_variable<
Rot>(_var_name.on(
"state"))),
64 _sn(declare_input_variable<
Rot>(_var_name.on(
"old_state"))),
66 _tn(declare_input_variable<
Scalar>(options.get<
VariableName>(
"time").on(
"old_forces")))
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
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
const torch::TensorOptions & options() const
This model's tensor options.
Definition Model.h:116
@ UPDATING
Definition Model.h:188
static OptionSet expected_options()
Definition Model.cxx:33
static enum neml2::Model::Stage stage
Definition Model.cxx:30
static void enable_automatic_scaling(OptionSet &options)
Definition NonlinearSystem.cxx:62
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
static R2 identity(const torch::TensorOptions &options=default_tensor_options())
Identity.
Definition R2Base.cxx:170
Rotation stored as modified Rodrigues parameters.
Definition Rot.h:49
Rot rotate(const Rot &r) const
Rotate.
Definition Rot.cxx:81
R2 drotate_self(const Rot &r) const
Derivative of the rotated Rodrigues vector w.r.t. this vector.
Definition Rot.cxx:103
R2 drotate(const Rot &r) const
Derivative of the rotated Rodrigues vector w.r.t. the other Rodrigues vector.
Definition Rot.cxx:87
The (logical) scalar.
Definition Scalar.h:38
The (logical) vector.
Definition Vec.h:42
Implicit exponential time integration for rotations.
Definition WR2ImplicitExponentialTimeIntegration.h:34
const Variable< WR2 > & _s_dot
Current variable spin rate.
Definition WR2ImplicitExponentialTimeIntegration.h:55
WR2ImplicitExponentialTimeIntegration(const OptionSet &options)
Definition WR2ImplicitExponentialTimeIntegration.cxx:56
const Variable< Scalar > & _t
Current time.
Definition WR2ImplicitExponentialTimeIntegration.h:64
Variable< Vec > & _r
Nonlinear residual.
Definition WR2ImplicitExponentialTimeIntegration.h:52
const Variable< Scalar > & _tn
Previous time.
Definition WR2ImplicitExponentialTimeIntegration.h:67
static OptionSet expected_options()
Definition WR2ImplicitExponentialTimeIntegration.cxx:37
const Variable< Rot > & _sn
Previous value.
Definition WR2ImplicitExponentialTimeIntegration.h:61
const Variable< Rot > & _s
Current guess at next value.
Definition WR2ImplicitExponentialTimeIntegration.h:58
void set_value(bool out, bool dout_din, bool d2out_din2) override
Perform the update by defining the nonlinear residual and it's derivatives.
Definition WR2ImplicitExponentialTimeIntegration.cxx:71
A skew rank 2, represented as an axial vector.
Definition WR2.h:43
Definition CrossRef.cxx:32
void neml_assert_dbg(bool assertion, Args &&... args)
Definition error.h:85
LabeledAxisAccessor VariableName
Definition Variable.h:35