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

#include <BarycentricMapperRegularGridTopology.h>

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

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

Detailed Description

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

Class allowing barycentric mapping computation on a RegularGridTopology.

Protected Attributes

helper::vector< CubeDatam_map
 
RegularGridTopology * m_fromTopology {nullptr}
 
MatrixTypem_matrixJ {nullptr}
 
bool m_updateJ {false}
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(BarycentricMapperRegularGridTopology, In, Out), SOFA_TEMPLATE2(TopologyBarycentricMapper, In, Out))
 
 ~BarycentricMapperRegularGridTopology () override
 
void clear (int reserve=0) override
 
void resize (core::State< Out > *toModel) override
 
virtual bool isEmpty ()
 
virtual void setTopology (topology::RegularGridTopology *_topology)
 
RegularGridTopology * getTopology ()
 
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
 

Protected Member Functions

 BarycentricMapperRegularGridTopology (RegularGridTopology *fromTopology, PointSetTopologyContainer *toTopology)
 
void addMatrixContrib (MatrixType *m, int row, int col, Real value)
 

Friends

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

Attribute details

template<class In , class Out >
RegularGridTopology* sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::m_fromTopology {nullptr}
protected
template<class In , class Out >
helper::vector<CubeData> sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::m_map
protected
template<class In , class Out >
MatrixType* sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::m_matrixJ {nullptr}
protected
template<class In , class Out >
bool sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::m_updateJ {false}
protected

Constructor details

template<class In , class Out >
sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::BarycentricMapperRegularGridTopology ( RegularGridTopology *  fromTopology,
PointSetTopologyContainer *  toTopology 
)
protected

Function details

template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::addMatrixContrib ( MatrixType m,
int  row,
int  col,
Real  value 
)
protected
template<class In , class Out >
int sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::addPointInCube ( const int  cubeIndex,
const SReal *  baryCoords 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::apply ( typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::applyJ ( typename Out::VecDeriv &  out,
const typename In::VecDeriv &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::applyJT ( typename In::VecDeriv &  out,
const typename Out::VecDeriv &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::applyJT ( typename In::MatrixDeriv &  out,
const typename Out::MatrixDeriv &  in 
)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::clear ( int  reserve = 0)
override
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< 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::BarycentricMapperRegularGridTopology< In, Out >::getJ ( int  outSize,
int  inSize 
)
override
template<class In , class Out >
RegularGridTopology* sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::getTopology ( )
inline
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::init ( const typename Out::VecCoord &  out,
const typename In::VecCoord &  in 
)
override
template<class In , class Out >
virtual bool sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::isEmpty ( )
inlinevirtual
template<class In , class Out >
void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::resize ( core::State< Out > *  toModel)
override
template<class In , class Out >
virtual void sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::setTopology ( topology::RegularGridTopology _topology)
inlinevirtual
template<class In , class Out >
sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::SOFA_CLASS ( SOFA_TEMPLATE2(BarycentricMapperRegularGridTopology< 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 BarycentricMapperRegularGridTopology< I, O > &  b 
)
friend
template<class In , class Out >
template<class I , class O >
std::istream& operator>> ( std::istream &  in,
BarycentricMapperRegularGridTopology< I, O > &  b 
)
friend