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

#include <BarycentricMapperRegularGridTopology.h>

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

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

Detailed Description

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

Class allowing barycentric mapping computation on a RegularGridTopology.

Protected Attributes

type::vector< CubeDatam_map
 
RegularGridTopologym_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 (std::size_t reserve=0) override
 
void resize (core::State< Out > *toModel) override
 
virtual bool isEmpty ()
 
virtual void setTopology (topology::container::grid::RegularGridTopology *_topology)
 
RegularGridTopologygetTopology ()
 
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
 

Protected Member Functions

 BarycentricMapperRegularGridTopology (RegularGridTopology *fromTopology, core::topology::BaseMeshTopology *toTopology)
 

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

◆ m_fromTopology

template<class In , class Out >
RegularGridTopology* sofa::component::mapping::linear::BarycentricMapperRegularGridTopology< In, Out >::m_fromTopology {nullptr}
protected

◆ m_map

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

◆ m_matrixJ

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

◆ m_updateJ

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

Constructor details

◆ ~BarycentricMapperRegularGridTopology()

◆ BarycentricMapperRegularGridTopology()

Function details

◆ addPointInCube()

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

◆ apply()

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

◆ applyJ()

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

◆ clear()

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

◆ draw()

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

◆ getTopology()

template<class In , class Out >
RegularGridTopology* sofa::component::mapping::linear::BarycentricMapperRegularGridTopology< In, Out >::getTopology ( )
inline

◆ init()

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

◆ isEmpty()

template<class In , class Out >
virtual bool sofa::component::mapping::linear::BarycentricMapperRegularGridTopology< In, Out >::isEmpty ( )
inlinevirtual

◆ resize()

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

◆ setTopology()

template<class In , class Out >
virtual void sofa::component::mapping::linear::BarycentricMapperRegularGridTopology< In, Out >::setTopology ( topology::container::grid::RegularGridTopology _topology)
inlinevirtual

◆ SOFA_CLASS()

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

◆ operator>>

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