SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::topology::HexahedronSetTopologyContainer Class Reference

#include <HexahedronSetTopologyContainer.h>

Inheritance diagram for sofa::component::topology::HexahedronSetTopologyContainer:

Detailed Description

a class that stores a set of hexahedra and provides access with adjacent quads, edges and vertices

Public Attributes

Data< boold_createQuadArray
 force the creation of quads More...
 
- Public Attributes inherited from sofa::component::topology::EdgeSetTopologyContainer
Data< sofa::helper::vector< Edge > > d_edge
 List of edge indices. More...
 
Data< boolm_checkConnexity
 It true, will check the connexity of the mesh. More...
 
- Public Attributes inherited from sofa::component::topology::PointSetTopologyContainer
Data< InitTypes::VecCoordd_initPoints
 Initial position of points. More...
 
Data< boold_checkTopology
 Bool parameter to activate internal topology checks in several methods. More...
 

Protected Attributes

Data< sofa::helper::vector< Hexahedron > > d_hexahedron
 provides the set of hexahedra. More...
 
sofa::helper::vector< EdgesInHexahedronm_edgesInHexahedron
 provides the set of edges for each hexahedron. More...
 
sofa::helper::vector< QuadsInHexahedronm_quadsInHexahedron
 provides the set of quads for each hexahedron. More...
 
sofa::helper::vector< HexahedraAroundVertexm_hexahedraAroundVertex
 for each vertex provides the set of hexahedra adjacent to that vertex. More...
 
sofa::helper::vector< HexahedraAroundEdgem_hexahedraAroundEdge
 for each edge provides the set of hexahedra adjacent to that edge. More...
 
sofa::helper::vector< HexahedraAroundQuadm_hexahedraAroundQuad
 for each quad provides the set of hexahedra adjacent to that quad. More...
 
bool m_hexahedronTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 
- Protected Attributes inherited from sofa::component::topology::QuadSetTopologyContainer
Data< sofa::helper::vector< Quad > > d_quad
 provides the set of quads. More...
 
sofa::helper::vector< EdgesInQuadm_edgesInQuad
 provides the 4 edges in each quad. More...
 
sofa::helper::vector< QuadsAroundVertexm_quadsAroundVertex
 for each vertex provides the set of quads adjacent to that vertex. More...
 
sofa::helper::vector< QuadsAroundEdgem_quadsAroundEdge
 for each edge provides the set of quads adjacent to that edge. More...
 
bool m_quadTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 
- Protected Attributes inherited from sofa::component::topology::EdgeSetTopologyContainer
sofa::helper::vector< EdgesAroundVertexm_edgesAroundVertex
 
bool m_edgeTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 
- Protected Attributes inherited from sofa::component::topology::PointSetTopologyContainer
bool m_pointTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 

Public Member Functions

 SOFA_CLASS (HexahedronSetTopologyContainer, QuadSetTopologyContainer)
 
void init () override
 
size_t getNumberOfHexahedra () const
 Returns the number of hexahedra in this topology. The difference to getNbHexahedra() is that this method does not generate the hexa array if it does not exist. More...
 
size_t getNumberOfElements () const override
 Returns the number of topological element of the current topology. This function avoids to know which topological container is in used. More...
 
const sofa::helper::vector< Hexahedron > & getHexahedronArray ()
 Returns the Hexahedron array. More...
 
const sofa::helper::vector< EdgesInHexahedron > & getEdgesInHexahedronArray ()
 Returns the EdgesInHexahedron array (i.e. provide the 12 edge indices for each hexahedron). More...
 
const sofa::helper::vector< QuadsInHexahedron > & getQuadsInHexahedronArray ()
 Returns the QuadsInHexahedron array (i.e. provide the 8 quad indices for each hexahedron). More...
 
const sofa::helper::vector< HexahedraAroundVertex > & getHexahedraAroundVertexArray ()
 Returns the HexahedraAroundVertex array (i.e. provide the hexahedron indices adjacent to each vertex). More...
 
const sofa::helper::vector< HexahedraAroundEdge > & getHexahedraAroundEdgeArray ()
 Returns the HexahedraAroundEdge array (i.e. provide the hexahedron indices adjacent to each edge). More...
 
const sofa::helper::vector< HexahedraAroundQuad > & getHexahedraAroundQuadArray ()
 Returns the HexahedraAroundQuad array (i.e. provide the hexahedron indices adjacent to each quad). More...
 
bool hasHexahedra () const
 
bool hasEdgesInHexahedron () const
 
bool hasQuadsInHexahedron () const
 
bool hasHexahedraAroundVertex () const
 
