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

Detailed Description

Sparse representation of a vector as a list of tensors and their layout

Public Member Functions

None __init__ (self)
None __init__ (self, AxisLayout layout)
None __init__ (self, AxisLayout layout, list[neml2.tensors.Tensor] tensors)
AssembledVector assemble (self)
SparseVector group (self, int i)
AxisLayout layout (self)
None layout (self, AxisLayout arg0)
list[neml2.tensors.Tensortensors (self)
None tensors (self, list[neml2.tensors.Tensor] arg0)

Constructor & Destructor Documentation

◆ __init__() [1/3]

None __init__ ( self)

◆ __init__() [2/3]

None __init__ ( self,
AxisLayout layout )

◆ __init__() [3/3]

None __init__ ( self,
AxisLayout layout,
list[neml2.tensors.Tensor] tensors )

Member Function Documentation

◆ assemble()

AssembledVector assemble ( self)
Assemble the tensors into a dense AssembledVector

◆ group()

SparseVector group ( self,
int i )
Contiguous view of variable group i

◆ layout() [1/2]

AxisLayout layout ( self)
Layout of the tensors

◆ layout() [2/2]

None layout ( self,
AxisLayout arg0 )

◆ tensors() [1/2]

list[neml2.tensors.Tensor] tensors ( self)
List of tensors, one per variable

◆ tensors() [2/2]

None tensors ( self,
list[neml2.tensors.Tensor] arg0 )