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

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

Detailed Description

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

#include <Assembler.h>

Public Member Functions

 VectorAssembler (const LabeledAxis &axis)
 
Tensor assemble_by_variable (const ValueMap &) const
 Assemble a vector of vectors (by variables)
 
ValueMap split_by_variable (const Tensor &) const
 Split the vector (by variables)
 
ValueMap split_by_subaxis (const Tensor &) const
 Split the vector (by subaxes)
 

Constructor & Destructor Documentation

◆ VectorAssembler()

VectorAssembler ( const LabeledAxis & axis)
inline

Member Function Documentation

◆ assemble_by_variable()

Tensor assemble_by_variable ( const ValueMap & vals_dict) const

Assemble a vector of vectors (by variables)

◆ split_by_subaxis()

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

Split the vector (by subaxes)

◆ split_by_variable()

ValueMap split_by_variable ( const Tensor & tensor) const

Split the vector (by variables)