25#include "neml2/models/WR2ExplicitExponentialTimeIntegration.h"
26#include "neml2/tensors/tensors.h"
36 options.doc() =
"Perform explicit discrete exponential time integration of a rotation. The "
37 "update can be written as \\f$ s = \\exp\\left[ (t-t_n)\\dot{s}\\right] \\circ "
38 "s_n \\f$, where \\f$ \\circ \\f$ denotes the rotation operator.";
41 options.set(
"variable").doc() =
"Variable being integrated";
44 options.set(
"time").doc() =
"Time";
53 _var_rate_name(_var_name.with_suffix(
"_rate")),
54 _s(declare_output_variable<
Rot>(_var_name.on(
"state"))),
55 _s_dot(declare_input_variable<
WR2>(_var_rate_name.on(
"state"))),
56 _sn(declare_input_variable<
Rot>(_var_name.on(
"old_state"))),
58 _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
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
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
Explicit exponential time integration for rotations.
Definition WR2ExplicitExponentialTimeIntegration.h:34
const Variable< WR2 > & _s_dot
Current variable spin rate.
Definition WR2ExplicitExponentialTimeIntegration.h:55
Variable< Rot > & _s
Current value.
Definition WR2ExplicitExponentialTimeIntegration.h:52
const Variable< Scalar > & _t
Current time.
Definition WR2ExplicitExponentialTimeIntegration.h:61
WR2ExplicitExponentialTimeIntegration(const OptionSet &options)
Definition WR2ExplicitExponentialTimeIntegration.cxx:49
const Variable< Scalar > & _tn
Previous time.
Definition WR2ExplicitExponentialTimeIntegration.h:64
static OptionSet expected_options()
Definition WR2ExplicitExponentialTimeIntegration.cxx:33
const Variable< Rot > & _sn
Previous value.
Definition WR2ExplicitExponentialTimeIntegration.h:58
void set_value(bool out, bool dout_din, bool d2out_din2) override
Perform the time integration to update the variable value.
Definition WR2ExplicitExponentialTimeIntegration.cxx:63
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