bool hasHexahedraAroundEdge () const
 
bool hasHexahedraAroundQuad () const
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 Returns the type of the topology. More...
 
void clear () override
 
void addHexa (int a, int b, int c, int d, int e, int f, int g, int h) override
 
const SeqHexahedragetHexahedra () override
 Get the array of hexahedra. More...
 
Data< sofa::helper::vector< Hexahedron > > & getHexahedronDataArray ()
 Get the Data which contains the array of hexahedra. More...
 
const Hexahedron getHexahedron (HexaID i) override
 Get a hexahedron from its index. More...
 
virtual unsigned int getLocalIndexFromBinaryIndex (const HexahedronBinaryIndex bi) const
 Get the local hexahedron index (0<i<8) from its 3 binary indices. More...
 
virtual HexahedronBinaryIndex getBinaryIndexFromLocalIndex (const unsigned int li) const
 Get the binary index (array of 3 binary values) from its local index (0<li<8) More...
 
HexahedronID getHexahedronIndex (PointID v1, PointID v2, PointID v3, PointID v4, PointID v5, PointID v6, PointID v7, PointID v8) override
 Get the index of a hexahedron from the indices of its vertices. More...
 
const EdgesInHexahedrongetEdgesInHexahedron (HexaID id) override
 Get the 12 edges that form a hexahedron. More...
 
const QuadsInHexahedrongetQuadsInHexahedron (HexaID id) override
 Get the 6 quads that form a hexahedron. More...
 
const HexahedraAroundVertexgetHexahedraAroundVertex (PointID id) override
 Get the hexahedra around a vertex. More...
 
const HexahedraAroundEdgegetHexahedraAroundEdge (EdgeID id) override
 Get the hexahedra around an edge. More...
 
const HexahedraAroundQuadgetHexahedraAroundQuad (QuadID id) override
 Get the hexahedra around a quad. More...
 
int getVertexIndexInHexahedron (const Hexahedron &t, PointID vertexIndex) const override
 Get the position of a vertex in a hexahedron from its index. More...
 
int getEdgeIndexInHexahedron (const EdgesInHexahedron &t, EdgeID edgeIndex) const override
 Get the position of an edge in a hexahedron from its index. More...
 
int getQuadIndexInHexahedron (const QuadsInHexahedron &t, QuadID quadIndex) const override
 Get the position of a quad in a hexahedron from its index. More...
 
Edge getLocalEdgesInHexahedron (const EdgeID i) const override
 Returns for each index (between 0 and 11) the two vertex local indices that are adjacent to/forming that edge. More...
 
Quad getLocalQuadsInHexahedron (const QuadID i) const override
 Returns for each index (between 0 and 5) the four vertices local indices that are adjacent to/forming that quad. More...
 
virtual QuadID getNextAdjacentQuad (const HexaID _hexaID, const QuadID _quadID, const EdgeID _edgeID)
 Given an EdgesInQuad and a QuadsInHexahedron index in a hexahedron, returns the QuadsInHexahedron index of the quad sharing the same edge. More...
 
void initTopology ()
 Method called by component Init method. Will create all the topology neighboorhood buffers and call. More...
 
bool checkTopology () const override
 Checks if the topology is coherent. More...
 
bool checkConnexity () override
 Checks if the topology has only one connected component. More...
 
size_t getNumberOfConnectedComponent () override
 Returns the number of connected component. More...
 
const VecHexaID getConnectedElement (HexaID elem) override
 Returns the set of element indices connected to an input one (i.e. which can be reached by topological links) More...
 
const VecHexaID getElementAroundElement (HexaID elem) override
 Returns the set of element indices adjacent to a given element (i.e. sharing a link) More...
 
const VecHexaID getElementAroundElements (VecHexaID elems) override
 Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link) More...
 
- Public Member Functions inherited from sofa::component::topology::QuadSetTopologyContainer
 SOFA_CLASS (QuadSetTopologyContainer, EdgeSetTopologyContainer)
 
void init () override
 
size_t getNumberOfQuads () const
 Returns the number of quads in this topology. The difference to getNbQuads() is that this method does not generate the quad array if it does not exist. More...
 
size_t getNumberOfElements () const override
 Returns the number of topological element of the current topology. This function avoids to know which topological container is in used. More...
 
const sofa::helper::vector< Quad > & getQuadArray ()
 Returns the Quad array. More...
 
const sofa::helper::vector< EdgesInQuad > & getEdgesInQuadArray ()
 Returns the EdgesInQuadArray array (i.e. provide the 4 edge indices for each quad) More...
 
