SOFA API  4006d812
Open source framework for multi-physics simuation
sofa::simulation::MappingJacobians< JacobianMatrixType > Class Template Reference

#include <MappingGraph.h>

Manages Jacobian matrix contributions for a single mechanical state. More...

Detailed Description

template<class JacobianMatrixType>
class sofa::simulation::MappingJacobians< JacobianMatrixType >

Manages Jacobian matrix contributions for a single mechanical state.

This class holds and retrieves the Jacobian matrices calculated during graph construction. It maps input states (which require Jacobians) to their corresponding Jacobian calculation object.

Template Parameters
JacobianMatrixTypeThe concrete type used for the Jacobian matrix structure.

Public Member Functions

 MappingJacobians ()=delete
 Deleted constructor enforces usage via the parameterized constructor. More...
 
 MappingJacobians (const core::behavior::BaseMechanicalState &mappedState)
 Constructs the Jacobian manager for a specific mechanical state. More...
 
void addJacobianToTopMostParent (std::shared_ptr< JacobianMatrixType > jacobian, core::behavior::BaseMechanicalState *topMostParent)
 Associates a calculated Jacobian matrix with a top-most parent state. More...
 
std::shared_ptr< JacobianMatrixType > getJacobianFrom (core::behavior::BaseMechanicalState *mstate) const
 Retrieves the Jacobian matrix associated with a given mechanical state. More...
 

Constructor details

◆ MappingJacobians() [1/2]

template<class JacobianMatrixType >
sofa::simulation::MappingJacobians< JacobianMatrixType >::MappingJacobians ( )
delete

Deleted constructor enforces usage via the parameterized constructor.

◆ MappingJacobians() [2/2]

template<class JacobianMatrixType >
sofa::simulation::MappingJacobians< JacobianMatrixType >::MappingJacobians ( const core::behavior::BaseMechanicalState mappedState)
inline

Constructs the Jacobian manager for a specific mechanical state.

Parameters
mappedStateReference to the mechanical state being managed.

Function details

◆ addJacobianToTopMostParent()

template<class JacobianMatrixType >
void sofa::simulation::MappingJacobians< JacobianMatrixType >::addJacobianToTopMostParent ( std::shared_ptr< JacobianMatrixType >  jacobian,
core::behavior::BaseMechanicalState topMostParent 
)
inline

Associates a calculated Jacobian matrix with a top-most parent state.

Parameters
jacobianThe shared pointer to the Jacobian matrix.
topMostParentThe mechanical state that uses this Jacobian as input.

◆ getJacobianFrom()

template<class JacobianMatrixType >
std::shared_ptr<JacobianMatrixType> sofa::simulation::MappingJacobians< JacobianMatrixType >::getJacobianFrom ( core::behavior::BaseMechanicalState mstate) const
inline

Retrieves the Jacobian matrix associated with a given mechanical state.

Parameters
mstateThe state whose Jacobian is requested.
Returns
A shared pointer to the Jacobian, or nullptr if not found.