SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy > Class Template Reference

#include <AssemblingMatrixAccumulator.h>

Inheritance diagram for sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >:

Detailed Description

template<core::matrixaccumulator::Contribution c, class TStrategy = sofa::core::matrixaccumulator::NoIndexVerification>
class sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >

Local matrix component associated to force fields, masses and mappings

They are associated to components by the assembling matrix system @MatrixLinearSystem. AssemblingMatrixAccumulator is not added to the factory. It is not up to the user to add this component in the scene graph.

@AssemblingMatrixAccumulator inherits from @MatrixAccumulatorInterface and is defined as a child of components. This allows components to add their contributions to the global matrix through their associated local matrices.

This matrix accumulator has a direct link to the global matrix so it can add its contributions directly into it. It also knows where to add in the matrix using an offset parameter, set by the assembling matrix system.

Static Public Attributes

static constexpr core::matrixaccumulator::Contribution contribution = c
 

Public Member Functions

 SOFA_CLASS (AssemblingMatrixAccumulator, SOFA_TEMPLATE2(sofa::core::MatrixAccumulatorIndexChecker, BaseAssemblingMatrixAccumulator< c >, TStrategy))
 
void clear () override
 
- Public Member Functions inherited from sofa::core::MatrixAccumulatorIndexChecker< BaseAssemblingMatrixAccumulator< c >, sofa::core::matrixaccumulator::NoIndexVerification >
 SOFA_CLASS (MatrixAccumulatorIndexChecker, BaseAssemblingMatrixAccumulator< c >)
 
void setIndexCheckerStrategy (std::shared_ptr< matrixaccumulator::IndexVerificationStrategy > strategy) override
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const float value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, double value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const sofa::type::Mat< 2, 2, float > &value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const sofa::type::Mat< 2, 2, double > &value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const sofa::type::Mat< 3, 3, float > &value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const sofa::type::Mat< 3, 3, double > &value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const sofa::type::Mat< 6, 6, float > &value) override final
 
void add (const sofa::SignedIndex row, const sofa::SignedIndex col, const sofa::type::Mat< 6, 6, double > &value) override final
 

Static Public Member Functions

static std::string GetCustomTemplateName ()
 

Protected Member Functions

void add (const core::matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, float value) override
 
void add (const core::matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, double value) override
 
void add (const core::matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat< 3, 3, float > &value) override
 
void add (const core::matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat< 3, 3, double > &value) override
 
void add (const core::matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat< 6, 6, float > &value) override
 
void add (const core::matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat< 6, 6, double > &value) override
 
- Protected Member Functions inherited from sofa::core::MatrixAccumulatorIndexChecker< BaseAssemblingMatrixAccumulator< c >, sofa::core::matrixaccumulator::NoIndexVerification >
virtual void add (const matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat< 2, 2, float > &value)
 
virtual void add (const matrixaccumulator::no_check_policy &, sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat< 2, 2, double > &value)
 
void indexCheckedAdd (sofa::SignedIndex row, sofa::SignedIndex col, const T &value)
 

Additional Inherited Members

- Public Attributes inherited from sofa::core::MatrixAccumulatorIndexChecker< BaseAssemblingMatrixAccumulator< c >, sofa::core::matrixaccumulator::NoIndexVerification >
std::shared_ptr< matrixaccumulator::IndexVerificationStrategyindexVerificationStrategy
 

Attribute details

◆ contribution

template<core::matrixaccumulator::Contribution c, class TStrategy = sofa::core::matrixaccumulator::NoIndexVerification>
constexpr core::matrixaccumulator::Contribution sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >::contribution = c
staticconstexpr

Function details

◆ add() [1/6]

◆ add() [2/6]

◆ add() [3/6]

template<sofa::core::matrixaccumulator::Contribution c, class TStrategy >
void sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >::add ( const core::matrixaccumulator::no_check_policy ,
sofa::SignedIndex  row,
sofa::SignedIndex  col,
const sofa::type::Mat< 6, 6, double > &  value 
)
overrideprotectedvirtual

◆ add() [4/6]

template<sofa::core::matrixaccumulator::Contribution c, class TStrategy >
void sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >::add ( const core::matrixaccumulator::no_check_policy ,
sofa::SignedIndex  row,
sofa::SignedIndex  col,
const sofa::type::Mat< 6, 6, float > &  value 
)
overrideprotectedvirtual

◆ add() [5/6]

◆ add() [6/6]

◆ clear()

template<sofa::core::matrixaccumulator::Contribution c, class TStrategy >
void sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >::clear
override

◆ GetCustomTemplateName()

template<core::matrixaccumulator::Contribution c, class TStrategy = sofa::core::matrixaccumulator::NoIndexVerification>
static std::string sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >::GetCustomTemplateName ( )
inlinestatic

◆ SOFA_CLASS()

template<core::matrixaccumulator::Contribution c, class TStrategy = sofa::core::matrixaccumulator::NoIndexVerification>
sofa::component::linearsystem::AssemblingMatrixAccumulator< c, TStrategy >::SOFA_CLASS ( AssemblingMatrixAccumulator< c, TStrategy >  ,
SOFA_TEMPLATE2(sofa::core::MatrixAccumulatorIndexChecker, BaseAssemblingMatrixAccumulator< c >, TStrategy)   
)