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

#include <HexahedronSetTopologyContainer.h>

Inheritance diagram for sofa::component::topology::container::dynamic::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...
 
Data< sofa::type::vector< Hexahedron > > d_hexahedron
 provides the set of hexahedra. More...
 
- Public Attributes inherited from sofa::component::topology::container::dynamic::QuadSetTopologyContainer
Data< sofa::type::vector< Quad > > d_quad
 provides the set of quads. More...
 
- Public Attributes inherited from sofa::component::topology::container::dynamic::EdgeSetTopologyContainer
Data< boolm_checkConnexity
 
Data< sofa::type::vector< Edge > > d_edge
 List of edge indices. More...
 
Data< boold_checkConnexity
 It true, will check the connexity of the mesh. More...
 
- Public Attributes inherited from sofa::component::topology::container::dynamic::PointSetTopologyContainer
Data< InitTypes::VecCoordd_initPoints
 Initial position of points. More...
 
Data< boold_checkTopology
 Parameter to activate internal topology checks (might slow down the simulation) More...
 
- Public Attributes inherited from sofa::core::topology::TopologyContainer
Data< std::list< const TopologyChange * > > m_changeList
 Array of topology modifications that have already occured (addition) or will occur next (deletion). More...
 
Data< std::list< const TopologyChange * > > m_stateChangeList
 Array of state modifications that have already occured (addition) or will occur next (deletion). More...
 
std::array< std::set< TopologyHandler * >, sofa::geometry::NumberOfElementTypem_topologyHandlerListPerElement {}
 List of topology engines which will interact on all topological Data. More...
 
- Public Attributes inherited from sofa::core::objectmodel::BaseObject
Data< boolf_listening
 if true, handle the events, otherwise ignore the events More...
 
- Public Attributes inherited from sofa::core::objectmodel::Base
std::vector< lifecycle::DeprecatedData * > m_oldAttributes
 
Data< int > d_messageLogCount
 
Data< std::string > name
 Name of the object. More...
 
Data< boolf_printLog
 if true, emits extra messages at runtime. More...
 
Data< sofa::core::objectmodel::TagSetf_tags
 list of the subsets the objet belongs to More...
 
Data< sofa::type::BoundingBoxf_bbox
 this object bounding box More...
 
Data< sofa::core::objectmodel::ComponentStated_componentState
 The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). More...
 
std::string m_definitionSourceFileName {""}
 
int m_definitionSourceFilePos {-1}
 
std::string m_instanciationSourceFileName {""}
 
int m_instanciationSourceFilePos {-1}
 

Protected Attributes

sofa::type::vector< EdgesInHexahedronm_edgesInHexahedron
 provides the set of edges for each hexahedron. More...
 
sofa::type::vector< QuadsInHexahedronm_quadsInHexahedron
 provides the set of quads for each hexahedron. More...
 
sofa::type::vector< HexahedraAroundVertexm_hexahedraAroundVertex
 for each vertex provides the set of hexahedra adjacent to that vertex. More...
 
sofa::type::vector< HexahedraAroundEdgem_hexahedraAroundEdge
 for each edge provides the set of hexahedra adjacent to that edge. More...
 
sofa::type::vector< HexahedraAroundQuadm_hexahedraAroundQuad
 for each quad provides the set of hexahedra adjacent to that quad. More...
 
bool m_hexahedronTopologyDirty = false
 Boolean used to know if the topology Data of this container is dirty. More...
 
- Protected Attributes inherited from sofa::component::topology::container::dynamic::QuadSetTopologyContainer
sofa::type::vector< EdgesInQuadm_edgesInQuad
 provides the 4 edges in each quad. More...
 
sofa::type::vector< QuadsAroundVertexm_quadsAroundVertex
 for each vertex provides the set of quads adjacent to that vertex. More...
 
sofa::type::vector< QuadsAroundEdgem_quadsAroundEdge
 for each edge provides the set of quads adjacent to that edge. More...
 
bool m_quadTopologyDirty = false
 Boolean used to know if the topology Data of this container is dirty. More...
 
- Protected Attributes inherited from sofa::component::topology::container::dynamic::EdgeSetTopologyContainer
sofa::type::vector< EdgesAroundVertexm_edgesAroundVertex
 
bool m_edgeTopologyDirty = false
 Boolean used to know if the topology Data of this container is dirty. More...
 
- Protected Attributes inherited from sofa::component::topology::container::dynamic::PointSetTopologyContainer
bool m_pointTopologyDirty = false
 Boolean used to know if the topology Data of this container is dirty. More...
 
- Protected Attributes inherited from sofa::core::objectmodel::BaseObject
SingleLink< BaseObject, BaseContext, BaseLink::FLAG_DOUBLELINKl_context
 
LinkSlaves l_slaves
 
SingleLink< BaseObject, BaseObject, BaseLink::FLAG_DOUBLELINKl_master
 
- Protected Attributes inherited from sofa::core::objectmodel::Base
std::map< std::string, sofa::core::DataTrackerCallbackm_internalEngine
 
VecData m_vecData
 List of fields (Data instances) More...
 
MapData m_aliasData
 name -> Data multi-map (includes names and aliases) More...
 
VecLink m_vecLink
 List of links. More...
 
MapLink m_aliasLink
 name -> Link multi-map (includes names and aliases) More...
 
- Protected Attributes inherited from sofa::core::topology::BaseMeshTopology
sofa::core::objectmodel::DataFileName fileTopology
 

