NEML2 2.1.0
Loading...
Searching...
No Matches
NonlinearSystem Class Reference

Detailed Description

Nonlinear system wrapper for models.

Public Member Functions

list[neml2.TensorA (self)
tuple[list[neml2.Tensor], list[neml2.Tensor]] A_and_B (self)
tuple[list[neml2.Tensor], list[neml2.Tensor], list[neml2.Tensor]] A_and_B_and_b (self)
tuple[list[neml2.Tensor], list[neml2.Tensor]] A_and_b (self)
TensorValue __getattr__ (self, str arg0)
None __setattr__ (self, str arg0, neml2.Tensor arg1)
list[neml2.Tensorb (self)
list[tuple[int,...]] blayout (self)
list[VariableName|str] bmap (self)
list[neml2.Tensorg (self)
TensorValue get_parameter (self, str arg0)
list[tuple[int,...]] glayout (self)
list[VariableName|str] gmap (self)
list[tuple[int,...]] intmd_blayout (self)
list[tuple[int,...]] intmd_glayout (self)
list[tuple[int,...]] intmd_ulayout (self)
Model model (self)
dict[str, TensorValuenamed_buffers (self)
dict[str, TensorValuenamed_parameters (self)
None set_g (self, list[neml2.Tensor] g)
None set_parameter (self, str arg0, neml2.Tensor arg1)
None set_parameters (self, dict[str, neml2.Tensor] arg0)
None set_u (self, list[neml2.Tensor] u)
None to (self, *, torch.dtype dtype=..., torch.device device=..., bool requires_grad=False)
list[neml2.Tensoru (self)
list[tuple[int,...]] ulayout (self)
list[VariableName|str] umap (self)
int m (self)
int n (self)
int p (self)

Member Function Documentation

◆ __getattr__()

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

◆ __setattr__()

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

◆ A()

list[neml2.Tensor] A ( self)
Get the system matrix for this nonlinear system

◆ A_and_B()

tuple[list[neml2.Tensor], list[neml2.Tensor]] A_and_B ( self)
Get the auxiliary system matrix for this nonlinear system

◆ A_and_b()

tuple[list[neml2.Tensor], list[neml2.Tensor]] A_and_b ( self)
Get the system matrix and the right-hand side vector for this nonlinear system

◆ A_and_B_and_b()

tuple[list[neml2.Tensor], list[neml2.Tensor], list[neml2.Tensor]] A_and_B_and_b ( self)
Get the auxiliary system matrix for this nonlinear system

◆ b()

list[neml2.Tensor] b ( self)
Get the right-hand side vector for this nonlinear system

◆ blayout()

list[tuple[int, ...]] blayout ( self)
Get the ID-to-RHS-shape mapping for this nonlinear system

◆ bmap()

list[VariableName | str] bmap ( self)
Get the ID-to-RHS mapping for this nonlinear system

◆ g()

list[neml2.Tensor] g ( self)
Get the given variables for this nonlinear system

◆ get_parameter()

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

◆ glayout()

list[tuple[int, ...]] glayout ( self)
Get the ID-to-given-base-shape mapping for this nonlinear system

◆ gmap()

list[VariableName | str] gmap ( self)
Get the ID-to-given mapping for this nonlinear system

◆ intmd_blayout()

list[tuple[int, ...]] intmd_blayout ( self)
Get the ID-to-RHS-intermediate-shape mapping for this nonlinear system

◆ intmd_glayout()

list[tuple[int, ...]] intmd_glayout ( self)
Get the ID-to-given-intermediate-shape mapping for this nonlinear system

◆ intmd_ulayout()

list[tuple[int, ...]] intmd_ulayout ( self)
Get the ID-to-unknown-intermediate-shape mapping for this nonlinear system

◆ m()

int m ( self)
Number of rows of blocks in the system

◆ model()

Model model ( self)
Get the model defining this nonlinear system

◆ n()

int n ( self)
Number of columns of blocks in the system

◆ 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.

◆ p()

int p ( self)
Number of columns of blocks in the auxiliary system

◆ set_g()

None set_g ( self,
list[neml2.Tensor] g )
Set the given variables for this nonlinear system

◆ set_parameter()

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

◆ set_parameters()

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

◆ set_u()

None set_u ( self,
list[neml2.Tensor] u )
Set the unknowns for this nonlinear system

◆ to()

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

◆ u()

list[neml2.Tensor] u ( self)
Get the unknowns for this nonlinear system

◆ ulayout()

list[tuple[int, ...]] ulayout ( self)
Get the ID-to-unknown-base-shape mapping for this nonlinear system

◆ umap()

list[VariableName | str] umap ( self)
Get the ID-to-unknown mapping for this nonlinear system