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

#include <BarycentricMapping.h>

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

Public Attributes

Data< boold_useRestPosition
 Use the rest position of the input and output models to initialize the mapping. More...
 
SingleLink< BarycentricMapping< In, Out >, Mapper, BaseLink::FLAG_STRONGLINKd_mapper
 
SingleLink< BarycentricMapping< In, Out >, BaseMeshTopology, BaseLink::FLAG_STRONGLINKd_input_topology
 
SingleLink< BarycentricMapping< In, Out >, BaseMeshTopology, BaseLink::FLAG_STRONGLINKd_output_topology
 

Protected Attributes

linearalgebra::BaseMatrixinternalMatrix
 internally store a matrix for getJ/Compliant More...
 
type::vector< linearalgebra::BaseMatrix * > js
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(BarycentricMapping, TIn, TOut), SOFA_TEMPLATE2(LinearMapping, TIn, TOut))
 
void init () override
 
void reinit () override
 
void apply (const core::MechanicalParams *mparams, Data< typename Out::VecCoord > &out, const Data< typename In::VecCoord > &in) override
 
void applyJ (const core::MechanicalParams *mparams, Data< typename Out::VecDeriv > &out, const Data< typename In::VecDeriv > &in) override
 
void applyJT (const core::MechanicalParams *mparams, Data< typename In::VecDeriv > &out, const Data< typename Out::VecDeriv > &in) override
 
void applyJT (const core::ConstraintParams *cparams, Data< typename In::MatrixDeriv > &out, const Data< typename Out::MatrixDeriv > &in) override
 
const sofa::linearalgebra::BaseMatrixgetJ () override
 
virtual const type::vector< sofa::linearalgebra::BaseMatrix * > * getJs () override
 
void draw (const core::visual::VisualParams *vparams) override
 
void handleTopologyChange (core::topology::Topology *t) override
 
TopologyBarycentricMapper< InDataTypes, OutDataTypes > * getMapper ()
 interface for continuous friction contact More...
 
- 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

 BarycentricMapping (core::State< In > *from, core::State< Out > *to, typename Mapper::SPtr m_mapper)
 
 BarycentricMapping (core::State< In > *from=nullptr, core::State< Out > *to=nullptr, BaseMeshTopology *from_topology=nullptr)
 
 ~BarycentricMapping () override
 

Attribute details

◆ d_input_topology

◆ d_mapper

◆ d_output_topology

◆ d_useRestPosition

template<class TIn , class TOut >
Data< bool > sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::d_useRestPosition

Use the rest position of the input and output models to initialize the mapping.

◆ internalMatrix

template<class TIn , class TOut >
linearalgebra::BaseMatrix* sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::internalMatrix
protected

internally store a matrix for getJ/Compliant

◆ js

template<class TIn , class TOut >
type::vector< linearalgebra::BaseMatrix* > sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::js
protected

Constructor details

◆ BarycentricMapping() [1/2]

template<class TIn , class TOut >
sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::BarycentricMapping ( core::State< In > *  from,
core::State< Out > *  to,
typename Mapper::SPtr  m_mapper 
)
protected

◆ BarycentricMapping() [2/2]

template<class TIn , class TOut >
sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::BarycentricMapping ( core::State< In > *  from = nullptr,
core::State< Out > *  to = nullptr,
BaseMeshTopology from_topology = nullptr 
)
protected

◆ ~BarycentricMapping()

template<class TIn , class TOut >
sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::~BarycentricMapping
overrideprotected

Function details

◆ apply()

template<class TIn , class TOut >
void sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::apply ( const core::MechanicalParams mparams,
Data< typename Out::VecCoord > &  out,
const Data< typename In::VecCoord > &  in 
)
override

◆ applyJ()

template<class TIn , class TOut >
void sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::applyJ ( const core::MechanicalParams mparams,
Data< typename Out::VecDeriv > &  out,
const Data< typename In::VecDeriv > &  in 
)
override

◆ applyJT() [1/2]

template<class TIn , class TOut >
void sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::applyJT ( const core::ConstraintParams cparams,
Data< typename In::MatrixDeriv > &  out,
const Data< typename Out::MatrixDeriv > &  in 
)
override

◆ applyJT() [2/2]

template<class TIn , class TOut >
void sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::applyJT ( const core::MechanicalParams mparams,
Data< typename In::VecDeriv > &  out,
const Data< typename Out::VecDeriv > &  in 
)
override

◆ draw()

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

◆ getJ()

template<class TIn , class TOut >
const sofa::linearalgebra::BaseMatrix * sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::getJ
override

◆ getJs()

template<class TIn , class TOut >
const type::vector< linearalgebra::BaseMatrix * > * sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::getJs
overridevirtual

◆ getMapper()

template<class TIn , class TOut >
TopologyBarycentricMapper<InDataTypes,OutDataTypes>* sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::getMapper ( )
inline

interface for continuous friction contact

◆ handleTopologyChange()

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

◆ init()

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

◆ reinit()

template<class TIn , class TOut >
void sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::reinit
override

◆ SOFA_CLASS()

template<class TIn , class TOut >
sofa::component::mapping::linear::BarycentricMapping< TIn, TOut >::SOFA_CLASS ( SOFA_TEMPLATE2(BarycentricMapping< TIn, TOut >, TIn, TOut)  ,
SOFA_TEMPLATE2(LinearMapping, TIn, TOut)   
)