SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::component::mass::DiagonalMass< DataTypes, TMassType >::DMassPointHandler Class Reference

#include <DiagonalMass.h>

Inheritance diagram for sofa::component::mass::DiagonalMass< DataTypes, TMassType >::DMassPointHandler:

Protected Attributes

DiagonalMass< DataTypes, TMassType > * dm
 
- Protected Attributes inherited from sofa::component::topology::TopologyDataHandler< Point, MassVector >
sofa::core::topology::BaseTopologyData< MassVector > * m_topologyData
 
value_type m_defaultValue
 
- Protected Attributes inherited from sofa::core::topology::TopologyHandler
unsigned int lastElementIndex
 to handle properly the removal of items, the container must know the index of the last element More...
 

Public Member Functions

 DMassPointHandler (DiagonalMass< DataTypes, TMassType > *_dm, sofa::component::topology::PointData< MassVector > *_data)
 
void applyCreateFunction (unsigned int pointIndex, TMassType &m, const Point &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)
 
void applyPointDestruction (const sofa::helper::vector< unsigned int > &)
 
virtual void ApplyTopologyChange (const core::topology::PointsRemoved *)
 Callback to remove points. More...
 
void applyEdgeCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< Edge > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 
void applyEdgeDestruction (const sofa::helper::vector< unsigned int > &)
 Apply removing edges elements. More...
 
virtual void ApplyTopologyChange (const core::topology::EdgesAdded *)
 Callback to add edges elements. More...
 
virtual void ApplyTopologyChange (const core::topology::EdgesRemoved *)
 Callback to remove edges elements. More...
 
void applyTriangleCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< Triangle > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 
void applyTriangleDestruction (const sofa::helper::vector< unsigned int > &)
 Apply removing triangles elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TrianglesAdded *)
 Callback to add triangles elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TrianglesRemoved *)
 Callback to remove triangles elements. More...
 
void applyTetrahedronCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< Tetrahedron > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 
void applyTetrahedronDestruction (const sofa::helper::vector< unsigned int > &)
 Apply removing tetrahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TetrahedraAdded *)
 Callback to add tetrahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TetrahedraRemoved *)
 Callback to remove tetrahedron elements. More...
 
void applyHexahedronCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< Hexahedron > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 
void applyHexahedronDestruction (const sofa::helper::vector< unsigned int > &)
 Apply removing hexahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::HexahedraAdded *)
 Callback to add hexahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::HexahedraRemoved *)
 Callback to remove hexahedron elements. More...
 
- Public Member Functions inherited from sofa::component::topology::TopologyDataHandler< Point, MassVector >
 TopologyDataHandler (sofa::core::topology::BaseTopologyData< MassVector > *_topologyData, value_type defaultValue=value_type())
 
bool isTopologyDataRegistered ()
 
virtual void applyDestroyFunction (unsigned int, value_type &)
 Apply removing current elementType elements. More...
 
virtual void applyCreateFunction (unsigned int, value_type &t, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)
 Apply adding current elementType elements. More...
 
virtual void applyCreateFunction (unsigned int i, value_type &t, const Point &, const sofa::helper::vector< unsigned int > &ancestors, const sofa::helper::vector< double > &coefs)
 
virtual void applyCreateFunction (unsigned int i, value_type &t, const Point &e, const sofa::helper::vector< unsigned int > &ancestors, const sofa::helper::vector< double > &coefs, const AncestorElem *)
 
void setDefaultValue (const value_type &v)
 
- Public Member Functions inherited from sofa::core::topology::TopologyElementHandler< Point >
 TopologyElementHandler ()
 
 ~TopologyElementHandler () override
 
virtual void ApplyTopologyChange (const EIndicesSwap *event) override
 Apply swap between indices elements. More...
 
virtual void ApplyTopologyChange (const EAdded *event) override
 Apply adding elements. More...
 
virtual void ApplyTopologyChange (const ERemoved *event) override
 Apply removing elements. More...
 
virtual void ApplyTopologyChange (const ERenumbering *event) override
 Apply renumbering on elements. More...
 
virtual void ApplyTopologyChange (const EMoved *event) override
 Apply moving elements. More...
 
virtual void ApplyTopologyChange (const EMoved_Adding *event) override
 Apply adding function on moved elements. More...
 
virtual void ApplyTopologyChange (const EMoved_Removing *event) override
 Apply removing function on moved elements. More...
 
- Public Member Functions inherited from sofa::core::topology::TopologyHandler
 TopologyHandler ()
 
