NEML2 2.0.0
Loading...
Searching...
No Matches
MatrixAssembler Class Reference

Helper to assemble a matrix of tensors into a single tensor and also to split a tensor into a map of map of tensors. More...

Detailed Description

Helper to assemble a matrix of tensors into a single tensor and also to split a tensor into a map of map of tensors.

#include <Assembler.h>

Public Member Functions

 MatrixAssembler (const LabeledAxis &yaxis, const LabeledAxis &xaxis)
 
Tensor assemble_by_variable (const DerivMap &, bool assembly=true) const
 
DerivMap split_by_variable (const Tensor &, bool assembly=true) const
 
DerivMap split_by_subaxis (const Tensor &) const
 Split the matrix (by subaxes)
 
const LabeledAxisyaxis () const
 Get the y-axis used for assembly/splitting.
 
const LabeledAxisxaxis () const
 Get the x-axis used for assembly/splitting.
 

Constructor & Destructor Documentation

◆ MatrixAssembler()

MatrixAssembler ( const LabeledAxis & yaxis,
const LabeledAxis & xaxis )
inline

Member Function Documentation

◆ assemble_by_variable()

Tensor assemble_by_variable ( const DerivMap & vals_dict,
bool assembly = true ) const

Assemble a matrix of matrices (by variables) assembly indicates whether the variables are in assembly format

◆ split_by_subaxis()

std::map< SubaxisName, std::map< SubaxisName, Tensor > > split_by_subaxis ( const Tensor & tensor) const

Split the matrix (by subaxes)

◆ split_by_variable()

DerivMap split_by_variable ( const Tensor & tensor,
bool assembly = true ) const

Split the matrix (by variables) assembly indicates whether the split variables are returned in assembly format

◆ xaxis()

const LabeledAxis & xaxis ( ) const
inline

Get the x-axis used for assembly/splitting.

◆ yaxis()

const LabeledAxis & yaxis ( ) const
inline

Get the y-axis used for assembly/splitting.