const sofa::helper::vector< QuadsAroundVertex > & getQuadsAroundVertexArray ()
 Returns the QuadsAroundVertex array (i.e. provide the quad indices adjacent to each vertex). More...
 
const sofa::helper::vector< QuadsAroundEdge > & getQuadsAroundEdgeArray ()
 Returns the QuadsAroundEdge array (i.e. provide the quad indices adjacent to each edge). More...
 
bool hasQuads () const
 
bool hasEdgesInQuad () const
 
bool hasQuadsAroundVertex () const
 
bool hasQuadsAroundEdge () const
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 Returns the type of the topology. More...
 
void clear () override
 
void addQuad (int a, int b, int c, int d) override
 
const SeqQuadsgetQuads () override
 Returns the quad array. More...
 
Data< sofa::helper::vector< Quad > > & getQuadDataArray ()
 Returns a reference to the Data of quads array container. More...
 
const Quad getQuad (QuadID id) override
 Returns the quad corresponding to the QuadID i. More...
 
QuadID getQuadIndex (PointID v1, PointID v2, PointID v3, PointID v4) override
 
const EdgesInQuadgetEdgesInQuad (QuadID id) override
 Returns the set of edges adjacent to a given quad. More...
 
const QuadsAroundVertexgetQuadsAroundVertex (PointID id) override
 Returns the set of quads adjacent to a given vertex. More...
 
const QuadsAroundEdgegetQuadsAroundEdge (EdgeID id) override
 Returns the set of quads adjacent to a given edge. More...
 
int getVertexIndexInQuad (const Quad &t, PointID vertexIndex) const override
 Returns the index (either 0, 1, 2, 3) of the vertex whose global index is vertexIndex. More...
 
int getEdgeIndexInQuad (const EdgesInQuad &t, EdgeID edheIndex) const override
 Returns the index (either 0, 1, 2, 3) of the edge whose global index is edgeIndex. More...
 
void initTopology ()
 
bool checkTopology () const override
 Checks if the topology is coherent. More...
 
bool checkConnexity () override
 Checks if the topology has only one connected component. More...
 
size_t getNumberOfConnectedComponent () override
 Returns the number of connected component. More...
 
const VecQuadID getConnectedElement (QuadID elem) override
 Returns the set of element indices connected to an input one (i.e. which can be reached by topological links) More...
 
const VecQuadID getElementAroundElement (QuadID elem) override
 Returns the set of element indices adjacent to a given element (i.e. sharing a link) More...
 
const VecQuadID getElementAroundElements (VecQuadID elems) override
 Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link) More...
 
- Public Member Functions inherited from sofa::component::topology::EdgeSetTopologyContainer
 SOFA_CLASS (EdgeSetTopologyContainer, PointSetTopologyContainer)
 
void init () override
 
void reinit () override
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 Returns the type of the topology. More...
 
void clear () override
 
void addEdge (int a, int b) override
 
const SeqEdgesgetEdges () override
 Returns the edge array. More...
 
const Edge getEdge (EdgeID i) override
 Get an Edge from its ID. More...
 
EdgeID getEdgeIndex (PointID v1, PointID v2) override
 Get the index of the edge joining two vertices. More...
 
const EdgesAroundVertexgetEdgesAroundVertex (PointID id) override
 Get the indices of the edges around a vertex. More...
 
void initTopology ()
 
bool checkTopology () const override
 Checks if the topology is coherent. More...
 
size_t getNumberOfEdges () const
 Returns the number of edges in this topology. More...
 
virtual int getNumberConnectedComponents (sofa::helper::vector< unsigned int > &components)
 Returns the number of connected components from the graph containing all edges and give, for each vertex, which component it belongs to (use BOOST GRAPH LIBRAIRY) More...
 
virtual const sofa::helper::vector< Edge > & getEdgeArray ()
 Returns the Edge array. More...
 
Data< sofa::helper::vector< Edge > > & getEdgeDataArray ()
 Returns a reference to the Data of edges array container. More...
 
virtual const sofa::helper::vector< sofa::helper::vector< EdgeID > > & getEdgesAroundVertexArray ()
 Returns the list of Edge indices around each DOF. More...
 
bool hasEdges () const
 
bool hasEdgesAroundVertex () const
 
bool checkConnexity () override
 Checks if the topology has only one connected component. More...
 
size_t getNumberOfConnectedComponent () override
 Returns the number of connected component. More...
 
const VecEdgeID getConnectedElement (EdgeID elem) override
 Returns the set of element indices connected to an input one (i.e. which can be reached by topological links) More...
 
const VecEdgeID getElementAroundElement (EdgeID elem) override
 Returns the set of element indices adjacent to a given element (i.e. sharing a link) More...
 
