NEML2 1.4.0
|
Recall that NEML2 models operates on labeled tensors, and that the collection of labels (with their corresponding layout) is called an labeled axis (LabeledAxis). NEML2 predefines 5 sub-axes to categorize all the input, output and intermediate variables:
state
): Variables collectively characterizing the current state of the material subject to given external forces. The state variables are usually the output of a physically meaningful material model.forces
): Variables defining the external forces that drive the response of the material.old_state
): The state variables prior to the current material update. In the time-discrete setting, these are the state variables from the previous time step.old_forces
): The external forces prior to the current material update. In the time-discrete setting, these are the forces from the previous time step.residual
): The residual defines an implicit model/function. An implicit model is updated by solving for the state variables that result in zero residual.Variable names are used to access slices of the storage tensor. Variable names have the type neml2::VariableName which is an alias to neml2::LabeledAxisAccessor. The following characters are not allowed in variable names:
,
: input file parsing ambiguity;
: input file parsing ambiguity.
: clash with PyTorch parameter/buffer naming convention/
: separator reserved for nested variable nameIn the input file, the separator /
is used to denote nested variable names. For example, A/B/foo
specifies a variable named "foo" defined on the sub-axis named "B" which is a nested sub-axis of "A".
In NEML2 source code, the following naming conventions are recommended:
ep
. However, if the member variable is protected or private, it is recommended to prefix it with an underscore, i.e. _ep
.PascalCase
.snake_case
.