SOFA API  b0896a42
Open source framework for multi-physics simuation
sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut > Class Template Reference

#include <DeformableOnRigidFrameMapping.h>

Inheritance diagram for sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >:

Public Attributes

OutVecCoord rotatedPoints
 
DeformableOnRigidFrameMappingInternalData< In, Outdata
 
sofa::core::objectmodel::RenamedData< unsigned > index
 
sofa::core::objectmodel::RenamedData< boolindexFromEnd
 
sofa::core::objectmodel::RenamedData< sofa::type::vector< unsigned int > > repartition
 
sofa::core::objectmodel::RenamedData< boolglobalToLocalCoords
 
sofa::core::objectmodel::RenamedData< Realm_rootAngularForceScaleFactor
 
sofa::core::objectmodel::RenamedData< Realm_rootLinearForceScaleFactor
 
Data< unsigned int > d_index
 input DOF index More...
 
Data< boold_indexFromEnd
 input DOF index starts from the end of input DOFs vector More...
 
Data< sofa::type::vector< unsigned int > > d_repartition
 number of dest dofs per entry dof More...
 
Data< boold_globalToLocalCoords
 are the output DOFs initially expressed in global coordinates More...
 
Data< Reald_rootAngularForceScaleFactor
 Scale factor applied on the angular force accumulated on the rigid model. More...
 
Data< Reald_rootLinearForceScaleFactor
 Scale factor applied on the linear force accumulated on the rigid model. More...
 

Protected Attributes

core::State< In > * m_fromModel
 
core::State< Out > * m_toModel
 
core::State< InRoot > * m_fromRootModel
 
InRootCoord rootX
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE3(DeformableOnRigidFrameMapping, TIn, TInRoot, TOut), SOFA_TEMPLATE3(LinearMulti2Mapping, TIn, TInRoot, TOut))
 
int addPoint (const OutCoord &c)
 
int addPoint (const OutCoord &c, int indexFrom)
 
void init () override
 
void handleTopologyChange (core::topology::Topology *t) override
 
bool sameTopology () const override
 
void apply (OutVecCoord &out, const InVecCoord &in, const InRootVecCoord *inroot)
 
void apply (const core::MechanicalParams *, const type::vector< OutDataVecCoord * > &dataVecOutPos, const type::vector< const InDataVecCoord * > &dataVecInPos, const type::vector< const InRootDataVecCoord * > &dataVecInRootPos) override
 
void applyJ (OutVecDeriv &out, const InVecDeriv &in, const InRootVecDeriv *inroot)
 
void applyJ (const core::MechanicalParams *, const type::vector< OutDataVecDeriv * > &dataVecOutVel, const type::vector< const InDataVecDeriv * > &dataVecInVel, const type::vector< const InRootDataVecDeriv * > &dataVecInRootVel) override
 
void applyJT (InVecDeriv &out, const OutVecDeriv &in, InRootVecDeriv *outroot)
 
void applyJT (const core::MechanicalParams *, const type::vector< InDataVecDeriv * > &dataVecOutForce, const type::vector< InRootDataVecDeriv * > &dataVecOutRootForce, const type::vector< const OutDataVecDeriv * > &dataVecInForce) override
 
void applyDJT (const core::MechanicalParams *mparams, core::MultiVecDerivId inForce, core::ConstMultiVecDerivId outForce) override
 
void applyJT (InMatrixDeriv &out, const OutMatrixDeriv &in, InRootMatrixDeriv *outroot)
 
void applyJT (const core::ConstraintParams *, const type::vector< InDataMatrixDeriv * > &dataMatOutConst, const type::vector< InRootDataMatrixDeriv * > &dataMatOutRootConst, const type::vector< const OutDataMatrixDeriv * > &dataMatInConst) override
 
void recomputeRigidMass ()
 MAP the mass: this function recompute the rigid mass (gravity center position and inertia) of the object based on its deformed shape. More...
 