const VecEdgeID getElementAroundElements (VecEdgeID elems) override
 Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link) More...
 
- Public Member Functions inherited from sofa::component::topology::PointSetTopologyContainer
 SOFA_CLASS (PointSetTopologyContainer, core::topology::TopologyContainer)
 
void init () override
 
const sofa::helper::vector< PointID > & getPoints () const
 
void clear () override
 
void addPoint (double px, double py, double pz) override
 
int getNbPoints () const override
 Returns the number of vertices in this topology. More...
 
Data< InitTypes::VecCoord > & getPointDataArray ()
 Returns a reference to the Data of points array container. More...
 
void setNbPoints (int n) override
 Set the number of vertices in this topology. More...
 
bool hasPos () const override
 check if vertices in this topology have positions. More...
 
SReal getPX (int i) const override
 Returns the X coordinate of the ith DOF. More...
 
SReal getPY (int i) const override
 Returns the Y coordinate of the ith DOF. More...
 
SReal getPZ (int i) const override
 Returns the Z coordinate of the ith DOF. More...
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 Returns the type of the topology. More...
 
bool checkTopology () const override
 Checks if the Topology is coherent. More...
 
void addPoint ()
 add one DOF in this topology (simply increment the number of DOF) More...
 
void addPoints (const unsigned int nPoints)
 add a number of DOFs in this topology (simply increase the number of DOF according to this parameter) More...
 
void removePoint ()
 remove one DOF in this topology (simply decrement the number of DOF) More...
 
void removePoints (const unsigned int nPoints)
 remove a number of DOFs in this topology (simply decrease the number of DOF according to this parameter) More...
 

Protected Member Functions

 HexahedronSetTopologyContainer ()
 
 ~HexahedronSetTopologyContainer () override
 
void createEdgeSetArray () override
 Creates the EdgeSet array. More...
 
void createQuadSetArray () override
 Creates the QuadSet array. More...
 
virtual void createHexahedronSetArray ()
 Creates the HexahedronSet array. More...
 
virtual void createEdgesInHexahedronArray ()
 Creates the array of edge indices for each hexahedron. More...
 
virtual void createQuadsInHexahedronArray ()
 Creates the array of quad indices for each hexahedron. More...
 
virtual void createHexahedraAroundVertexArray ()
 Creates the HexahedraAroundVertex Array. More...
 
virtual void createHexahedraAroundEdgeArray ()
 Creates the HexahedraAroundEdge Array. More...
 
virtual void createHexahedraAroundQuadArray ()
 Creates the HexahedraAroundQuad Array. More...
 
void clearHexahedra ()
 
void clearEdgesInHexahedron ()
 
void clearQuadsInHexahedron ()
 
void clearHexahedraAroundVertex ()
 
void clearHexahedraAroundEdge ()
 
void clearHexahedraAroundQuad ()
 
virtual HexahedraAroundVertexgetHexahedraAroundVertexForModification (const PointID vertexIndex)
 Returns a non-const list of hexahedron indices around a given DOF for subsequent modification. More...
 
virtual HexahedraAroundEdgegetHexahedraAroundEdgeForModification (const EdgeID edgeIndex)
 Returns a non-const list of hexahedron indices around a given edge for subsequent modification. More...
 
virtual HexahedraAroundQuadgetHexahedraAroundQuadForModification (const QuadID quadIndex)
 Returns a non-const list of hexahedron indices around a given quad for subsequent modification. More...
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_hexahedron. More...
 
void setHexahedronTopologyToDirty ()
 
void cleanHexahedronTopologyFromDirty ()
 
const boolisHexahedronTopologyDirty ()
 
- Protected Member Functions inherited from sofa::component::topology::QuadSetTopologyContainer
 QuadSetTopologyContainer ()
 
 ~QuadSetTopologyContainer () override
 
void createEdgeSetArray () override
 Creates the EdgeSet array. More...
 
virtual void createEdgesInQuadArray ()
 Creates the array of edge indices for each quad. More...
 
virtual void createQuadsAroundVertexArray ()
 Creates the QuadsAroundVertex Array. More...
 
virtual void createQuadsAroundEdgeArray ()
 Creates the quadsAroundEdge Array. More...
 
void clearQuads ()
 
void clearEdgesInQuad ()
 
void clearQuadsAroundVertex ()
 
void clearQuadsAroundEdge ()
 
virtual QuadsAroundVertexgetQuadsAroundVertexForModification (const PointID vertexIndex)
 Returns a non-const list of quad indices around a given DOF for subsequent modification. More...
 