virtual ~TopologyHandler ()
 
virtual void ApplyTopologyChanges (const std::list< const core::topology::TopologyChange * > &_topologyChangeEvents, const unsigned int _dataSize)
 
virtual void ApplyTopologyChange (const core::topology::EndingEvent *)
 
virtual void ApplyTopologyChange (const core::topology::PointsIndicesSwap *)
 
virtual void ApplyTopologyChange (const core::topology::PointsAdded *)
 Apply adding points elements. More...
 
virtual void ApplyTopologyChange (const core::topology::PointsRenumbering *)
 Apply renumbering on points elements. More...
 
virtual void ApplyTopologyChange (const core::topology::PointsMoved *)
 Apply moving points elements. More...
 
virtual void ApplyTopologyChange (const core::topology::EdgesIndicesSwap *)
 
virtual void ApplyTopologyChange (const core::topology::EdgesMoved_Removing *)
 Apply removing function on moved edges elements. More...
 
virtual void ApplyTopologyChange (const core::topology::EdgesMoved_Adding *)
 Apply adding function on moved edges elements. More...
 
virtual void ApplyTopologyChange (const core::topology::EdgesRenumbering *)
 Apply renumbering on edges elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TrianglesIndicesSwap *)
 
virtual void ApplyTopologyChange (const core::topology::TrianglesMoved_Removing *)
 Apply removing function on moved triangles elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TrianglesMoved_Adding *)
 Apply adding function on moved triangles elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TrianglesRenumbering *)
 Apply renumbering on triangles elements. More...
 
virtual void ApplyTopologyChange (const core::topology::QuadsIndicesSwap *)
 
virtual void ApplyTopologyChange (const core::topology::QuadsAdded *)
 Apply adding quads elements. More...
 
virtual void ApplyTopologyChange (const core::topology::QuadsRemoved *)
 Apply removing quads elements. More...
 
virtual void ApplyTopologyChange (const core::topology::QuadsMoved_Removing *)
 Apply removing function on moved quads elements. More...
 
virtual void ApplyTopologyChange (const core::topology::QuadsMoved_Adding *)
 Apply adding function on moved quads elements. More...
 
virtual void ApplyTopologyChange (const core::topology::QuadsRenumbering *)
 Apply renumbering on quads elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TetrahedraIndicesSwap *)
 
virtual void ApplyTopologyChange (const core::topology::TetrahedraMoved_Removing *)
 Apply removing function on moved tetrahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TetrahedraMoved_Adding *)
 Apply adding function on moved tetrahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::TetrahedraRenumbering *)
 Apply renumbering on tetrahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::HexahedraIndicesSwap *)
 
virtual void ApplyTopologyChange (const core::topology::HexahedraMoved_Removing *)
 Apply removing function on moved hexahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::HexahedraMoved_Adding *)
 Apply adding function on moved hexahedron elements. More...
 
virtual void ApplyTopologyChange (const core::topology::HexahedraRenumbering *)
 Apply renumbering on hexahedron elements. More...
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Point >::EMoved_Adding *)
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Point >::EMoved_Removing *)
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Edge >::EMoved *)
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Triangle >::EMoved *)
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Quad >::EMoved *)
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Tetrahedron >::EMoved *)
 
virtual void ApplyTopologyChange (const TopologyChangeElementInfo< Topology::Hexahedron >::EMoved *)
 

Additional Inherited Members

- Protected Member Functions inherited from sofa::component::topology::TopologyDataHandler< Point, MassVector >
virtual void swap (unsigned int i1, unsigned int i2)
 Swaps values at indices i1 and i2. More...
 
virtual void add (const sofa::helper::vector< unsigned int > &index, const sofa::helper::vector< Point > &elems, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &ancestors, const sofa::helper::vector< sofa::helper::vector< double > > &coefs, const sofa::helper::vector< AncestorElem > &ancestorElems)
 
virtual void remove (const sofa::helper::vector< unsigned int > &index)
 Remove the values corresponding to the elements removed. More...
 
virtual void renumber (const sofa::helper::vector< unsigned int > &index)
 Reorder the values. More...
 
virtual void move (const sofa::helper::vector< unsigned int > &indexList, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &ancestors, const sofa::helper::vector< sofa::helper::vector< double > > &coefs)
 Move a list of points. More...
 
virtual void addOnMovedPosition (const sofa::helper::vector< unsigned int > &indexList, const sofa::helper::vector< Point > &elems)
 Add Element after a displacement of vertices, ie. add element based on previous position topology revision. More...
 
