SOFA API  b11f9b8c
Open source framework for multi-physics simuation
sofa::component::linearsystem::MappedMassMatrixObserver< Real > Struct Template Reference

#include <MappedMassMatrixObserver.h>

Detailed Description

template<class Real>
struct sofa::component::linearsystem::MappedMassMatrixObserver< Real >

Pre-compute the mapped mass matrix assuming it is constant and store it. Support cache invalidation

Public Attributes

BaseAssemblingMatrixAccumulator< core::matrixaccumulator::Contribution::MASS > * accumulator { nullptr }
 The mass accumulator associated to the observable mass. More...
 
std::shared_ptr< linearalgebra::CompressedRowSparseMatrix< Real > > m_invariantMassMatrix
 
Data< linearalgebra::CompressedRowSparseMatrix< Real > > m_invariantProjectedMassMatrix
 

Protected Attributes

core::DataTracker m_dataTracker
 
core::behavior::BaseMassm_observedMass { nullptr }
 
core::behavior::BaseMechanicalStatem_mstate { nullptr }
 The state associated to the observable mass. More...
 
bool m_newObservables = true
 

Public Member Functions

void observe (core::behavior::BaseMass *mass)
 The provided mass is observed to track cache invalidation. More...
 
void observe (core::BaseMapping *mapping)
 
void observe (core::behavior::BaseMechanicalState *mstate)
 The provided state (associated to the mass) is observed to track cache invalidation. More...
 
core::behavior::BaseMassgetObservableMass () const
 Return the observable mass. More...
 
core::behavior::BaseMechanicalStategetObservableState () const
 Return the observable state. More...
 
bool hasObservableChanged ()
 Return true if the tracking of the observables noticed a change since the last call. More...
 

Attribute details

◆ accumulator

The mass accumulator associated to the observable mass.

◆ m_dataTracker

template<class Real >
core::DataTracker sofa::component::linearsystem::MappedMassMatrixObserver< Real >::m_dataTracker
protected

◆ m_invariantMassMatrix

template<class Real >
std::shared_ptr<linearalgebra::CompressedRowSparseMatrix<Real> > sofa::component::linearsystem::MappedMassMatrixObserver< Real >::m_invariantMassMatrix

◆ m_invariantProjectedMassMatrix

◆ m_mstate

The state associated to the observable mass.

◆ m_newObservables

template<class Real >
bool sofa::component::linearsystem::MappedMassMatrixObserver< Real >::m_newObservables = true
protected

◆ m_observedMass

template<class Real >
core::behavior::BaseMass* sofa::component::linearsystem::MappedMassMatrixObserver< Real >::m_observedMass { nullptr }
protected

Function details

◆ getObservableMass()

Return the observable mass.

◆ getObservableState()

Return the observable state.

◆ hasObservableChanged()

template<class Real >
bool sofa::component::linearsystem::MappedMassMatrixObserver< Real >::hasObservableChanged

Return true if the tracking of the observables noticed a change since the last call.

◆ observe() [1/3]

template<class Real >
void sofa::component::linearsystem::MappedMassMatrixObserver< Real >::observe ( core::BaseMapping mapping)

◆ observe() [2/3]

The provided mass is observed to track cache invalidation.

◆ observe() [3/3]

The provided state (associated to the mass) is observed to track cache invalidation.