void draw (const core::visual::VisualParams *vparams) override
 
void clear (int reserve=0)
 
void setRepartition (unsigned int value)
 
void setRepartition (sofa::type::vector< unsigned int > values)
 
- Public Member Functions inherited from sofa::component::mapping::linear::crtp::CRTPLinearMapping< TMapping >
 SOFA_CLASS (SOFA_TEMPLATE(CRTPLinearMapping, TMapping), TMapping)
 
virtual bool isLinear () const override
 

Protected Member Functions

 DeformableOnRigidFrameMapping ()
 
virtual ~DeformableOnRigidFrameMapping ()
 

Attribute details

◆ d_globalToLocalCoords

template<class TIn , class TInRoot , class TOut >
Data< bool > sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::d_globalToLocalCoords

are the output DOFs initially expressed in global coordinates

◆ d_index

template<class TIn , class TInRoot , class TOut >
Data<unsigned int> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::d_index

input DOF index

◆ d_indexFromEnd

template<class TIn , class TInRoot , class TOut >
Data< bool > sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::d_indexFromEnd

input DOF index starts from the end of input DOFs vector

◆ d_repartition

template<class TIn , class TInRoot , class TOut >
Data<sofa::type::vector<unsigned int> > sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::d_repartition

number of dest dofs per entry dof

◆ d_rootAngularForceScaleFactor

template<class TIn , class TInRoot , class TOut >
Data< Real > sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::d_rootAngularForceScaleFactor

Scale factor applied on the angular force accumulated on the rigid model.

◆ d_rootLinearForceScaleFactor

template<class TIn , class TInRoot , class TOut >
Data< Real > sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::d_rootLinearForceScaleFactor

Scale factor applied on the linear force accumulated on the rigid model.

◆ data

template<class TIn , class TInRoot , class TOut >
DeformableOnRigidFrameMappingInternalData<In, Out> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::data

◆ globalToLocalCoords

template<class TIn , class TInRoot , class TOut >
sofa::core::objectmodel::RenamedData<bool> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::globalToLocalCoords

◆ index

template<class TIn , class TInRoot , class TOut >
sofa::core::objectmodel::RenamedData<unsigned> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::index

◆ indexFromEnd

template<class TIn , class TInRoot , class TOut >
sofa::core::objectmodel::RenamedData<bool> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::indexFromEnd

◆ m_fromModel

template<class TIn , class TInRoot , class TOut >
core::State<In>* sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::m_fromModel
protected

◆ m_fromRootModel

template<class TIn , class TInRoot , class TOut >
core::State<InRoot>* sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::m_fromRootModel
protected

◆ m_rootAngularForceScaleFactor

template<class TIn , class TInRoot , class TOut >
sofa::core::objectmodel::RenamedData<Real> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::m_rootAngularForceScaleFactor

◆ m_rootLinearForceScaleFactor

template<class TIn , class TInRoot , class TOut >
sofa::core::objectmodel::RenamedData<Real> sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::m_rootLinearForceScaleFactor

◆ m_toModel

template<class TIn , class TInRoot , class TOut >
core::State<Out>* sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::m_toModel
protected

◆ repartition

template<class TIn , class TInRoot , class TOut >
sofa::core::objectmodel::RenamedData<sofa::type::vector<unsigned int> > sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::repartition

◆ rootX

template<class TIn , class TInRoot , class TOut >
InRootCoord sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::rootX
protected

◆ rotatedPoints

template<class TIn , class TInRoot , class TOut >
OutVecCoord sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::rotatedPoints

Constructor details

◆ DeformableOnRigidFrameMapping()

template<class TIn , class TInRoot , class TOut >
sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::DeformableOnRigidFrameMapping
protected

◆ ~DeformableOnRigidFrameMapping()

template<class TIn , class TInRoot , class TOut >
virtual sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::~DeformableOnRigidFrameMapping ( )
inlineprotectedvirtual