virtual QuadsAroundEdgegetQuadsAroundEdgeForModification (const EdgeID edgeIndex)
 Returns a non-const list of quad indices around a given edge for subsequent modification. More...
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_quad. More...
 
void setQuadTopologyToDirty ()
 
void cleanQuadTopologyFromDirty ()
 
const boolisQuadTopologyDirty ()
 
- Protected Member Functions inherited from sofa::component::topology::EdgeSetTopologyContainer
 EdgeSetTopologyContainer ()
 
 ~EdgeSetTopologyContainer () override
 
virtual void createEdgesAroundVertexArray ()
 Creates the EdgesAroundVertex array. More...
 
void clearEdges ()
 
void clearEdgesAroundVertex ()
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_triangle. More...
 
void setEdgeTopologyToDirty ()
 
void cleanEdgeTopologyFromDirty ()
 
const boolisEdgeTopologyDirty ()
 
virtual EdgesAroundVertexgetEdgesAroundVertexForModification (const PointID i)
 Returns a non-const list of Edge indices around the ith DOF for subsequent modification. More...
 
- Protected Member Functions inherited from sofa::component::topology::PointSetTopologyContainer
 PointSetTopologyContainer (int nPoints=0)
 
 ~PointSetTopologyContainer () override
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_point. More...
 
virtual void updateDataEngineGraph (sofa::core::objectmodel::BaseData &my_Data, std::list< sofa::core::topology::TopologyEngine * > &my_enginesList)
 functions to really update the graph of Data/DataEngines linked to the different Data array, using member variable. More...
 
void setPointTopologyToDirty ()
 
void cleanPointTopologyFromDirty ()
 
const boolisPointTopologyDirty ()
 
void addEngineToList (sofa::core::topology::TopologyEngine *_engine)
 function to add a topologyEngine to the current list of engines. More...
 
virtual void displayDataGraph (sofa::core::objectmodel::BaseData &my_Data)
 functions to display the graph of Data/DataEngines linked to the different Data array, using member variable. More...
 

Friends

class HexahedronSetTopologyModifier
 

Attribute details

Data<bool> sofa::component::topology::HexahedronSetTopologyContainer::d_createQuadArray

force the creation of quads

Data< sofa::helper::vector<Hexahedron> > sofa::component::topology::HexahedronSetTopologyContainer::d_hexahedron
protected

provides the set of hexahedra.

sofa::helper::vector< sofa::helper::vector <std::string> > sofa::component::topology::HexahedronSetTopologyContainer::m_dataGraph
protected

variables used to display the graph of Data/DataEngines linked to this Data array.

sofa::helper::vector<EdgesInHexahedron> sofa::component::topology::HexahedronSetTopologyContainer::m_edgesInHexahedron
protected

provides the set of edges for each hexahedron.

sofa::helper::vector< sofa::helper::vector <std::string> > sofa::component::topology::HexahedronSetTopologyContainer::m_enginesGraph
protected
std::list<sofa::core::topology::TopologyEngine *> sofa::component::topology::HexahedronSetTopologyContainer::m_enginesList
protected

List of engines related to this specific container.

sofa::helper::vector< HexahedraAroundEdge > sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedraAroundEdge
protected

for each edge provides the set of hexahedra adjacent to that edge.

sofa::helper::vector< HexahedraAroundQuad > sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedraAroundQuad
protected

for each quad provides the set of hexahedra adjacent to that quad.

sofa::helper::vector< HexahedraAroundVertex > sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedraAroundVertex
protected

for each vertex provides the set of hexahedra adjacent to that vertex.

bool sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronTopologyDirty
protected

Boolean used to know if the topology Data of this container is dirty.

sofa::helper::vector<QuadsInHexahedron> sofa::component::topology::HexahedronSetTopologyContainer::m_quadsInHexahedron
protected

provides the set of quads for each hexahedron.

Constructor details

sofa::component::topology::HexahedronSetTopologyContainer::HexahedronSetTopologyContainer ( )
protected
sofa::component::topology::HexahedronSetTopologyContainer::~HexahedronSetTopologyContainer ( )
inlineoverrideprotected

Function details

void sofa::component::topology::HexahedronSetTopologyContainer::addHexa ( int  a,
int  b,
int  c,
int  d,
int  e,
int  f,
int  g,
int  h 
)
override
bool sofa::component::topology::HexahedronSetTopologyContainer::checkConnexity ( )
override

Checks if the topology has only one connected component.

Get information about connexity of the mesh

Returns
true if only one connected component

Get information about connexity of the mesh

bool sofa::component::topology::HexahedronSetTopologyContainer::checkTopology ( ) const
override

Checks if the topology is coherent.

