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

Detailed Description

Nonlinear system wrapper for models.

Public Member Functions

AssembledMatrix A (self)
tuple[AssembledMatrix, AssembledMatrixA_and_B (self)
tuple[AssembledMatrix, AssembledMatrix, AssembledVectorA_and_B_and_b (self)
tuple[AssembledMatrix, AssembledVectorA_and_b (self)
neml2.core.TensorValue __getattr__ (self, str arg0)
None __setattr__ (self, str arg0, neml2.TensorLike arg1)
AssembledVector b (self)
AxisLayout blayout (self)
AssembledVector g (self)
neml2.core.TensorValue get_parameter (self, str arg0)
AxisLayout glayout (self)
neml2.core.Model model (self)
dict[str, neml2.core.TensorValuenamed_buffers (self)
dict[str, neml2.core.TensorValuenamed_parameters (self)
None set_g (self, AssembledVector g)
None set_parameter (self, str arg0, neml2.TensorLike arg1)
None set_parameters (self, dict[str, neml2.TensorLike] arg0)
None set_u (self, AssembledVector u)
None to (self, *, torch.dtype dtype=..., torch.device device=..., bool requires_grad=False)
AssembledVector u (self)
AxisLayout ulayout (self)

Member Function Documentation

◆ __getattr__()

neml2.core.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

◆ A()

AssembledMatrix A ( self)
Get the system matrix for this nonlinear system

◆ A_and_B()

tuple[AssembledMatrix, AssembledMatrix] A_and_B ( self)
Get the system matrix and the auxiliary system matrix for this nonlinear system

◆ A_and_b()

tuple[AssembledMatrix, AssembledVector] A_and_b ( self)
Get the system matrix and the right-hand side vector for this nonlinear system

◆ A_and_B_and_b()

tuple[AssembledMatrix, AssembledMatrix, AssembledVector] A_and_B_and_b ( self)
Get the system matrix, auxiliary system matrix, and the right-hand side vector for this nonlinear system

◆ b()

AssembledVector b ( self)
Get the right-hand side vector for this nonlinear system

◆ blayout()

AxisLayout blayout ( self)
Get the ID-to-RHS-shape mapping for this nonlinear system

◆ g()

AssembledVector g ( self)
Get the given variables for this nonlinear system

◆ get_parameter()

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

◆ glayout()

AxisLayout glayout ( self)
Get the ID-to-given-base-shape mapping for this nonlinear system

◆ model()

neml2.core.Model model ( self)
Get the model defining this nonlinear system

◆ named_buffers()

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

◆ named_parameters()

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

◆ set_g()

None set_g ( self,
AssembledVector g )
Set the given variables for this nonlinear system

◆ 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 

◆ set_u()

None set_u ( self,
AssembledVector u )
Set the unknowns for this nonlinear system

◆ to()

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

◆ u()

AssembledVector u ( self)
Get the unknowns for this nonlinear system

◆ ulayout()

AxisLayout ulayout ( self)
Get the ID-to-unknown-base-shape mapping for this nonlinear system