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

#include <BarycentricMapperSparseGridTopology.h>

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

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

Detailed Description

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

Class allowing barycentric mapping computation on a SparseGridTopology.

Protected Attributes

sofa::type::vector< CubeDatam_map
 
topology::container::grid::SparseGridTopologym_fromTopology {nullptr}
 
MatrixTypem_matrixJ {nullptr}
 
bool m_updateJ {false}
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(BarycentricMapperSparseGridTopology, In, Out), SOFA_TEMPLATE2(TopologyBarycentricMapper, In, Out))
 
 ~BarycentricMapperSparseGridTopology () override
 
void init (const typename Out::VecCoord &out, const typename In::VecCoord &in) override
 
void clear (std::size_t reserve=0) override
 
Index addPointInCube (const Index cubeIndex, const SReal *baryCoords) 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
 
void draw (const VisualParams *, const typename Out::VecCoord &out, const typename In::VecCoord &in) override
 
void resize (core::State< Out > *toModel) override
 

Protected Member Functions

 BarycentricMapperSparseGridTopology (topology::container::grid::SparseGridTopology *fromTopology, core::topology::BaseMeshTopology *_toTopology)
 

Friends

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

Attribute details

◆ m_fromTopology

template<class In , class Out >
topology::container::grid::SparseGridTopology* sofa::component::mapping::linear::BarycentricMapperSparseGridTopology< In, Out >::m_fromTopology {nullptr}
protected

◆ m_map

template<class In , class Out >
sofa::type::vector<CubeData> sofa::component::mapping::linear::BarycentricMapperSparseGridTopology< In, Out >::m_map
protected

◆ m_matrixJ

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

◆ m_updateJ

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

Constructor details

◆ ~BarycentricMapperSparseGridTopology()

◆ BarycentricMapperSparseGridTopology()

Function details

◆ addPointInCube()

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

◆ apply()

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

◆ applyJ()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperSparseGridTopology< 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::BarycentricMapperSparseGridTopology< 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::BarycentricMapperSparseGridTopology< In, Out >::applyJT ( typename In::VecDeriv &  out,
const typename Out::VecDeriv &  in 
)
override

◆ clear()

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

◆ draw()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperSparseGridTopology< In, Out >::draw ( const 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::BarycentricMapperSparseGridTopology< In, Out >::getJ ( int  outSize,
int  inSize 
)
override

◆ init()

template<class In , class Out >
void sofa::component::mapping::linear::BarycentricMapperSparseGridTopology< 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::BarycentricMapperSparseGridTopology< In, Out >::resize ( core::State< Out > *  toModel)
override

◆ SOFA_CLASS()

template<class In , class Out >
sofa::component::mapping::linear::BarycentricMapperSparseGridTopology< In, Out >::SOFA_CLASS ( SOFA_TEMPLATE2(BarycentricMapperSparseGridTopology< 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 BarycentricMapperSparseGridTopology< I, O > &  b 
)
friend

◆ operator>>

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