|
NEML2 2.1.0
|
The canonical type for constitutive models in NEML2.
Public Member Functions | |
| TensorValue | __getattr__ (self, str arg0) |
| None | __setattr__ (self, str arg0, neml2.TensorLike arg1) |
| str | __str__ (self) |
| dict[str, dict[str, neml2.Tensor]] | dvalue (self, dict arg0) |
| TensorValue | get_parameter (self, str arg0) |
| neml2.tensors.TensorType | input_type (self, str variable) |
| list[str] | input_variables (self) |
| dict[str, TensorValue] | named_buffers (self) |
| dict[str, TensorValue] | named_parameters (self) |
| dict[str, Model] | named_submodels (self) |
| neml2.tensors.TensorType | output_type (self, str variable) |
| list[str] | output_variables (self) |
| None | set_output_derivative_filter (self, list[tuple[str, str]] derivs) |
| None | set_parameter (self, str arg0, neml2.TensorLike arg1) |
| None | set_parameters (self, dict[str, neml2.TensorLike] arg0) |
| None | to (self, *, torch.dtype dtype=..., torch.device device=..., bool requires_grad=False) |
| dict[str, neml2.Tensor] | value (self, dict arg0) |
| tuple[dict[str, neml2.Tensor], dict[str, dict[str, neml2.Tensor]]] | value_and_dvalue (self, dict arg0) |
| None | zero_undefined_input (self) |
| str | type (self) |
| TensorValue __getattr__ | ( | self, | |
| str | arg0 ) |
Get a model parameter given its name
| None __setattr__ | ( | self, | |
| str | arg0, | ||
| neml2.TensorLike | arg1 ) |
Set the value for a model parameter
| str __str__ | ( | self | ) |
| dict[str, dict[str, neml2.Tensor]] dvalue | ( | self, | |
| dict | arg0 ) |
| TensorValue get_parameter | ( | self, | |
| str | arg0 ) |
Get a model parameter given its name
| neml2.tensors.TensorType input_type | ( | self, | |
| str | variable ) |
Introspect the underlying tensor type of an input variable. @returns tensors.TensorType
| list[str] input_variables | ( | self | ) |
Input variables of the model.
| dict[str, TensorValue] named_buffers | ( | self | ) |
Get the model buffers. The keys of the returned dictionary are the buffers' names.
| dict[str, TensorValue] named_parameters | ( | self | ) |
Get the model parameters. The keys of the returned dictionary are the parameters' names.
| dict[str, Model] named_submodels | ( | self | ) |
Get the sub-models registered to this model
| neml2.tensors.TensorType output_type | ( | self, | |
| str | variable ) |
Introspect the underlying tensor type of an output variable. @returns tensors.TensorType
| list[str] output_variables | ( | self | ) |
Output variables of the model.
| None set_output_derivative_filter | ( | self, | |
| list[tuple[str, str]] | derivs ) |
Filter which (output, input) derivative pairs are computed and returned by dvalue and value_and_dvalue. Pass an empty list to clear the filter and compute all derivatives.
| None set_parameter | ( | self, | |
| str | arg0, | ||
| neml2.TensorLike | arg1 ) |
Set the value for a model parameter
| None set_parameters | ( | self, | |
| dict[str, neml2.TensorLike] | arg0 ) |
Set the values for multiple model parameters
| None to | ( | self, | |
| * | , | ||
| torch.dtype | dtype = ..., | ||
| torch.device | device = ..., | ||
| bool | requires_grad = False ) |
| str type | ( | self | ) |
Type of the model
| dict[str, neml2.Tensor] value | ( | self, | |
| dict | arg0 ) |
| tuple[dict[str, neml2.Tensor], dict[str, dict[str, neml2.Tensor]]] value_and_dvalue | ( | self, | |
| dict | arg0 ) |
| None zero_undefined_input | ( | self | ) |
Zero undefined input variables