Check if the shell arrays are coherent

See also
m_hexahedron
m_edgesInHexahedron
m_quadsInHexahedron
m_hexahedraAroundVertex
m_hexahedraAroundEdge
m_hexahedraAroundQuad
void sofa::component::topology::HexahedronSetTopologyContainer::cleanHexahedronTopologyFromDirty ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::clear ( )
override

Procedural creation methods

void sofa::component::topology::HexahedronSetTopologyContainer::clearEdgesInHexahedron ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::clearHexahedra ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::clearHexahedraAroundEdge ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::clearHexahedraAroundQuad ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::clearHexahedraAroundVertex ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::clearQuadsInHexahedron ( )
protected
void sofa::component::topology::HexahedronSetTopologyContainer::createEdgeSetArray ( )
overrideprotectedvirtual

Creates the EdgeSet array.

Create the set of edges when needed.

Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.

void sofa::component::topology::HexahedronSetTopologyContainer::createEdgesInHexahedronArray ( )
protectedvirtual

Creates the array of edge indices for each hexahedron.

This function is only called if the EdgesInHexahedron array is required. m_edgesInHexahedron[i] contains the 12 indices of the 12 edges of each hexahedron.

void sofa::component::topology::HexahedronSetTopologyContainer::createHexahedraAroundEdgeArray ( )
protectedvirtual

Creates the HexahedraAroundEdge Array.

This function is only called if the HexahedraAroundEdge array is required. m_hexahedraAroundEdge[i] contains the indices of all hexahedra adjacent to the ith edge.

void sofa::component::topology::HexahedronSetTopologyContainer::createHexahedraAroundQuadArray ( )
protectedvirtual

Creates the HexahedraAroundQuad Array.

This function is only called if the HexahedraAroundQuad array is required. m_hexahedraAroundQuad[i] contains the indices of all hexahedra adjacent to the ith quad.

void sofa::component::topology::HexahedronSetTopologyContainer::createHexahedraAroundVertexArray ( )
protectedvirtual

Creates the HexahedraAroundVertex Array.

This function is only called if the HexahedraAroundVertex array is required. m_hexahedraAroundVertex[i] contains the indices of all hexahedra adjacent to the ith vertex.

void sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronSetArray ( )
protectedvirtual

Creates the HexahedronSet array.

This function must be implemented by a derived classes.

void sofa::component::topology::HexahedronSetTopologyContainer::createQuadSetArray ( )
overrideprotectedvirtual

Creates the QuadSet array.

Create the array of quads when needed.

Reimplemented from sofa::component::topology::QuadSetTopologyContainer.

void sofa::component::topology::HexahedronSetTopologyContainer::createQuadsInHexahedronArray ( )
protectedvirtual

Creates the array of quad indices for each hexahedron.

This function is only called if the QuadsInHexahedron array is required. m_quadsInHexahedron[i] contains the 6 indices of the 6 quads of each hexahedron.

HexahedronSetTopologyContainer::HexahedronBinaryIndex sofa::component::topology::HexahedronSetTopologyContainer::getBinaryIndexFromLocalIndex ( const unsigned int  li) const
virtual

Get the binary index (array of 3 binary values) from its local index (0<li<8)

Parameters
lilocal index between 0 and 7
Returns
its binary index
const HexahedronSetTopologyContainer::VecHexaID sofa::component::topology::HexahedronSetTopologyContainer::getConnectedElement ( HexaID  elem)
override

Returns the set of element indices connected to an input one (i.e. which can be reached by topological links)

int sofa::component::topology::HexahedronSetTopologyContainer::getEdgeIndexInHexahedron ( const EdgesInHexahedron t,
EdgeID  edgeIndex 
) const
override

Get the position of an edge in a hexahedron from its index.

Parameters
tAn EdgesInhexahedron.
edgeIndexThe index of an edge.
Returns
The position (between 0 and 11) of this edge in the Hexahedron if it is present, -1 otherwise.
const QuadSetTopologyContainer::EdgesInHexahedron & sofa::component::topology::HexahedronSetTopologyContainer::getEdgesInHexahedron ( HexaID  id)
override

Get the 12 edges that form a hexahedron.

Parameters
iThe index of a hexahedron.
Returns
An EdgesInHexahedron containing the indices of the edges.
const sofa::helper::vector< HexahedronSetTopologyContainer::EdgesInHexahedron > & sofa::component::topology::HexahedronSetTopologyContainer::getEdgesInHexahedronArray ( )

Returns the EdgesInHexahedron array (i.e. provide the 12 edge indices for each hexahedron).

