SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::linearsystem::CreateMatrixDispatcher< c > Struct Template Referenceabstract

#include <CreateMatrixDispatcher.h>

Detailed Description

template<core::matrixaccumulator::Contribution c>
struct sofa::component::linearsystem::CreateMatrixDispatcher< c >

Helper class used in matrix assembly, containing some factory methods that must be overriden to define the type of local matrices.

Public Member Functions

virtual ~CreateMatrixDispatcher ()=default
 
BaseAssemblingMatrixAccumulator< c >::SPtr createLocalMatrix (const bool withIndexChecking) const
 Create a local matrix object for non-mapped components. More...
 
virtual BaseAssemblingMatrixAccumulator< c >::SPtr createLocalMappedMatrix ()=0
 Create a local matrix object for mapped components. More...
 

Protected Member Functions

virtual BaseAssemblingMatrixAccumulator< c >::SPtr createLocalMatrix () const =0
 
virtual BaseAssemblingMatrixAccumulator< c >::SPtr createLocalMatrixWithIndexChecking () const =0
 

Constructor details

◆ ~CreateMatrixDispatcher()

template<core::matrixaccumulator::Contribution c>
virtual sofa::component::linearsystem::CreateMatrixDispatcher< c >::~CreateMatrixDispatcher ( )
virtualdefault

Function details

◆ createLocalMappedMatrix()

template<core::matrixaccumulator::Contribution c>
virtual BaseAssemblingMatrixAccumulator<c>::SPtr sofa::component::linearsystem::CreateMatrixDispatcher< c >::createLocalMappedMatrix ( )
pure virtual

Create a local matrix object for mapped components.

Returns
A pointer to a local matrix

◆ createLocalMatrix() [1/2]

template<core::matrixaccumulator::Contribution c>
virtual BaseAssemblingMatrixAccumulator<c>::SPtr sofa::component::linearsystem::CreateMatrixDispatcher< c >::createLocalMatrix ( ) const
protectedpure virtual

◆ createLocalMatrix() [2/2]

template<core::matrixaccumulator::Contribution c>
BaseAssemblingMatrixAccumulator<c>::SPtr sofa::component::linearsystem::CreateMatrixDispatcher< c >::createLocalMatrix ( const bool  withIndexChecking) const
inline

Create a local matrix object for non-mapped components.

Parameters
withIndexCheckingIf true, the returned local matrix checks the indices before inserting the contributions into the matrix.
Returns
A pointer to a local matrix

◆ createLocalMatrixWithIndexChecking()

template<core::matrixaccumulator::Contribution c>
virtual BaseAssemblingMatrixAccumulator<c>::SPtr sofa::component::linearsystem::CreateMatrixDispatcher< c >::createLocalMatrixWithIndexChecking ( ) const
protectedpure virtual