NEML2 2.1.0
Loading...
Searching...
No Matches

Detailed Description

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, TensorValuenamed_buffers (self)
dict[str, TensorValuenamed_parameters (self)
dict[str, Modelnamed_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)

Member Function Documentation

◆ __getattr__()

TensorValue __getattr__ ( self,
str arg0 )
Get a model parameter given its name

◆ __setattr__()

None __setattr__ ( self,
str arg0,
neml2.TensorLike arg1 )
Set the value for a model parameter

◆ __str__()

str __str__ ( self)

◆ dvalue()

dict[str, dict[str, neml2.Tensor]] dvalue ( self,
dict arg0 )

◆ get_parameter()

TensorValue get_parameter ( self,
str arg0 )
Get a model parameter given its name

◆ input_type()

neml2.tensors.TensorType input_type ( self,
str variable )
Introspect the underlying tensor type of an input variable. @returns tensors.TensorType

◆ input_variables()

list[str] input_variables ( self)
Input variables of the model.

◆ named_buffers()

dict[str, TensorValue] named_buffers ( self)
Get the model buffers. The keys of the returned dictionary are the buffers' names.

◆ named_parameters()

dict[str, TensorValue] named_parameters ( self)
Get the model parameters. The keys of the returned dictionary are the parameters' names.

◆ named_submodels()

dict[str, Model] named_submodels ( self)
Get the sub-models registered to this model

◆ output_type()

neml2.tensors.TensorType output_type ( self,
str variable )
Introspect the underlying tensor type of an output variable. @returns tensors.TensorType

◆ output_variables()

list[str] output_variables ( self)
Output variables of the model.

◆ set_output_derivative_filter()

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.

◆ set_parameter()

None set_parameter ( self,
str arg0,
neml2.TensorLike arg1 )
Set the value for a model parameter

◆ set_parameters()

None set_parameters ( self,
dict[str, neml2.TensorLike] arg0 )
Set the values for multiple model parameters 

◆ to()

None to ( self,
* ,
torch.dtype dtype = ...,
torch.device device = ...,
bool requires_grad = False )

◆ type()

str type ( self)
Type of the model

◆ value()

dict[str, neml2.Tensor] value ( self,
dict arg0 )

◆ value_and_dvalue()

tuple[dict[str, neml2.Tensor], dict[str, dict[str, neml2.Tensor]]] value_and_dvalue ( self,
dict arg0 )

◆ zero_undefined_input()

None zero_undefined_input ( self)
Zero undefined input variables