Function details

◆ addPoint() [1/2]

template<class TIn , class TInRoot , class TOut >
int sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::addPoint ( const OutCoord c)

◆ addPoint() [2/2]

template<class TIn , class TInRoot , class TOut >
int sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::addPoint ( const OutCoord c,
int  indexFrom 
)

◆ apply() [1/2]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::apply ( const core::MechanicalParams ,
const type::vector< OutDataVecCoord * > &  dataVecOutPos,
const type::vector< const InDataVecCoord * > &  dataVecInPos,
const type::vector< const InRootDataVecCoord * > &  dataVecInRootPos 
)
override

◆ apply() [2/2]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::apply ( OutVecCoord out,
const InVecCoord in,
const InRootVecCoord inroot 
)

◆ applyDJT()

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyDJT ( const core::MechanicalParams mparams,
core::MultiVecDerivId  inForce,
core::ConstMultiVecDerivId  outForce 
)
override

◆ applyJ() [1/2]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyJ ( const core::MechanicalParams ,
const type::vector< OutDataVecDeriv * > &  dataVecOutVel,
const type::vector< const InDataVecDeriv * > &  dataVecInVel,
const type::vector< const InRootDataVecDeriv * > &  dataVecInRootVel 
)
override

◆ applyJ() [2/2]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyJ ( OutVecDeriv out,
const InVecDeriv in,
const InRootVecDeriv inroot 
)

◆ applyJT() [1/4]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyJT ( const core::ConstraintParams ,
const type::vector< InDataMatrixDeriv * > &  dataMatOutConst,
const type::vector< InRootDataMatrixDeriv * > &  dataMatOutRootConst,
const type::vector< const OutDataMatrixDeriv * > &  dataMatInConst 
)
override

◆ applyJT() [2/4]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyJT ( const core::MechanicalParams ,
const type::vector< InDataVecDeriv * > &  dataVecOutForce,
const type::vector< InRootDataVecDeriv * > &  dataVecOutRootForce,
const type::vector< const OutDataVecDeriv * > &  dataVecInForce 
)
override

◆ applyJT() [3/4]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyJT ( InMatrixDeriv out,
const OutMatrixDeriv in,
InRootMatrixDeriv outroot 
)

◆ applyJT() [4/4]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::applyJT ( InVecDeriv out,
const OutVecDeriv in,
InRootVecDeriv outroot 
)

◆ clear()

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::clear ( int  reserve = 0)

◆ draw()

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::draw ( const core::visual::VisualParams vparams)
override

◆ handleTopologyChange()

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::handleTopologyChange ( core::topology::Topology t)
override

◆ init()

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::init ( void  )
override

◆ recomputeRigidMass()

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::recomputeRigidMass

MAP the mass: this function recompute the rigid mass (gravity center position and inertia) of the object based on its deformed shape.

◆ sameTopology()

template<class TIn , class TInRoot , class TOut >
bool sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::sameTopology ( ) const
inlineoverride

Return true if the destination model has the same topology as the source model.

This is the case for mapping keeping a one-to-one correspondance between input and output DOFs (mostly identity or data-conversion mappings).

◆ setRepartition() [1/2]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::setRepartition ( sofa::type::vector< unsigned int >  values)

◆ setRepartition() [2/2]

template<class TIn , class TInRoot , class TOut >
void sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::setRepartition ( unsigned int  value)

◆ SOFA_CLASS()

template<class TIn , class TInRoot , class TOut >
sofa::component::mapping::linear::DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >::SOFA_CLASS ( SOFA_TEMPLATE3(DeformableOnRigidFrameMapping< TIn, TInRoot, TOut >, TIn, TInRoot, TOut)  ,
SOFA_TEMPLATE3(LinearMulti2Mapping, TIn, TInRoot, TOut)   
)

Enum details

◆ anonymous enum

template<class TIn , class TInRoot , class TOut >
anonymous enum
Enumerator