25#include "neml2/models/solid_mechanics/MixedControlSetup.h"
26#include "neml2/misc/math.h"
37 "Object to setup a model for mixed stress/strain control. Copies the values of the "
38 "fixed_values (the input strain or stress) and the mixed_state (the conjugate stress or "
39 "strain values) into the stress and strain tensors used by the model.";
43 "The name of the control signal. Values less than the threshold are "
44 "strain control, greater are stress control";
47 options.set(
"threshold").doc() =
"The threshold to switch between strain and stress control";
50 options.set(
"mixed_state").doc() =
"The name of the mixed state tensor. This holds the conjugate "
51 "values to those being controlled";
54 options.set(
"fixed_values").doc() =
"The name of the fixed values, i.e. the actual strain or "
55 "stress values being imposed on the model";
58 options.set(
"cauchy_stress").doc() =
"The name of the Cauchy stress tensor";
61 options.set(
"strain").doc() =
"The name of the strain tensor";
69 _control(declare_input_variable<
SR2>(
"control")),
70 _fixed_values(declare_input_variable<
SR2>(
"fixed_values")),
71 _mixed_state(declare_input_variable<
SR2>(
"mixed_state")),
72 _stress(declare_output_variable<
SR2>(
"cauchy_stress")),
73 _strain(declare_output_variable<
SR2>(
"strain"))
103MixedControlSetup::make_operators(
const SR2 &
control)
const
static BatchTensor ones_like(const BatchTensor &other)
Unit tensor like another, i.e. same batch and base shapes, same tensor options, etc.
Definition BatchTensorBase.cxx:66
Definition BatchTensor.h:32
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
Definition MixedControlSetup.h:32
const BatchTensor _threshold
The threshold for the control signal.
Definition MixedControlSetup.h:47
const Variable< SR2 > & _control
Actual input control signal.
Definition MixedControlSetup.h:50
MixedControlSetup(const OptionSet &options)
Definition MixedControlSetup.cxx:66
const Variable< SR2 > & _mixed_state
Conjugate state containing the mixed, unknown stresses and strains.
Definition MixedControlSetup.h:55
Variable< SR2 > & _strain
Strain tensor to target.
Definition MixedControlSetup.h:60
static OptionSet expected_options()
Definition MixedControlSetup.cxx:33
Variable< SR2 > & _stress
Stress tensor to target.
Definition MixedControlSetup.h:58
const Variable< SR2 > & _fixed_values
Driving forces to pull the "controled" entries from.
Definition MixedControlSetup.h:53
void set_value(bool out, bool dout_din, bool d2out_din2) override
The map between input -> output, and optionally its derivatives.
Definition MixedControlSetup.cxx:78
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
static OptionSet expected_options()
Definition Model.cxx:33
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
The (logical) symmetric second order tensor.
Definition SR2.h:46
BatchTensor base_diag_embed(const BatchTensor &a, TorchSize offset, TorchSize d1, TorchSize d2)
Definition math.cxx:251
Definition CrossRef.cxx:32
LabeledAxisAccessor VariableName
Definition Variable.h:35