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

#include <BarycentricMapperMeshTopology.h>

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

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

Detailed Description

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

Class allowing barycentric mapping computation on a MeshTopology.

Protected Attributes

sofa::type::vector< MappingData1Dm_map1d
 
sofa::type::vector< MappingData2Dm_map2d
 
sofa::type::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 (std::size_t reserve=0) override
 
void resize (core::State< Out > *toModel) override
 
Index addPointInLine (const Index lineIndex, const SReal *baryCoords) override
 
Index createPointInLine (const typename Out::Coord &p, Index lineIndex, const typename In::VecCoord *points) override
 
Index addPointInTriangle (const Index triangleIndex, const SReal *baryCoords) override
 
Index createPointInTriangle (const typename Out::Coord &p, Index triangleIndex, const typename In::VecCoord *points) override
 
Index addPointInQuad (const Index quadIndex, const SReal *baryCoords) override
 
Index createPointInQuad (const typename Out::Coord &p, Index quadIndex, const typename In::VecCoord *points) override
 
Index addPointInTetra (const Index tetraIndex, const SReal *baryCoords) override
 
Index addPointInCube (const Index 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::type::vector< MappingData3D > const * getMap3d () const
 
 ~BarycentricMapperMeshTopology () override
 

Protected Member Functions

 BarycentricMapperMeshTopology (core::topology::BaseMeshTopology *fromTopology, core::topology::BaseMeshTopology *toTopology)
 

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

◆ m_map1d

template<class In , class Out >
sofa::type::vector< MappingData1D > sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::m_map1d
protected

◆ m_map2d

template<class In , class Out >
sofa::type::vector< MappingData2D > sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::m_map2d
protected

◆ m_map3d

template<class In , class Out >
sofa::type::vector< MappingData3D > sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::m_map3d
protected

◆ m_matrixJ

template<class In , class Out >
MatrixType* sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::m_matrixJ {nullptr}
protected

◆ m_updateJ

template<class In , class Out >
bool sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::m_updateJ {false}
protected

Constructor details

◆ ~BarycentricMapperMeshTopology()

◆ BarycentricMapperMeshTopology()

Function details

◆ addPointInCube()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::addPointInCube ( const Index  cubeIndex,
const SReal baryCoords 
)
override

◆ addPointInLine()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::addPointInLine ( const Index  lineIndex,
const SReal baryCoords 
)
override

◆ addPointInQuad()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::addPointInQuad ( const Index  quadIndex,
const SReal baryCoords 
)
override

◆ addPointInTetra()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::addPointInTetra ( const Index  tetraIndex,
const SReal baryCoords 
)
override

◆ addPointInTriangle()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::addPointInTriangle ( const Index  triangleIndex,
const SReal baryCoords 
)
override

◆ apply()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::apply ( typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override

◆ applyJ()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::applyJ ( typename Out::VecDeriv &  out,
const typename In::VecDeriv &  in 
)
override

◆ applyJT() [1/2]

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::applyJT ( typename In::MatrixDeriv &  out,
const typename Out::MatrixDeriv &  in 
)
override

◆ applyJT() [2/2]

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::applyJT ( typename In::VecDeriv &  out,
const typename Out::VecDeriv &  in 
)
override

◆ clear()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::clear ( std::size_t  reserve = 0)
override

◆ createPointInLine()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::createPointInLine ( const typename Out::Coord &  p,
Index  lineIndex,
const typename In::VecCoord *  points 
)
override

◆ createPointInQuad()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::createPointInQuad ( const typename Out::Coord &  p,
Index  quadIndex,
const typename In::VecCoord *  points 
)
override

◆ createPointInTriangle()

template<class In , class Out >
BarycentricMapperMeshTopology< In, Out >::Index sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::createPointInTriangle ( const typename Out::Coord &  p,
Index  triangleIndex,
const typename In::VecCoord *  points 
)
override

◆ draw()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::draw ( const core::visual::VisualParams vparams,
const typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override

◆ getJ()

template<class In , class Out >
const sofa::linearalgebra::BaseMatrix * sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::getJ ( int  outSize,
int  inSize 
)
override

◆ getMap3d()

template<class In , class Out >
sofa::type::vector< MappingData3D > const* sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::getMap3d ( ) const
inline

◆ init()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::init ( const typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override

◆ resize()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::resize ( core::State< Out > *  toModel)
override

◆ SOFA_CLASS()

template<class In , class Out >
sofa::component::mapping::linear::BarycentricMapperMeshTopology< In, Out >::SOFA_CLASS ( SOFA_TEMPLATE2(BarycentricMapperMeshTopology< In, Out >, In, Out)  ,
SOFA_TEMPLATE2(TopologyBarycentricMapper, In, Out)   
)

Enum details

◆ anonymous enum

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

◆ anonymous enum

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

Related details

◆ operator<<

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

◆ operator>>

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