Public Member Functions

 SOFA_CLASS (HexahedronSetTopologyContainer, QuadSetTopologyContainer)
 
void init () override
 Initialization method called at graph creation and modification, during top-down traversal. More...
 
Size 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 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::type::vector< Hexahedron > & getHexahedronArray ()
 Returns the Hexahedron array. More...
 
const sofa::type::vector< EdgesInHexahedron > & getEdgesInHexahedronArray ()
 Returns the EdgesInHexahedron array (i.e. provide the 12 edge indices for each hexahedron).
More...
 
const sofa::type::vector< QuadsInHexahedron > & getQuadsInHexahedronArray ()
 Returns the QuadsInHexahedron array (i.e. provide the 8 quad indices for each hexahedron).
More...
 
const sofa::type::vector< HexahedraAroundVertex > & getHexahedraAroundVertexArray ()
 Returns the HexahedraAroundVertex array (i.e. provide the hexahedron indices adjacent to each vertex). More...
 
const sofa::type::vector< HexahedraAroundEdge > & getHexahedraAroundEdgeArray ()
 Returns the HexahedraAroundEdge array (i.e. provide the hexahedron indices adjacent to each edge). More...
 
const sofa::type::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::geometry::ElementType getTopologyType () const override
 Returns the type of the topology. More...
 
bool linkTopologyHandlerToData (core::topology::TopologyHandler *topologyHandler, sofa::geometry::ElementType elementType) override
 
bool unlinkTopologyHandlerToData (core::topology::TopologyHandler *topologyHandler, sofa::geometry::ElementType elementType) override
 
void clear () override
 
void addHexa (Index a, Index b, Index c, Index d, Index e, Index f, Index g, Index h) override
 
const SeqHexahedragetHexahedra () override
 Get 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 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::container::dynamic::QuadSetTopologyContainer
 SOFA_CLASS (QuadSetTopologyContainer, EdgeSetTopologyContainer)
 
void init () override
 Initialization method called at graph creation and modification, during top-down traversal. More...
 
Size 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 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::type::vector< Quad > & getQuadArray ()
 Returns the Quad array. More...
 
const sofa::type::vector< EdgesInQuad > & getEdgesInQuadArray ()
 Returns the EdgesInQuadArray array (i.e. provide the 4 edge indices for each quad) More...
 
const sofa::type::vector< QuadsAroundVertex > & getQuadsAroundVertexArray ()
 Returns the QuadsAroundVertex array (i.e. provide the quad indices adjacent to each vertex). More...
 
const sofa::type::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::geometry::ElementType getTopologyType () const override
 Returns the type of the topology. More...
 
bool linkTopologyHandlerToData (core::topology::TopologyHandler *topologyHandler, sofa::geometry::ElementType elementType) override
 
bool unlinkTopologyHandlerToData (core::topology::TopologyHandler *topologyHandler, sofa::geometry::ElementType elementType) override
 
void clear () override
 
void addQuad (Index a, Index b, Index c, Index d) override
 
const SeqQuadsgetQuads () override
 Returns the quad array. 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 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::container::dynamic::EdgeSetTopologyContainer
 SOFA_CLASS (EdgeSetTopologyContainer, PointSetTopologyContainer)
 
void reinit () override
 Update method called when variables used in precomputation are modified. More...
 
