SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::mass::AddMToMatrixFunctor< Deriv, MassType, MatrixType > Struct Template Reference

#include <AddMToMatrixFunctor.h>

Detailed Description

template<class Deriv, class MassType, class MatrixType>
struct sofa::component::mass::AddMToMatrixFunctor< Deriv, MassType, MatrixType >

Helper struct to add entries in a matrix, based on the type of Mass (MassType).

This class is specialized for Rigid types.

The default implementation assumes it deals with Vec types: Deriv is a Vec type, and MassType is a floating point.

Public Member Functions

void operator() (MatrixType *mat, MassType mass, int pos, MassType fact)
 
void operator() (MatrixType *mat, MassType mass, int posRow, int posColumn, MassType fact)
 Method to add non-diagonal terms. More...
 

Function details

◆ operator()() [1/2]

template<class Deriv , class MassType , class MatrixType >
void sofa::component::mass::AddMToMatrixFunctor< Deriv, MassType, MatrixType >::operator() ( MatrixType *  mat,
MassType  mass,
int  pos,
MassType  fact 
)
inline

◆ operator()() [2/2]

template<class Deriv , class MassType , class MatrixType >
void sofa::component::mass::AddMToMatrixFunctor< Deriv, MassType, MatrixType >::operator() ( MatrixType *  mat,
MassType  mass,
int  posRow,
int  posColumn,
MassType  fact 
)
inline

Method to add non-diagonal terms.