SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::mapping::BarycentricMapperMeshTopology< In, Out > Class Template Reference

#include <BarycentricMapperMeshTopology.h>

Class allowing barycentric mapping computation on a MeshTopology. More...

Inheritance diagram for sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >:

Detailed Description

template<class In, class Out>
class sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >

Class allowing barycentric mapping computation on a MeshTopology.

Protected Attributes

sofa::helper::vector< MappingData1Dm_map1d
 
sofa::helper::vector< MappingData2Dm_map2d
 
sofa::helper::vector< MappingData3Dm_map3d
 
MatrixTypem_matrixJ {nullptr}
 
bool m_updateJ {false}
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(BarycentricMapperMeshTopology, In, Out), SOFA_TEMPLATE2(TopologyBarycentricMapper, In, Out))
 
void clear (int reserve=0) override
 
void resize (core::State< Out > *toModel) override
 
int addPointInLine (const int lineIndex, const SReal *baryCoords) override
 
int createPointInLine (const typename Out::Coord &p, int lineIndex, const typename In::VecCoord *points) override
 
int addPointInTriangle (const int triangleIndex, const SReal *baryCoords) override
 
int createPointInTriangle (const typename Out::Coord &p, int triangleIndex, const typename In::VecCoord *points) override
 
int addPointInQuad (const int quadIndex, const SReal *baryCoords) override
 
int createPointInQuad (const typename Out::Coord &p, int quadIndex, const typename In::VecCoord *points) override
 
int addPointInTetra (const int tetraIndex, const SReal *baryCoords) override
 
int addPointInCube (const int cubeIndex, const SReal *baryCoords) override
 
void init (const typename Out::VecCoord &out, const typename In::VecCoord &in) override
 
void draw (const core::visual::VisualParams *, const typename Out::VecCoord &out, const typename In::VecCoord &in) override
 
void apply (typename Out::VecCoord &out, const typename In::VecCoord &in) override
 
void applyJ (typename Out::VecDeriv &out, const typename In::VecDeriv &in) override
 
void applyJT (typename In::VecDeriv &out, const typename Out::VecDeriv &in) override
 
void applyJT (typename In::MatrixDeriv &out, const typename Out::MatrixDeriv &in) override
 
const BaseMatrixgetJ (int outSize, int inSize) override
 
sofa::helper::vector< MappingData3D > const * getMap3d () const
 
 ~BarycentricMapperMeshTopology () override
 

Protected Member Functions

 BarycentricMapperMeshTopology (core::topology::BaseMeshTopology *fromTopology, topology::PointSetTopologyContainer *toTopology)
 
void addMatrixContrib (MatrixType *m, int row, int col, Real value)
 

Friends

template<class I , class O >
std::istream & operator>> (std::istream &in, BarycentricMapperMeshTopology< I, O > &b)
 
template<class I , class O >
std::ostream & operator<< (std::ostream &out, const BarycentricMapperMeshTopology< I, O > &b)
 

Attribute details

template<class In , class Out >
sofa::helper::vector< MappingData1D > sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::m_map1d
protected
template<class In , class Out >
sofa::helper::vector< MappingData2D > sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::m_map2d
protected
template<class In , class Out >
sofa::helper::vector< MappingData3D > sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::m_map3d
protected
template<class In , class Out >
MatrixType* sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::m_matrixJ {nullptr}
protected
template<class In , class Out >
bool sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::m_updateJ {false}
protected

Constructor details

Function details

template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::addMatrixContrib ( MatrixType m,
int  row,
int  col,
Real  value 
)
protected
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::addPointInCube ( const int  cubeIndex,
const SReal *  baryCoords 
)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::addPointInLine ( const int  lineIndex,
const SReal *  baryCoords 
)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::addPointInQuad ( const int  quadIndex,
const SReal *  baryCoords 
)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::addPointInTetra ( const int  tetraIndex,
const SReal *  baryCoords 
)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::addPointInTriangle ( const int  triangleIndex,
const SReal *  baryCoords 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::apply ( typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::applyJ ( typename Out::VecDeriv &  out,
const typename In::VecDeriv &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::applyJT ( typename In::VecDeriv &  out,
const typename Out::VecDeriv &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::applyJT ( typename In::MatrixDeriv &  out,
const typename Out::MatrixDeriv &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::clear ( int  reserve = 0)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::createPointInLine ( const typename Out::Coord &  p,
int  lineIndex,
const typename In::VecCoord *  points 
)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::createPointInQuad ( const typename Out::Coord &  p,
int  quadIndex,
const typename In::VecCoord *  points 
)
override
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::createPointInTriangle ( const typename Out::Coord &  p,
int  triangleIndex,
const typename In::VecCoord *  points 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::draw ( const core::visual::VisualParams vparams,
const typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override
template<class In , class Out >
const sofa::defaulttype::BaseMatrix * sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::getJ ( int  outSize,
int  inSize 
)
override
template<class In , class Out >
sofa::helper::vector< MappingData3D > const* sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::getMap3d ( ) const
inline
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::init ( const typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::resize ( core::State< Out > *  toModel)
override
template<class In , class Out >
sofa::component::mapping::BarycentricMapperMeshTopology< In, Out >::SOFA_CLASS ( SOFA_TEMPLATE2(BarycentricMapperMeshTopology< In, Out >, In, Out ,
SOFA_TEMPLATE2(TopologyBarycentricMapper, In, Out  
)

Enum details

template<class In , class Out >
anonymous enum
Enumerator
NIn 
template<class In , class Out >
anonymous enum
Enumerator
NOut 

Related details

template<class In , class Out >
template<class I , class O >
std::ostream& operator<< ( std::ostream &  out,
const BarycentricMapperMeshTopology< I, O > &  b 
)
friend
template<class In , class Out >
template<class I , class O >
std::istream& operator>> ( std::istream &  in,
BarycentricMapperMeshTopology< I, O > &  b 
)
friend