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

Detailed Description

Sparse representation of a matrix as a 2D list of tensors and their layout

Public Member Functions

None __init__ (self)
None __init__ (self, AxisLayout row_layout, AxisLayout col_layout)
None __init__ (self, AxisLayout row_layout, AxisLayout col_layout, list[list[neml2.tensors.Tensor]] tensors)
AssembledMatrix assemble (self)
SparseMatrix group (self, int i, int j)
AxisLayout col_layout (self)
None col_layout (self, AxisLayout arg0)
AxisLayout row_layout (self)
None row_layout (self, AxisLayout arg0)
list[list[neml2.tensors.Tensor]] tensors (self)
None tensors (self, list[list[neml2.tensors.Tensor]] arg0)

Constructor & Destructor Documentation

◆ __init__() [1/3]

None __init__ ( self)

◆ __init__() [2/3]

None __init__ ( self,
AxisLayout row_layout,
AxisLayout col_layout )

◆ __init__() [3/3]

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

Member Function Documentation

◆ assemble()

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

◆ col_layout() [1/2]

AxisLayout col_layout ( self)
Column layout of the tensors

◆ col_layout() [2/2]

None col_layout ( self,
AxisLayout arg0 )

◆ group()

SparseMatrix group ( self,
int i,
int j )
Semi-contiguous view of block (i, j)

◆ row_layout() [1/2]

AxisLayout row_layout ( self)
Row layout of the tensors

◆ row_layout() [2/2]

None row_layout ( self,
AxisLayout arg0 )

◆ tensors() [1/2]

list[list[neml2.tensors.Tensor]] tensors ( self)
2D list of tensors, indexed by [row variable][col variable]

◆ tensors() [2/2]

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