const HexahedronSetTopologyContainer::VecHexaID sofa::component::topology::HexahedronSetTopologyContainer::getElementAroundElement ( HexaID  elem)
override

Returns the set of element indices adjacent to a given element (i.e. sharing a link)

const HexahedronSetTopologyContainer::VecHexaID sofa::component::topology::HexahedronSetTopologyContainer::getElementAroundElements ( VecHexaID  elems)
override

Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link)

const SeqHexahedra& sofa::component::topology::HexahedronSetTopologyContainer::getHexahedra ( )
inlineoverride

Get the array of hexahedra.

BaseMeshTopology API

const HexahedronSetTopologyContainer::HexahedraAroundEdge & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundEdge ( EdgeID  id)
override

Get the hexahedra around an edge.

Parameters
iThe index of an edge.
Returns
A HexahedraAroundEdge containing the indices of the hexahedra this edge belongs to.
const sofa::helper::vector< HexahedronSetTopologyContainer::HexahedraAroundEdge > & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundEdgeArray ( )

Returns the HexahedraAroundEdge array (i.e. provide the hexahedron indices adjacent to each edge).

HexahedronSetTopologyContainer::HexahedraAroundEdge & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundEdgeForModification ( const EdgeID  edgeIndex)
protectedvirtual

Returns a non-const list of hexahedron indices around a given edge for subsequent modification.

Returns
HexahedraAroundEdge lists in non-const.
See also
getHexahedraAroundEdge()
const HexahedronSetTopologyContainer::HexahedraAroundQuad & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundQuad ( QuadID  id)
override

Get the hexahedra around a quad.

Parameters
iThe index of a quad.
Returns
A HexahedraAroundQuad containing the indices of the hexahedra this quad belongs to.
const sofa::helper::vector< HexahedronSetTopologyContainer::HexahedraAroundQuad > & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundQuadArray ( )

Returns the HexahedraAroundQuad array (i.e. provide the hexahedron indices adjacent to each quad).

HexahedronSetTopologyContainer::HexahedraAroundQuad & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundQuadForModification ( const QuadID  quadIndex)
protectedvirtual

Returns a non-const list of hexahedron indices around a given quad for subsequent modification.

Returns
HexahedraAroundQuad lists in non-const.
See also
getHexahedraAroundQuad()
const HexahedronSetTopologyContainer::HexahedraAroundVertex & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundVertex ( PointID  id)
override

Get the hexahedra around a vertex.

Parameters
iThe index of a vertex.
Returns
A HexahedraAroundVertex containing the indices of the hexahedra this vertex belongs to.
const sofa::helper::vector< HexahedronSetTopologyContainer::HexahedraAroundVertex > & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundVertexArray ( )

Returns the HexahedraAroundVertex array (i.e. provide the hexahedron indices adjacent to each vertex).

HexahedronSetTopologyContainer::HexahedraAroundVertex & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedraAroundVertexForModification ( const PointID  vertexIndex)
protectedvirtual

Returns a non-const list of hexahedron indices around a given DOF for subsequent modification.

Returns
HexahedraAroundVertex lists in non-const.
See also
getHexahedraAroundVertex()
const HexahedronSetTopologyContainer::Hexahedron sofa::component::topology::HexahedronSetTopologyContainer::getHexahedron ( HexaID  i)
override

Get a hexahedron from its index.

Parameters
iThe index of a hexahedron.
Returns
The corresponding hexahedron.
const sofa::helper::vector< HexahedronSetTopologyContainer::Hexahedron > & sofa::component::topology::HexahedronSetTopologyContainer::getHexahedronArray ( )

Returns the Hexahedron array.

Data< sofa::helper::vector<Hexahedron> >& sofa::component::topology::HexahedronSetTopologyContainer::getHexahedronDataArray ( )
inline

Get the Data which contains the array of hexahedra.

core::topology::Topology::HexahedronID sofa::component::topology::HexahedronSetTopologyContainer::getHexahedronIndex ( PointID  v1,
PointID  v2,
PointID  v3,
PointID  v4,
PointID  v5,
PointID  v6,
PointID  v7,
PointID  v8 
)
override

Get the index of a hexahedron from the indices of its vertices.

Returns
The index of the corresponding hexahedron if it exists, InvalidID otherwise.
HexahedronSetTopologyContainer::Edge sofa::component::topology::HexahedronSetTopologyContainer::getLocalEdgesInHexahedron ( const EdgeID  i) const
override

Returns for each index (between 0 and 11) the two vertex local indices that are adjacent to/forming that edge.

unsigned int sofa::component::topology::HexahedronSetTopologyContainer::getLocalIndexFromBinaryIndex ( const HexahedronBinaryIndex  bi) const
virtual