void addEdge (Index a, Index 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 ()
 
Size getNumberOfEdges () const
 Returns the number of edges in this topology. More...
 
virtual int getNumberConnectedComponents (sofa::type::vector< EdgeID > &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::type::vector< Edge > & getEdgeArray ()
 Returns the Edge array. More...
 
virtual const sofa::type::vector< sofa::type::vector< EdgeID > > & getEdgesAroundVertexArray ()
 Returns the list of Edge indices around each DOF. More...
 
bool hasEdges () const
 
bool hasEdgesAroundVertex () const
 
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::container::dynamic::PointSetTopologyContainer
 SOFA_CLASS (PointSetTopologyContainer, core::topology::TopologyContainer)
 
void addPoint (SReal px, SReal py, SReal pz) override
 
Size getNbPoints () const override
 Returns the number of vertices in this topology. More...
 
void setNbPoints (Size 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 (Index i) const override
 Returns the X coordinate of the ith DOF. More...
 
SReal getPY (Index i) const override
 Returns the Y coordinate of the ith DOF. More...
 
SReal getPZ (Index i) const override
 Returns the Z coordinate of the ith DOF. More...
 
void addPoint ()
 add one DOF in this topology (simply increment the number of DOF) More...
 
void addPoints (const Size 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 Size nPoints)
 remove a number of DOFs in this topology (simply decrease the number of DOF according to this parameter) More...
 
- Public Member Functions inherited from sofa::core::topology::TopologyContainer
 SOFA_CLASS2 (TopologyContainer, BaseTopologyObject, BaseMeshTopology)
 
void init () override
 Initialization method called at graph creation and modification, during top-down traversal. More...
 
const SeqEdgesgetEdges () override
 
const SeqTrianglesgetTriangles () override
 
const SeqQuadsgetQuads () override
 
const SeqTetrahedragetTetrahedra () override
 
const SeqHexahedragetHexahedra () override
 
int getRevision () const override
 Get the current revision of this mesh. More...
 
const std::list< const TopologyChange * > & getChangeList () const
 
const std::list< const TopologyChange * > & getStateChangeList () const
 
const Data< std::list< const TopologyChange * > > & getDataChangeList () const
 
const Data< std::list< const TopologyChange * > > & getDataStateChangeList () const
 
virtual void addTopologyChange (const TopologyChange *topologyChange)
 Adds a TopologyChange to the list. More...
 
virtual void addStateChange (const TopologyChange *topologyChange)
 Adds a StateChange to the list. More...
 
std::list< const TopologyChange * >::const_iterator beginChange () const override
 Provides an iterator on the first element in the list of TopologyChange objects. More...
 
std::list< const TopologyChange * >::const_iterator endChange () const override
 Provides an iterator on the last element in the list of TopologyChange objects. More...
 
std::list< const TopologyChange * >::const_iterator beginStateChange () const override
 Provides an iterator on the first element in the list of StateChange objects. More...
 
std::list< const TopologyChange * >::const_iterator endStateChange () const override
 Provides an iterator on the last element in the list of StateChange objects. More...
 
virtual void resetTopologyChangeList ()
 Free each Topology changes in the list and remove them from the list. More...
 
virtual void resetStateChangeList ()
 Free each State changes in the list and remove them from the list. More...
 
const std::set< TopologyHandler * > & getTopologyHandlerList (sofa::geometry::ElementType elementType) const
 
bool addTopologyHandler (TopologyHandler *_TopologyHandler, sofa::geometry::ElementType elementType)
 Adds a TopologyHandler, linked to a certain type of Element. More...
 
void removeTopologyHandler (TopologyHandler *_TopologyHandler, sofa::geometry::ElementType elementType)
 Remove a TopologyHandler, linked to a certain type of Element. More...
 
void resetTopologyHandlerList ()
 Free each Topology changes in the list and remove them from the list. More...
 
bool insertInNode (objectmodel::BaseNode *node) override
 
bool removeInNode (objectmodel::BaseNode *node) override
 
- Public Member Functions inherited from sofa::core::topology::BaseTopologyObject
 SOFA_CLASS (BaseTopologyObject, core::objectmodel::BaseObject)
 
bool insertInNode (objectmodel::BaseNode *node) override
 
bool removeInNode (objectmodel::BaseNode *node) override
 
- Public Member Functions inherited from sofa::core::objectmodel::BaseObject
 SOFA_CLASS (BaseObject, Base)
 
virtual void draw (const core::visual::VisualParams *)
 Render internal data of this object, for debugging purposes. More...
 
virtual void computeBBox (const core::ExecParams *, bool=false)
 
void setSrc (const std::string &v, std::vector< std::string > *attributeList=nullptr)
 Sets a source Object and parses it to collect dependent Data. More...
 
void setSrc (const std::string &v, const BaseObject *loader, std::vector< std::string > *attributeList=nullptr)
 
BasefindLinkDestClass (const BaseClass *destType, const std::string &path, const BaseLink *link) override
 
virtual std::string getPathName () const override
 Return the full path name of this object. More...
 
SReal getTime () const
 Current time. More...
 
const BaseContextgetContext () const
 
BaseContextgetContext ()
 
const BaseObjectgetMaster () const
 
BaseObjectgetMaster ()
 
const VecSlavesgetSlaves () const
 
BaseObjectgetSlave (const std::string &name) const
 
virtual void addSlave (BaseObject::SPtr s)
 
virtual void removeSlave (BaseObject::SPtr s)
 
virtual void handleEvent (Event *)
 Handle an event. More...
 
virtual void handleTopologyChange ()
 
virtual void handleTopologyChange (core::topology::Topology *t)
 
void parse (BaseObjectDescription *arg) override
 Parse the given description to assign values to this object's fields and potentially other parameters. More...
 
virtual void bwdInit ()
 Initialization method called at graph creation and modification, during bottom-up traversal. More...
 
void updateInternal ()
 Update method called when variables (used to compute other internal variables) are modified. More...
 
virtual void storeResetState ()
 Save the initial state for later uses in reset() More...
 
virtual void reset ()
 Reset to initial state. More...
 
virtual void cleanup ()
 
- Public Member Functions inherited from sofa::core::objectmodel::Base
virtual const BaseClassgetClass () const
 
void addDeprecatedAttribute (lifecycle::DeprecatedData *attribute)
 
void addUpdateCallback (const std::string &name, std::initializer_list< BaseData * > inputs, std::function< sofa::core::objectmodel::ComponentState(const DataTracker &)> function, std::initializer_list< BaseData * > outputs)
 
void addOutputsToCallback (const std::string &name, std::initializer_list< BaseData * > outputs)
 
const std::string & getName () const
 Accessor to the object name. More...
 
void setName (const std::string &n)
 Set the name of this object. More...
 
void setName (const std::string &n, int counter)
 Set the name of this object, adding an integer counter. More...
 
std::string getTypeName () const
 Get the type name of this object (i.e. class and template types) More...
 
virtual std::string getClassName () const
 Get the class name of this object. More...
 
virtual std::string getTemplateName () const final
 Get the template type names (if any) used to instantiate this object. More...
 
std::string getNameSpaceName () const
 Get the template type names (if any) used to instantiate this object. More...
 
void setDefinitionSourceFileName (const std::string &sourceFileName)
 Set the source filename (where the component is implemented) More...
 
const std::string & getDefinitionSourceFileName () const
 Get the source filename (where the component is implemented) More...
 
void setDefinitionSourceFilePos (const int)
 Set the source location (where the component is implemented) More...
 
int getDefinitionSourceFilePos () const
 Get the source location (where the component is implemented) More...
 
void setInstanciationSourceFileName (const std::string &sourceFileName)
 
const std::string & getInstanciationSourceFileName () const
 
void setInstanciationSourceFilePos (const int)
 
int getInstanciationSourceFilePos () const
 
void addMessage (const sofa::helper::logging::Message &m) const
 
size_t countLoggedMessages (sofa::helper::logging::Message::TypeSet t=sofa::helper::logging::Message::AnyTypes) const
 
const std::deque< sofa::helper::logging::Message > & getLoggedMessages () const
 
const std::string getLoggedMessagesAsString (sofa::helper::logging::Message::TypeSet t=sofa::helper::logging::Message::AnyTypes) const
 
void clearLoggedMessages () const
 
bool notMuted () const
 
const sofa::core::objectmodel::TagSetgetTags () const
 Represents the subsets the object belongs to. More...
 
bool hasTag (Tag t) const
 Return true if the object belong to the given subset. More...
 
void addTag (Tag t)
 Add a subset qualification to the object. More...
 
void removeTag (Tag t)
 Remove a subset qualification to the object. More...
 
ComponentState getComponentState () const
 
bool isComponentStateValid () const
 
virtual bool parseField (const std::string &attribute, const std::string &value)
 Assign one field value (Data or Link) More...
 
virtual bool hasField (const std::string &attribute) const
 Check if a given Data field or Link exists. More...
 
void parseFields (const std::list< std::string > &str)
 Assign the field values stored in the given list of name + value pairs of strings. More...
 
virtual void parseFields (const std::map< std::string, std::string * > &str)
 Assign the field values stored in the given map of name -> value pairs. More...
 
void writeDatas (std::map< std::string, std::string * > &str)
 Write the current field values to the given map of name -> value pairs. More...
 
void writeDatas (std::ostream &out, const std::string &separator=" ")
 
BaseDatafindData (const std::string &name) const
 
std::vector< BaseData * > findGlobalField (const std::string &name) const
 Find data fields given a name: several can be found as we look into the alias map. More...
 
BaseLinkfindLink (const std::string &name) const
 
std::vector< BaseLink * > findLinks (const std::string &name) const
 Find link fields given a name: several can be found as we look into the alias map. More...
 
virtual void updateLinks (bool logErrors=true)
 Update pointers in case the pointed-to objects have appeared. More...
 
template<class T >
BaseData::BaseInitData initData (::sofa::core::objectmodel::Data< T > *field, const char *name, const char *help, ::sofa::core::objectmodel::BaseData::DataFlags dataflags)
 Helper method used to initialize a data field containing a value of type T. More...
 
template<class T >
BaseData::BaseInitData initData (Data< T > *field, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used to initialize a data field containing a value of type T. More...
 
template<class T >
Data< T >::InitData initData (Data< T > *field, const T &value, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used to initialize a data field containing a value of type T. More...
 
void addData (BaseData *f, const std::string &name)
 
void addData (BaseData *f)
 
void removeData (BaseData *f)
 Remove a data field. More...
 
void addAlias (BaseData *field, const char *alias)
 Add an alias to a Data. More...
 
void addLink (BaseLink *l)
 Add a link. More...
 
void addAlias (BaseLink *link, const char *alias)
 Add an alias to a Link. More...
 
const VecDatagetDataFields () const
 Accessor to the vector containing all the fields of this object. More...
 
const MapDatagetDataAliases () const
 Accessor to the map containing all the aliases of this object. More...
 
const VecLinkgetLinks () const
 Accessor to the vector containing all the fields of this object. More...
 
const MapLinkgetLinkAliases () const
 Accessor to the map containing all the aliases of this object. More...
 
virtual bool findDataLinkDest (BaseData *&ptr, const std::string &path, const BaseLink *link)
 
template<class T >
bool findLinkDest (T *&ptr, const std::string &path, const BaseLink *link)
 
- Public Member Functions inherited from sofa::core::topology::BaseMeshTopology
 SOFA_ABSTRACT_CLASS (BaseMeshTopology, core::topology::Topology)
 
virtual bool load (const char *filename)
 
virtual std::string getFilename () const
 
virtual EdgeID getEdgeIndex (PointID v1, PointID v2)
 Returns the index of the edge joining vertex v1 and vertex v2; returns InvalidID if no edge exists. More...
 
virtual TriangleID getTriangleIndex (PointID v1, PointID v2, PointID v3)
 Returns the index of the triangle given three vertex indices; returns InvalidID if no triangle exists. More...
 
virtual QuadID getQuadIndex (PointID v1, PointID v2, PointID v3, PointID v4)
 Returns the index of the quad given four vertex indices; returns InvalidID if no quad exists. More...
 
virtual TetrahedronID getTetrahedronIndex (PointID v1, PointID v2, PointID v3, PointID v4)
 Returns the index of the tetrahedron given four vertex indices; returns InvalidID if no tetrahedron exists. More...
 
virtual HexahedronID getHexahedronIndex (PointID v1, PointID v2, PointID v3, PointID v4, PointID v5, PointID v6, PointID v7, PointID v8)
 Returns the index of the hexahedron given eight vertex indices; returns InvalidID if no hexahedron exists. More...
 
virtual int getVertexIndexInTriangle (const Triangle &t, PointID vertexIndex) const
 
virtual int getEdgeIndexInTriangle (const EdgesInTriangle &t, EdgeID edgeIndex) const
 
virtual int getVertexIndexInQuad (const Quad &t, PointID vertexIndex) const
 
virtual int getEdgeIndexInQuad (const EdgesInQuad &t, EdgeID edgeIndex) const
 
virtual int getVertexIndexInTetrahedron (const Tetra &t, PointID vertexIndex) const
 
virtual int getEdgeIndexInTetrahedron (const EdgesInTetrahedron &t, EdgeID edgeIndex) const
 
virtual int getTriangleIndexInTetrahedron (const TrianglesInTetrahedron &t, TriangleID triangleIndex) const
 
virtual int getVertexIndexInHexahedron (const Hexa &t, PointID vertexIndex) const
 
virtual int getEdgeIndexInHexahedron (const EdgesInHexahedron &t, EdgeID edgeIndex) const
 
virtual Edge getLocalEdgesInTetrahedron (const PointID i) const
 Returns for each index (between 0 and 5) the two vertex indices that are adjacent to that edge. More...
 
virtual Triangle getLocalTrianglesInTetrahedron (const PointID i) const
 Returns for each index (between 0 and 3) the three local vertices indices that are adjacent to that triangle. More...
 
virtual Edge getLocalEdgesInHexahedron (const PointID i) const
 Returns for each index (between 0 and 12) the two vertex indices that are adjacent to that edge. More...
 
virtual void reOrientateTriangle (TriangleID id)
 Will change order of vertices in triangle: t[1] <=> t[2]. More...
 
virtual const sofa::type::vector< TriangleID > & getTrianglesOnBorder ()
 Returns the set of triangles on the border of the triangulation. More...
 
virtual const sofa::type::vector< EdgeID > & getEdgesOnBorder ()
 Returns the set of edges on the border of the triangulation. More...
 
virtual const sofa::type::vector< PointID > & getPointsOnBorder ()
 Returns the set of points on the border of the triangulation. More...
 
virtual Size getNbEdges ()
 
virtual Size getNbTriangles ()
 
virtual Size getNbQuads ()
 
virtual Size getNbTetrahedra ()
 
virtual Size getNbHexahedra ()
 
virtual const Edge getEdge (EdgeID i)
 
virtual const Triangle getTriangle (TriangleID i)
 
virtual const Quad getQuad (QuadID i)
 
virtual const Tetra getTetrahedron (TetraID i)
 
virtual Size getNbTetras ()
 
virtual Size getNbHexas ()
 
virtual Tetra getTetra (TetraID i)
 
virtual Hexa getHexa (HexaID i)
 
virtual const SeqTetrahedragetTetras ()
 
virtual const SeqHexahedragetHexas ()
 
virtual const EdgesAroundVertexgetEdgesAroundVertex (PointID i)
 Returns the set of edges adjacent to a given vertex. More...
 
virtual const EdgesInTrianglegetEdgesInTriangle (TriangleID i)
 Returns the set of edges adjacent to a given triangle. More...
 
virtual const EdgesInQuadgetEdgesInQuad (QuadID i)
 Returns the set of edges adjacent to a given quad. More...
 
virtual const EdgesInTetrahedrongetEdgesInTetrahedron (TetraID i)
 Returns the set of edges adjacent to a given tetrahedron. More...
 
virtual const TrianglesAroundVertexgetTrianglesAroundVertex (PointID i)
 Returns the set of triangles adjacent to a given vertex. More...
 
virtual const TrianglesAroundEdgegetTrianglesAroundEdge (EdgeID i)
 Returns the set of triangles adjacent to a given edge. More...
 
virtual const TrianglesInTetrahedrongetTrianglesInTetrahedron (TetraID i)
 Returns the set of triangles adjacent to a given tetrahedron. More...
 
virtual const QuadsAroundVertexgetQuadsAroundVertex (PointID i)
 Returns the set of quads adjacent to a given vertex. More...
 
virtual const QuadsAroundEdgegetQuadsAroundEdge (EdgeID i)
 Returns the set of quads adjacent to a given edge. More...
 
virtual const TetrahedraAroundVertexgetTetrahedraAroundVertex (PointID i)
 Returns the set of tetrahedra adjacent to a given vertex. More...
 
virtual const TetrahedraAroundEdgegetTetrahedraAroundEdge (EdgeID i)
 Returns the set of tetrahedra adjacent to a given edge. More...
 
virtual const TetrahedraAroundTrianglegetTetrahedraAroundTriangle (TriangleID i)
 Returns the set of tetrahedra adjacent to a given triangle. More...
 
virtual const HexahedraAroundVertexgetHexahedraAroundVertex (PointID i)
 Returns the set of hexahedra adjacent to a given vertex. More...
 
virtual const HexahedraAroundEdgegetHexahedraAroundEdge (EdgeID i)
 Returns the set of hexahedra adjacent to a given edge. More...
 
virtual const VerticesAroundVertex getVerticesAroundVertex (PointID i)
 Returns the set of vertices adjacent to a given vertex (i.e. sharing an edge) More...
 
virtual const sofa::type::vector< IndexgetElementAroundElements (sofa::type::vector< Index > elems)
 Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link) More...
 
const SeqLinesgetLines ()
 
Size getNbLines ()
 
Line getLine (LineID i)
 
bool hasPos () const override
 
SReal getPX (Index) const override
 
SReal getPY (Index) const override
 
SReal getPZ (Index) const override
 
void addLine (Index a, Index b)
 
virtual void addTriangle (Index a, Index b, Index c)
 
virtual void addTetra (Index a, Index b, Index c, Index d)
 
- Public Member Functions inherited from sofa::core::topology::Topology
 SOFA_CLASS (Topology, core::objectmodel::BaseObject)
 
bool insertInNode (objectmodel::BaseNode *node) override
 
bool removeInNode (objectmodel::BaseNode *node) override
 

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 setHexahedronTopologyToDirty ()
 
void cleanHexahedronTopologyFromDirty ()
 
const boolisHexahedronTopologyDirty ()
 
- Protected Member Functions inherited from sofa::component::topology::container::dynamic::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 setQuadTopologyToDirty ()
 
void cleanQuadTopologyFromDirty ()
 
const boolisQuadTopologyDirty ()
 
- Protected Member Functions inherited from sofa::component::topology::container::dynamic::EdgeSetTopologyContainer
 EdgeSetTopologyContainer ()
 
 ~EdgeSetTopologyContainer () override
 
virtual void createEdgesAroundVertexArray ()
 Creates the EdgesAroundVertex array. More...
 
void clearEdges ()
 
void clearEdgesAroundVertex ()
 
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::container::dynamic::PointSetTopologyContainer
 PointSetTopologyContainer (Size nPoints=0)
 
 ~PointSetTopologyContainer () override=default
 
void setPointTopologyToDirty ()
 
void cleanPointTopologyFromDirty ()
 
const boolisPointTopologyDirty () const
 
- Protected Member Functions inherited from sofa::core::topology::TopologyContainer
 TopologyContainer ()
 Constructor. More...
 
 ~TopologyContainer () override
 Destructor. More...
 
- Protected Member Functions inherited from sofa::core::topology::BaseTopologyObject
 BaseTopologyObject ()
 
 ~BaseTopologyObject () override
 
- Protected Member Functions inherited from sofa::core::objectmodel::BaseObject
 BaseObject ()
 
 ~BaseObject () override
 
virtual void doUpdateInternal ()
 Implementation of the internal update. More...
 
void changeContextLink (BaseContext *before, BaseContext *&after)
 
void changeSlavesLink (BaseObject::SPtr ptr, std::size_t, bool add)
 This method insures that slaves objects have master and context links set correctly. More...
 
void trackInternalData (const BaseData &data)
 Method called to add the Data to the DataTracker (listing the Data to track) More...
 
void cleanTracker ()
 
bool hasDataChanged (const BaseData &data)
 Method called to know if a tracked Data has changed. More...
 
- Protected Member Functions inherited from sofa::core::objectmodel::Base
 Base ()
 
virtual ~Base ()
 
void initData0 (BaseData *field, BaseData::BaseInitData &res, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used by initData() More...
 
void initData0 (BaseData *field, BaseData::BaseInitData &res, const char *name, const char *help, BaseData::DataFlags dataFlags)
 Helper method used by initData() More...
 
template<class T >
void initData0 (Data< T > *field, typename Data< T >::InitData &res, const T &value, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used by initData() More...
 
- Protected Member Functions inherited from sofa::core::topology::BaseMeshTopology
 BaseMeshTopology ()
 
- Protected Member Functions inherited from sofa::core::topology::Topology
 Topology ()
 
virtual ~Topology ()
 

Friends

class HexahedronSetTopologyModifier
 

Additional Inherited Members

- Static Public Attributes inherited from sofa::core::topology::BaseMeshTopology
static constexpr EdgesInTriangle InvalidEdgesInTriangles = type::makeHomogeneousArray<EdgesInTriangle>(sofa::InvalidID)
 
static constexpr EdgesInQuad InvalidEdgesInQuad = type::makeHomogeneousArray<EdgesInQuad>(sofa::InvalidID)
 
static constexpr TrianglesInTetrahedron InvalidTrianglesInTetrahedron = type::makeHomogeneousArray<TrianglesInTetrahedron>(sofa::InvalidID)
 
static constexpr EdgesInTetrahedron InvalidEdgesInTetrahedron = type::makeHomogeneousArray<EdgesInTetrahedron>(sofa::InvalidID)
 
static constexpr QuadsInHexahedron InvalidQuadsInHexahedron = type::makeHomogeneousArray<QuadsInHexahedron>(sofa::InvalidID)
 
static constexpr EdgesInHexahedron InvalidEdgesInHexahedron = type::makeHomogeneousArray<EdgesInHexahedron>(sofa::InvalidID)
 
- Static Public Attributes inherited from sofa::core::topology::Topology
static constexpr Index InvalidID = sofa::InvalidID
 
static const auto InvalidSet = sofa::topology::InvalidSet
 
static constexpr auto InvalidEdge = sofa::topology::InvalidEdge
 
static constexpr auto InvalidTriangle = sofa::topology::InvalidTriangle
 
static constexpr auto InvalidQuad = sofa::topology::InvalidQuad
 
static constexpr auto InvalidTetrahedron = sofa::topology::InvalidTetrahedron
 
static constexpr auto InvalidPentahedron = sofa::topology::InvalidPentahedron
 
static constexpr auto InvalidHexahedron = sofa::topology::InvalidHexahedron
 
static constexpr auto InvalidPyramid = sofa::topology::InvalidPyramid
 
- Static Public Member Functions inherited from sofa::core::objectmodel::BaseObject
template<class T >
static bool canCreate (T *, BaseContext *, BaseObjectDescription *)
 Pre-construction check method called by ObjectFactory. More...
 
template<class T >
static T::SPtr create (T *, BaseContext *context, BaseObjectDescription *arg)
 Construction method called by ObjectFactory. More...
 
- Static Public Member Functions inherited from sofa::core::objectmodel::Base
static const BaseClassGetClass ()
 
template<class T >
static std::string shortName (const T *ptr=nullptr, BaseObjectDescription *=nullptr)
 

Attribute details

◆ d_createQuadArray

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

force the creation of quads

◆ d_hexahedron

Data< sofa::type::vector<Hexahedron> > sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::d_hexahedron

provides the set of hexahedra.

◆ m_edgesInHexahedron

sofa::type::vector<EdgesInHexahedron> sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::m_edgesInHexahedron
protected

provides the set of edges for each hexahedron.

◆ m_hexahedraAroundEdge

sofa::type::vector< HexahedraAroundEdge > sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::m_hexahedraAroundEdge
protected

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

◆ m_hexahedraAroundQuad

sofa::type::vector< HexahedraAroundQuad > sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::m_hexahedraAroundQuad
protected

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

◆ m_hexahedraAroundVertex

sofa::type::vector< HexahedraAroundVertex > sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::m_hexahedraAroundVertex
protected

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

◆ m_hexahedronTopologyDirty

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::m_hexahedronTopologyDirty = false
protected

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

◆ m_quadsInHexahedron

sofa::type::vector<QuadsInHexahedron> sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::m_quadsInHexahedron
protected

provides the set of quads for each hexahedron.

Constructor details

◆ HexahedronSetTopologyContainer()

sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::HexahedronSetTopologyContainer ( )
protected

◆ ~HexahedronSetTopologyContainer()

sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::~HexahedronSetTopologyContainer ( )
inlineoverrideprotected

Function details

◆ addHexa()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::addHexa ( Index  a,
Index  b,
Index  c,
Index  d,
Index  e,
Index  f,
Index  g,
Index  h 
)
overridevirtual

◆ checkConnexity()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::checkConnexity ( )
overridevirtual

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

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

◆ checkTopology()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::checkTopology ( ) const
overridevirtual

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

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

◆ cleanHexahedronTopologyFromDirty()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::cleanHexahedronTopologyFromDirty ( )
protected

◆ clear()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clear ( )
overridevirtual

◆ clearEdgesInHexahedron()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clearEdgesInHexahedron ( )
protected

◆ clearHexahedra()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clearHexahedra ( )
protected

◆ clearHexahedraAroundEdge()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clearHexahedraAroundEdge ( )
protected

◆ clearHexahedraAroundQuad()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clearHexahedraAroundQuad ( )
protected

◆ clearHexahedraAroundVertex()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clearHexahedraAroundVertex ( )
protected

◆ clearQuadsInHexahedron()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::clearQuadsInHexahedron ( )
protected

◆ createEdgeSetArray()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::createEdgeSetArray ( )
overrideprotectedvirtual

Creates the EdgeSet array.

Create the set of edges when needed.

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

◆ createEdgesInHexahedronArray()

void sofa::component::topology::container::dynamic::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.

◆ createHexahedraAroundEdgeArray()

void sofa::component::topology::container::dynamic::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.

◆ createHexahedraAroundQuadArray()

void sofa::component::topology::container::dynamic::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.

◆ createHexahedraAroundVertexArray()

void sofa::component::topology::container::dynamic::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.

◆ createHexahedronSetArray()

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

Creates the HexahedronSet array.

This function must be implemented by a derived classes.

◆ createQuadSetArray()

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

Creates the QuadSet array.

Create the array of quads when needed.

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

◆ createQuadsInHexahedronArray()

void sofa::component::topology::container::dynamic::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.

◆ getBinaryIndexFromLocalIndex()

HexahedronSetTopologyContainer::HexahedronBinaryIndex sofa::component::topology::container::dynamic::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

◆ getConnectedElement()

const HexahedronSetTopologyContainer::VecHexaID sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getConnectedElement ( HexaID  elem)
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getEdgeIndexInHexahedron()

int sofa::component::topology::container::dynamic::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.

◆ getEdgesInHexahedron()

const QuadSetTopologyContainer::EdgesInHexahedron & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getEdgesInHexahedron ( HexaID  id)
overridevirtual

Get the 12 edges that form a hexahedron.

Parameters
iThe index of a hexahedron.
Returns
An EdgesInHexahedron containing the indices of the edges.

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getEdgesInHexahedronArray()

const sofa::type::vector< HexahedronSetTopologyContainer::EdgesInHexahedron > & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getEdgesInHexahedronArray ( )

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

◆ getElementAroundElement()

const HexahedronSetTopologyContainer::VecHexaID sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getElementAroundElement ( HexaID  elem)
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getElementAroundElements()

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

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

◆ getHexahedra()

const SeqHexahedra& sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedra ( )
inlineoverridevirtual

Get the array of hexahedra.

BaseMeshTopology API

Implements sofa::core::topology::BaseMeshTopology.

◆ getHexahedraAroundEdge()

const HexahedronSetTopologyContainer::HexahedraAroundEdge & sofa::component::topology::container::dynamic::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.

◆ getHexahedraAroundEdgeArray()

const sofa::type::vector< HexahedronSetTopologyContainer::HexahedraAroundEdge > & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedraAroundEdgeArray ( )

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

◆ getHexahedraAroundEdgeForModification()

HexahedronSetTopologyContainer::HexahedraAroundEdge & sofa::component::topology::container::dynamic::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()

◆ getHexahedraAroundQuad()

const HexahedronSetTopologyContainer::HexahedraAroundQuad & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedraAroundQuad ( QuadID  id)
overridevirtual

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.

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getHexahedraAroundQuadArray()

const sofa::type::vector< HexahedronSetTopologyContainer::HexahedraAroundQuad > & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedraAroundQuadArray ( )

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

◆ getHexahedraAroundQuadForModification()

HexahedronSetTopologyContainer::HexahedraAroundQuad & sofa::component::topology::container::dynamic::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()

◆ getHexahedraAroundVertex()

const HexahedronSetTopologyContainer::HexahedraAroundVertex & sofa::component::topology::container::dynamic::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.

◆ getHexahedraAroundVertexArray()

const sofa::type::vector< HexahedronSetTopologyContainer::HexahedraAroundVertex > & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedraAroundVertexArray ( )

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

◆ getHexahedraAroundVertexForModification()

HexahedronSetTopologyContainer::HexahedraAroundVertex & sofa::component::topology::container::dynamic::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()

◆ getHexahedron()

const HexahedronSetTopologyContainer::Hexahedron sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedron ( HexaID  i)
overridevirtual

Get a hexahedron from its index.

Parameters
iThe index of a hexahedron.
Returns
The corresponding hexahedron.

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getHexahedronArray()

const sofa::type::vector< HexahedronSetTopologyContainer::Hexahedron > & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getHexahedronArray ( )

Returns the Hexahedron array.

◆ getHexahedronIndex()

core::topology::Topology::HexahedronID sofa::component::topology::container::dynamic::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.

◆ getLocalEdgesInHexahedron()

HexahedronSetTopologyContainer::Edge sofa::component::topology::container::dynamic::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.

◆ getLocalIndexFromBinaryIndex()

unsigned int sofa::component::topology::container::dynamic::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.

◆ getLocalQuadsInHexahedron()

HexahedronSetTopologyContainer::Quad sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getLocalQuadsInHexahedron ( const QuadID  i) const
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getNextAdjacentQuad()

QuadSetTopologyContainer::QuadID sofa::component::topology::container::dynamic::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.

◆ getNumberOfConnectedComponent()

Size sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getNumberOfConnectedComponent ( )
overridevirtual

Returns the number of connected component.

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

◆ getNumberOfElements()

Size sofa::component::topology::container::dynamic::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::container::dynamic::EdgeSetTopologyContainer.

◆ getNumberOfHexahedra()

Size sofa::component::topology::container::dynamic::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.

◆ getQuadIndexInHexahedron()

int sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getQuadIndexInHexahedron ( const QuadsInHexahedron t,
QuadID  quadIndex 
) const
overridevirtual

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.

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getQuadsInHexahedron()

const QuadSetTopologyContainer::QuadsInHexahedron & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getQuadsInHexahedron ( HexaID  id)
overridevirtual

Get the 6 quads that form a hexahedron.

Parameters
iThe index of a hexahedron.
Returns
A QuadsInHexahedron containing the indices of the quads.

Reimplemented from sofa::core::topology::BaseMeshTopology.

◆ getQuadsInHexahedronArray()

const sofa::type::vector< QuadSetTopologyContainer::QuadsInHexahedron > & sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getQuadsInHexahedronArray ( )

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

◆ getTopologyType()

sofa::geometry::ElementType sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::getTopologyType ( ) const
inlineoverridevirtual

Returns the type of the topology.

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

◆ getVertexIndexInHexahedron()

int sofa::component::topology::container::dynamic::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.

◆ hasEdgesInHexahedron()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::hasEdgesInHexahedron ( ) const

◆ hasHexahedra()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::hasHexahedra ( ) const

◆ hasHexahedraAroundEdge()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::hasHexahedraAroundEdge ( ) const

◆ hasHexahedraAroundQuad()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::hasHexahedraAroundQuad ( ) const

◆ hasHexahedraAroundVertex()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::hasHexahedraAroundVertex ( ) const

◆ hasQuadsInHexahedron()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::hasQuadsInHexahedron ( ) const

◆ init()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::init ( void  )
overridevirtual

Initialization method called at graph creation and modification, during top-down traversal.

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

Reimplemented in sofa::component::topology::container::dynamic::MultilevelHexahedronSetTopologyContainer.

◆ initTopology()

void sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::initTopology ( )

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

Dynamic Topology API

See also
TriangleSetTopologyContainer::initTopology()

◆ isHexahedronTopologyDirty()

const bool& sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::isHexahedronTopologyDirty ( )
inlineprotected

◆ linkTopologyHandlerToData()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::linkTopologyHandlerToData ( core::topology::TopologyHandler topologyHandler,
sofa::geometry::ElementType  elementType 
)
overridevirtual

\ brief Generic function to link potential data (related to a type of element) with a topologyHandler

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

◆ setHexahedronTopologyToDirty()

void sofa::component::topology::container::dynamic::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_CLASS()

sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::SOFA_CLASS ( HexahedronSetTopologyContainer  ,
QuadSetTopologyContainer   
)

◆ unlinkTopologyHandlerToData()

bool sofa::component::topology::container::dynamic::HexahedronSetTopologyContainer::unlinkTopologyHandlerToData ( core::topology::TopologyHandler topologyHandler,
sofa::geometry::ElementType  elementType 
)
overridevirtual

\ brief Generic function to link potential data (related to a type of element) with a topologyHandler

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

Related details

◆ HexahedronSetTopologyModifier

friend class HexahedronSetTopologyModifier
friend