Allocate SMDS_MeshNode's. More...
#include <SMDS_ElementFactory.hxx>

Public Member Functions | |
| SMDS_NodeFactory (SMDS_Mesh *mesh) | |
| Create a factory of nodes in a given mesh. More... | |
| ~SMDS_NodeFactory () | |
| Destructor. More... | |
| SMDS_MeshNode * | NewNode (smIdType id) |
| Return a SMDS_MeshNode by ID. NULL if the node with the given ID is already used. More... | |
| const SMDS_MeshNode * | FindNode (smIdType id) |
| Return an used node by ID. NULL if the node with the given ID is not yet used. More... | |
| void | SetNbShapes (size_t nbShapes) |
| Set a total number of sub-shapes in the main shape. More... | |
| int | GetShapeDim (int shapeID) const |
| Return a dimension of a shape. More... | |
| void | SetShapeDim (int shapeID, int dim) |
| Set a dimension of a shape. More... | |
| virtual void | Clear () |
| De-allocate all nodes. More... | |
| virtual void | Compact (std::vector< smIdType > &idNodesOldToNew) |
| Remove unused nodes located not at the end of the last chunk. More... | |
| virtual bool | CompactChangePointers () |
| Return true if Compact() will change IDs of node. More... | |
| smIdType | GetFreeID () |
| Return minimal ID of a non-used element. More... | |
| smIdType | GetMaxID () |
| Return maximal ID of an used element. More... | |
| smIdType | GetMinID () |
| Return minimal ID of an used element. More... | |
| SMDS_MeshElement * | NewElement (const smIdType id) |
| Return an element by ID. NULL if the element with the given ID is already used. More... | |
| SMDS_MeshCell * | NewCell (const smIdType id) |
| Return a SMDS_MeshCell by ID. NULL if the cell with the given ID is already used. More... | |
| const SMDS_MeshElement * | FindElement (const smIdType id) const |
| Return an used element by ID. NULL if the element with the given ID is not yet used. More... | |
| smIdType | NbUsedElements () const |
| Return a number of used elements. More... | |
| template<class ElemIterator > | |
| boost::shared_ptr< ElemIterator > | GetIterator (SMDS_MeshElement::Filter *filter, size_t nbElemsToReturn=-1) |
| Return an iterator on all element filtered using a given filter. More... | |
| template<class ElemIterator > | |
| boost::shared_ptr< ElemIterator > | GetShapeIterator (int shapeID, size_t nbElemsToReturn, const SMDS_MeshElement *sm1stElem) |
| Return an iterator on all element assigned to a given shape. More... | |
| void | SetAllNotMarked () |
| Clear marked flag of all elements. More... | |
| void | Free (const SMDS_MeshElement *) |
| Mark the element as non-used. More... | |
| smIdType | FromVtkToSmds (vtkIdType vtkID) |
| Return an SMDS ID by a Vtk one. More... | |
Static Public Member Functions | |
| static int | ChunkSize () |
| Return a number of elements in a chunk. More... | |
Protected Attributes | |
| bool | myIsNodal |
| SMDS_Mesh * | myMesh |
| TChunkVector | myChunks |
| TChunkPtrSet | myChunksWithUnused |
| std::vector< vtkIdType > | myVtkIDs |
| std::vector< smIdType > | mySmdsIDs |
| smIdType | myNbUsedElements |
Private Attributes | |
| std::vector< char > | myShapeDim |
Allocate SMDS_MeshNode's.
| SMDS_NodeFactory::SMDS_NodeFactory | ( | SMDS_Mesh * | mesh | ) |
Create a factory of nodes in a given mesh.
| SMDS_NodeFactory::~SMDS_NodeFactory | ( | ) |
Destructor.
References Clear().
|
staticinherited |
Return a number of elements in a chunk.
Referenced by SMDS_ElementFactory::GetShapeIterator(), and _RangeSet< RANGE >::Size().
|
virtual |
De-allocate all nodes.
Reimplemented from SMDS_ElementFactory.
References SMDS_ElementFactory::Clear().
Referenced by SMDS_Mesh::Clear(), and ~SMDS_NodeFactory().
|
virtual |
Remove unused nodes located not at the end of the last chunk.
Minimize allocated memory
| [out] | theVtkIDsOldToNew | - vector storing change of vtk IDs |
Reimplemented from SMDS_ElementFactory.
References Compact(), SMDS_ElementFactory::FindElement(), FindNode(), SMDS_ElementFactory::Free(), SMDS_Mesh::GetGrid(), SMDS_MeshElement::GetID(), SMDS_ElementFactory::GetMaxID(), GetShapeDim(), SMDS_MeshElement::GetShapeID(), SMDS_ElementFactory::myChunks, SMDS_ElementFactory::myChunksWithUnused, SMDS_ElementFactory::myMesh, SMDS_ElementFactory::NbUsedElements(), and SMDS_ElementFactory::NewElement().
Referenced by Compact(), and SMDS_Mesh::CompactMesh().
|
virtual |
Return true if Compact() will change IDs of node.
Return true if Compact() will change IDs of elements.
Reimplemented from SMDS_ElementFactory.
References SMDS_ElementFactory::GetMaxID(), and SMDS_ElementFactory::NbUsedElements().
Referenced by SMDS_Mesh::HasNumerationHoles().
|
inherited |
Return an used element by ID. NULL if the element with the given ID is not yet used.
Return an used element by ID.
NULL if the element with the given ID is not yet used
| [in] | id | - element ID |
References SMDS_MeshElement::IsNull(), and SMDS_ElementFactory::myChunks.
Referenced by SMDS_ElementFactory::Compact(), Compact(), SMDS_Mesh::Contains(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindElementVtk(), FindNode(), SMDS_ElementFactory::Free(), and SMDS_Mesh::GetElementType().
| const SMDS_MeshNode * SMDS_NodeFactory::FindNode | ( | smIdType | id | ) |
Return an used node by ID. NULL if the node with the given ID is not yet used.
References SMDS_ElementFactory::FindElement().
Referenced by SMDS_Mesh::Add0DElementWithID(), SMDS_Mesh::AddBallWithID(), SMDS_Mesh::AddEdgeWithID(), SMDS_Mesh::AddFaceWithID(), SMDS_Mesh::AddPolygonalFaceWithID(), SMDS_Mesh::AddPolyhedralVolumeWithID(), SMDS_Mesh::AddQuadPolygonalFaceWithID(), SMDS_Mesh::AddVolumeWithID(), Compact(), SMDS_Mesh::FindNode(), and SMDS_Mesh::FindNodeVtk().
|
inherited |
Mark the element as non-used.
| [in] | e | - element |
References SMDS_ElementFactory::FindElement(), SMDS_ElementChunk::Free(), SMDS_MeshElement::GetID(), SMDS_MeshElement::GetVtkID(), SMDS_MeshElement::myHolder, SMDS_ElementFactory::myMesh, SMDS_ElementFactory::myNbUsedElements, SMDS_ElementFactory::mySmdsIDs, SMDS_ElementFactory::myVtkIDs, and SMDS_Mesh::setMyModified().
Referenced by SMDS_ElementFactory::Compact(), Compact(), SMDS_Mesh::RemoveElement(), and SMDS_Mesh::RemoveFreeElement().
|
inherited |
Return an SMDS ID by a Vtk one.
| [in] | vtkID | - Vtk ID |
References SMDS_ElementFactory::mySmdsIDs.
Referenced by SMDS_Mesh::FromVtkToSmds().
|
inherited |
Return minimal ID of a non-used element.
References SMDS_ElementChunk::GetUnusedID(), SMDS_ElementFactory::myChunks, SMDS_ElementFactory::myChunksWithUnused, and SMDS_ElementFactory::SMDS_ElementChunk.
Referenced by SMDS_Mesh::Add0DElement(), SMDS_Mesh::AddBall(), SMDS_Mesh::AddEdge(), SMDS_Mesh::AddFace(), SMDS_Mesh::AddFaceFromVtkIds(), SMDS_Mesh::AddNode(), SMDS_Mesh::AddPolygonalFace(), SMDS_Mesh::AddPolyhedralVolume(), SMDS_Mesh::AddQuadPolygonalFace(), SMDS_Mesh::AddVolume(), and SMDS_Mesh::AddVolumeFromVtkIds().
|
inherited |
Return an iterator on all element filtered using a given filter.
References SMDS_ElementChunk::GetUsedRangesMinMax(), and SMDS_ElementFactory::myChunks.
Referenced by SMDS_Mesh::edgesIterator(), SMDS_Mesh::elementEntityIterator(), SMDS_Mesh::elementGeomIterator(), SMDS_Mesh::elementsIterator(), SMDS_Mesh::facesIterator(), SMDS_Mesh::nodesIterator(), and SMDS_Mesh::volumesIterator().
|
inherited |
Return maximal ID of an used element.
References SMDS_ElementFactory::myChunks.
Referenced by SMDS_ElementFactory::Compact(), Compact(), SMDS_ElementFactory::CompactChangePointers(), CompactChangePointers(), SMDS_Mesh::CompactMesh(), SMDS_Mesh::MaxElementID(), and SMDS_Mesh::MaxNodeID().
|
inherited |
Return minimal ID of an used element.
References SMDS_ElementFactory::myChunks.
Referenced by SMDS_Mesh::MinElementID(), and SMDS_Mesh::MinNodeID().
| int SMDS_NodeFactory::GetShapeDim | ( | int | shapeID | ) | const |
|
inherited |
Return an iterator on all element assigned to a given shape.
References SMDS_ElementFactory::ChunkSize(), SMDS_MeshElement::GetID(), SMDS_ElementChunk::GetSubIDRangesMinMax(), and SMDS_ElementFactory::myChunks.
Referenced by SMDS_Mesh::shapeElementsIterator(), and SMDS_Mesh::shapeNodesIterator().
|
inherited |
Return a number of used elements.
References SMDS_ElementFactory::myNbUsedElements.
Referenced by SMDS_ElementFactory::Compact(), Compact(), SMDS_ElementFactory::CompactChangePointers(), CompactChangePointers(), and SMDS_Mesh::CompactMesh().
|
inherited |
Return a SMDS_MeshCell by ID. NULL if the cell with the given ID is already used.
References SMDS_ElementFactory::NewElement().
Referenced by SMDS_Mesh::Add0DElementWithID(), SMDS_Mesh::AddEdgeWithID(), SMDS_Mesh::AddFaceFromVtkIds(), SMDS_Mesh::AddFaceWithID(), SMDS_Mesh::AddPolygonalFaceWithID(), SMDS_Mesh::AddPolyhedralVolumeWithID(), SMDS_Mesh::AddQuadPolygonalFaceWithID(), SMDS_Mesh::AddVolumeFromVtkIds(), and SMDS_Mesh::AddVolumeWithID().
|
inherited |
Return an element by ID. NULL if the element with the given ID is already used.
Return an element by ID.
NULL if the element with the given ID is already used
| [in] | id | - element ID |
References SMDS_MeshElement::IsNull(), SMDS_ElementFactory::myChunks, SMDS_MeshElement::myHolder, SMDS_ElementFactory::myMesh, SMDS_ElementFactory::myNbUsedElements, SMDS_Mesh::setMyModified(), and SMDS_ElementFactory::SMDS_ElementChunk.
Referenced by SMDS_Mesh::AddBallWithID(), SMDS_ElementFactory::Compact(), Compact(), SMDS_ElementFactory::NewCell(), and NewNode().
| SMDS_MeshNode * SMDS_NodeFactory::NewNode | ( | smIdType | id | ) |
Return a SMDS_MeshNode by ID. NULL if the node with the given ID is already used.
References SMDS_ElementFactory::NewElement().
Referenced by SMDS_Mesh::AddNodeWithID().
|
inherited |
Clear marked flag of all elements.
References SMDS_ElementFactory::myChunks.
Referenced by SMDS_Mesh::SetAllCellsNotMarked(), and SMDS_Mesh::SetAllNodesNotMarked().
| void SMDS_NodeFactory::SetNbShapes | ( | size_t | nbShapes | ) |
Set a total number of sub-shapes in the main shape.
References myShapeDim.
Referenced by SMDS_Mesh::setNbShapes().
| void SMDS_NodeFactory::SetShapeDim | ( | int | shapeID, |
| int | dim | ||
| ) |
Set a dimension of a shape.
References myShapeDim.
|
protectedinherited |
Referenced by SMDS_ElementFactory::Clear(), SMDS_ElementFactory::Compact(), Compact(), SMDS_ElementFactory::FindElement(), SMDS_ElementFactory::GetFreeID(), SMDS_ElementFactory::GetIterator(), SMDS_ElementFactory::GetMaxID(), SMDS_ElementFactory::GetMinID(), SMDS_ElementFactory::GetShapeIterator(), SMDS_ElementFactory::NewElement(), SMDS_ElementFactory::SetAllNotMarked(), and SMDS_ElementFactory::~SMDS_ElementFactory().
|
protectedinherited |
Referenced by SMDS_ElementFactory::Clear(), SMDS_ElementFactory::Compact(), Compact(), SMDS_ElementChunk::Free(), SMDS_ElementFactory::GetFreeID(), SMDS_ElementChunk::SMDS_ElementChunk(), SMDS_ElementChunk::UseElement(), SMDS_ElementChunk::~SMDS_ElementChunk(), and SMDS_ElementFactory::~SMDS_ElementFactory().
|
protectedinherited |
Referenced by SMDS_ElementChunk::SMDS_ElementChunk().
|
protectedinherited |
Referenced by Compact(), SMDS_ElementFactory::Free(), SMDS_ElementChunk::GetMesh(), and SMDS_ElementFactory::NewElement().
|
protectedinherited |
|
private |
Referenced by GetShapeDim(), SetNbShapes(), and SetShapeDim().
|
protectedinherited |
|
protectedinherited |