Get the local hexahedron index (0<i<8) from its 3 binary indices.

Parameters
biarray of 3 binary indices (0 or 1 for each component)
Returns
The corresponding local index between 0 and 7.
HexahedronSetTopologyContainer::Quad sofa::component::topology::HexahedronSetTopologyContainer::getLocalQuadsInHexahedron ( const QuadID  i) const
override

Returns for each index (between 0 and 5) the four vertices local indices that are adjacent to/forming that quad.

QuadSetTopologyContainer::QuadID sofa::component::topology::HexahedronSetTopologyContainer::getNextAdjacentQuad ( const HexaID  _hexaID,
const QuadID  _quadID,
const EdgeID  _edgeID 
)
virtual

Given an EdgesInQuad and a QuadsInHexahedron index in a hexahedron, returns the QuadsInHexahedron index of the quad sharing the same edge.

size_t sofa::component::topology::HexahedronSetTopologyContainer::getNumberOfConnectedComponent ( )
override

Returns the number of connected component.

size_t sofa::component::topology::HexahedronSetTopologyContainer::getNumberOfElements ( ) const
overridevirtual

Returns the number of topological element of the current topology. This function avoids to know which topological container is in used.

Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.

size_t sofa::component::topology::HexahedronSetTopologyContainer::getNumberOfHexahedra ( ) const

Returns the number of hexahedra in this topology. The difference to getNbHexahedra() is that this method does not generate the hexa array if it does not exist.

int sofa::component::topology::HexahedronSetTopologyContainer::getQuadIndexInHexahedron ( const QuadsInHexahedron t,
QuadID  quadIndex 
) const
override

Get the position of a quad in a hexahedron from its index.

Parameters
tA QuadInHexahedron.
quadIndexThe index of a quad.
Returns
The position (between 0 and 5) of this quad in the Hexahedron if it is present, -1 otherwise.
const QuadSetTopologyContainer::QuadsInHexahedron & sofa::component::topology::HexahedronSetTopologyContainer::getQuadsInHexahedron ( HexaID  id)
override

Get the 6 quads that form a hexahedron.

Parameters
iThe index of a hexahedron.
Returns
A QuadsInHexahedron containing the indices of the quads.
const sofa::helper::vector< QuadSetTopologyContainer::QuadsInHexahedron > & sofa::component::topology::HexahedronSetTopologyContainer::getQuadsInHexahedronArray ( )

Returns the QuadsInHexahedron array (i.e. provide the 8 quad indices for each hexahedron).

sofa::core::topology::TopologyObjectType sofa::component::topology::HexahedronSetTopologyContainer::getTopologyType ( ) const
inlineoverride

Returns the type of the topology.

int sofa::component::topology::HexahedronSetTopologyContainer::getVertexIndexInHexahedron ( const Hexahedron t,
PointID  vertexIndex 
) const
override

Get the position of a vertex in a hexahedron from its index.

Parameters
tA Hexahedron.
vertexIndexThe index of a vertex.
Returns
The position (between 0 and 7) of this vertex in the Hexahedron if it is present, -1 otherwise.
bool sofa::component::topology::HexahedronSetTopologyContainer::hasEdgesInHexahedron ( ) const
bool sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedra ( ) const
bool sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedraAroundEdge ( ) const
bool sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedraAroundQuad ( ) const
bool sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedraAroundVertex ( ) const
bool sofa::component::topology::HexahedronSetTopologyContainer::hasQuadsInHexahedron ( ) const
void sofa::component::topology::HexahedronSetTopologyContainer::init ( void  )
override
void sofa::component::topology::HexahedronSetTopologyContainer::initTopology ( )

Method called by component Init method. Will create all the topology neighboorhood buffers and call.

Dynamic Topology API

See also
TriangleSetTopologyContainer::initTopology()
const bool& sofa::component::topology::HexahedronSetTopologyContainer::isHexahedronTopologyDirty ( )
inlineprotected
void sofa::component::topology::HexahedronSetTopologyContainer::setHexahedronTopologyToDirty ( )
protected

Use a specific boolean

See also
m_hexahedronTopologyDirty in order to know if topology Data is dirty or not. Set/Get function access to this boolean
sofa::component::topology::HexahedronSetTopologyContainer::SOFA_CLASS ( HexahedronSetTopologyContainer  ,
QuadSetTopologyContainer   
)
void sofa::component::topology::HexahedronSetTopologyContainer::updateTopologyEngineGraph ( )
overrideprotected

Function creating the data graph linked to d_hexahedron.

Related details

friend class HexahedronSetTopologyModifier
friend