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

#include <MeshMatrixMass.h>

Inheritance diagram for sofa::component::mass::MeshMatrixMass< DataTypes, TMassType >::VertexMassHandler:

Protected Attributes

MeshMatrixMass< DataTypes, TMassType > * m
 
- Protected Attributes inherited from sofa::component::topology::TopologyDataHandler< core::topology::BaseMeshTopology::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

 VertexMassHandler (MeshMatrixMass< DataTypes, TMassType > *_m, topology::PointData< helper::vector< TMassType > > *_data)
 
void applyCreateFunction (unsigned int pointIndex, TMassType &VertexMass, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)
 
void applyTriangleCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< core::topology::BaseMeshTopology::Triangle > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 Creation fonction for mass stored on vertices. More...
 
void applyTriangleDestruction (const sofa::helper::vector< unsigned int > &)
 Vertex coefficient of mass matrix destruction function to handle creation of new triangles. More...
 
void ApplyTopologyChange (const core::topology::TrianglesAdded *)
 Callback to add triangles elements. More...
 
void ApplyTopologyChange (const core::topology::TrianglesRemoved *)
 Callback to remove triangles elements. More...
 
void applyQuadCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< core::topology::BaseMeshTopology::Quad > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 Creation fonction for mass stored on vertices. More...
 
void applyQuadDestruction (const sofa::helper::vector< unsigned int > &)
 Vertex coefficient of mass matrix destruction function to handle creation of new quads. More...
 
void ApplyTopologyChange (const core::topology::QuadsAdded *)
 Callback to add quads elements. More...
 
void ApplyTopologyChange (const core::topology::QuadsRemoved *)
 Callback to remove quads elements. More...
 
void applyTetrahedronCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< core::topology::BaseMeshTopology::Tetrahedron > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 Creation fonction for mass stored on vertices. More...
 
void applyTetrahedronDestruction (const sofa::helper::vector< unsigned int > &)
 Vertex coefficient of mass matrix destruction function to handle creation of new tetrahedra. More...
 
void ApplyTopologyChange (const core::topology::TetrahedraAdded *)
 Callback to add tetrahedron elements. More...
 
void ApplyTopologyChange (const core::topology::TetrahedraRemoved *)
 Callback to remove tetrahedron elements. More...
 
void applyHexahedronCreation (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< core::topology::BaseMeshTopology::Hexahedron > &, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &, const sofa::helper::vector< sofa::helper::vector< double > > &)
 Creation fonction for mass stored on vertices. More...
 
void applyHexahedronDestruction (const sofa::helper::vector< unsigned int > &)
 Vertex coefficient of mass matrix destruction function to handle creation of new hexahedra. 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< core::topology::BaseMeshTopology::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 core::topology::BaseMeshTopology::Point &, const sofa::helper::vector< unsigned int > &ancestors, const sofa::helper::vector< double > &coefs)
 
virtual void applyCreateFunction (unsigned int i, value_type &t, const core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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::PointsRemoved *)
 Apply removing 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::EdgesAdded *)
 Apply adding edges elements. More...
 
virtual void ApplyTopologyChange (const core::topology::EdgesRemoved *)
 Apply removing edges elements. More...
 
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::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< core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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< core::topology::BaseMeshTopology::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 >
MeshMatrixMass<DataTypes,TMassType>* sofa::component::mass::MeshMatrixMass< DataTypes, TMassType >::VertexMassHandler::m
protected

Constructor details

template<class DataTypes , class TMassType >
sofa::component::mass::MeshMatrixMass< DataTypes, TMassType >::VertexMassHandler::VertexMassHandler ( MeshMatrixMass< DataTypes, TMassType > *  _m,
topology::PointData< helper::vector< TMassType > > *  _data 
)
inline

Function details

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::applyCreateFunction ( unsigned int  pointIndex,
TMassType &  VertexMass,
const sofa::helper::vector< unsigned int > &  ,
const sofa::helper::vector< double > &   
)

Mass initialization Creation Functions: Vertex mass coefficient matrix creation function

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::applyHexahedronCreation ( const sofa::helper::vector< unsigned int > &  hexahedronAdded,
const sofa::helper::vector< core::topology::BaseMeshTopology::Hexahedron > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Creation fonction for mass stored on vertices.

Mass coefficient Creation/Destruction functions for Hexahedral Mesh: Vertex coefficient of mass matrix creation function to handle creation of new hexahedra

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

Vertex coefficient of mass matrix destruction function to handle creation of new hexahedra.

Destruction fonction for mass stored on vertices.

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::applyQuadCreation ( const sofa::helper::vector< unsigned int > &  quadAdded,
const sofa::helper::vector< core::topology::BaseMeshTopology::Quad > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Creation fonction for mass stored on vertices.

Mass coefficient Creation/Destruction functions for Quad Mesh: Vertex coefficient of mass matrix creation function to handle creation of new quads

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::applyQuadDestruction ( const sofa::helper::vector< unsigned int > &  quadRemoved)

Vertex coefficient of mass matrix destruction function to handle creation of new quads.

Destruction fonction for mass stored on vertices.

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::applyTetrahedronCreation ( const sofa::helper::vector< unsigned int > &  tetrahedronAdded,
const sofa::helper::vector< core::topology::BaseMeshTopology::Tetrahedron > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Creation fonction for mass stored on vertices.

Mass coefficient Creation/Destruction functions for Tetrahedral Mesh: Vertex coefficient of mass matrix creation function to handle creation of new tetrahedra

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

Vertex coefficient of mass matrix destruction function to handle creation of new tetrahedra.

Destruction fonction for mass stored on vertices.

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::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::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::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::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::ApplyTopologyChange ( const core::topology::QuadsAdded e)
virtual

Callback to add quads elements.

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

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::ApplyTopologyChange ( const core::topology::QuadsRemoved e)
virtual

Callback to remove quads elements.

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

template<class DataTypes , class MassType >
void sofa::component::mass::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::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::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::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::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::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::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::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::MeshMatrixMass< DataTypes, MassType >::VertexMassHandler::applyTriangleCreation ( const sofa::helper::vector< unsigned int > &  triangleAdded,
const sofa::helper::vector< core::topology::BaseMeshTopology::Triangle > &  ,
const sofa::helper::vector< sofa::helper::vector< unsigned int > > &  ,
const sofa::helper::vector< sofa::helper::vector< double > > &   
)

Creation fonction for mass stored on vertices.

Mass coefficient Creation/Destruction functions for Triangular Mesh: Vertex coefficient of mass matrix creation function to handle creation of new triangles

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

Vertex coefficient of mass matrix destruction function to handle creation of new triangles.

Destruction fonction for mass stored on vertices.