virtual void removeOnMovedPosition (const sofa::helper::vector< unsigned int > &indices)
 Remove Element after a displacement of vertices, ie. add element based on previous position topology revision. More...
 
- Protected Member Functions inherited from sofa::core::topology::TopologyElementHandler< Point >
void swap (Topology::ElemID, Topology::ElemID) override
 Swaps values at indices i1 and i2. More...
 
virtual void add (Topology::ElemID, const sofa::helper::vector< Point > &, const sofa::helper::vector< sofa::helper::vector< Topology::ElemID > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 
virtual void add (const sofa::helper::vector< Topology::ElemID > &index, const sofa::helper::vector< Point > &elems, const sofa::helper::vector< sofa::helper::vector< Topology::ElemID > > &ancestors, const sofa::helper::vector< sofa::helper::vector< double > > &coefs, const sofa::helper::vector< AncestorElem > &)
 
virtual void addOnMovedPosition (const sofa::helper::vector< Topology::ElemID > &, const sofa::helper::vector< Point > &)
 Add Element after a displacement of vertices, ie. add element based on previous position topology revision. More...
 
- Protected Member Functions inherited from sofa::core::topology::TopologyHandler
void setDataSetArraySize (const unsigned int s)
 to handle PointSubsetData More...
 

Attribute details

template<class DataTypes, class TMassType>
DiagonalMass<DataTypes,TMassType>* sofa::component::mass::DiagonalMass< DataTypes, TMassType >::DMassPointHandler::dm
protected

Constructor details

template<class DataTypes, class TMassType>
sofa::component::mass::DiagonalMass< DataTypes, TMassType >::DMassPointHandler::DMassPointHandler ( DiagonalMass< DataTypes, TMassType > *  _dm,
sofa::component::topology::PointData< MassVector > *  _data 
)
inline

Function details

template<class DataTypes , class MassType>
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyCreateFunction ( unsigned int  pointIndex,
MassType m,
const Point ,
const sofa::helper::vector< unsigned int > &  ,
const sofa::helper::vector< double > &   
)
template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyEdgeCreation ( const sofa::helper::vector< unsigned int > &  edgeAdded,
const sofa::helper::vector< Edge > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Functions on Edges ////////////////////////////////////// Apply adding edges elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyEdgeDestruction ( const sofa::helper::vector< unsigned int > &  edgeRemoved)

Apply removing edges elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyHexahedronCreation ( const sofa::helper::vector< unsigned int > &  hexahedronAdded,
const sofa::helper::vector< Hexahedron > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Functions on Hexahedron ////////////////////////////////////// Apply adding hexahedron elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyHexahedronDestruction ( const sofa::helper::vector< unsigned int > &  hexahedronRemoved)

Apply removing hexahedron elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyPointDestruction ( const sofa::helper::vector< unsigned int > &  pointsRemoved)

Functions on Points ////////////////////////////////////// Apply removing points.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyTetrahedronCreation ( const sofa::helper::vector< unsigned int > &  tetrahedronAdded,
const sofa::helper::vector< Tetrahedron > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Functions on Tetrahedron ////////////////////////////////////// Apply adding tetrahedron elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyTetrahedronDestruction ( const sofa::helper::vector< unsigned int > &  tetrahedronRemoved)

Apply removing tetrahedron elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::PointsRemoved e)
virtual

Callback to remove points.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::EdgesAdded e)
virtual

Callback to add edges elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::EdgesRemoved e)
virtual

Callback to remove edges elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::TrianglesAdded e)
virtual

Callback to add triangles elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::TrianglesRemoved e)
virtual

Callback to remove triangles elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::TetrahedraAdded e)
virtual

Callback to add tetrahedron elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::TetrahedraRemoved e)
virtual

Callback to remove tetrahedron elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::HexahedraAdded e)
virtual

Callback to add hexahedron elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::ApplyTopologyChange ( const core::topology::HexahedraRemoved e)
virtual

Callback to remove hexahedron elements.

Reimplemented from sofa::core::topology::TopologyHandler.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyTriangleCreation ( const sofa::helper::vector< unsigned int > &  triangleAdded,
const sofa::helper::vector< Triangle > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Functions on Triangles ////////////////////////////////////// Apply adding triangles elements.

template<class DataTypes , class MassType >
void sofa::component::mass::DiagonalMass< DataTypes, MassType >::DMassPointHandler::applyTriangleDestruction ( const sofa::helper::vector< unsigned int > &  triangleRemoved)

Apply removing triangles elements.