X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMDS%2FSMDS_Mesh.hxx;h=d1d0b1120a83f9c196119639d9fdaf5ca6ed7f9e;hb=69aa7507f2647f99203fa4b526f99c77d8c43471;hp=42777ffe949fc5521a60dc8a364c9cc2dc43c64f;hpb=75d0234b452659c44159aaf33ed833af89a0ff4c;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 42777ffe9..d1d0b1120 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -69,7 +69,7 @@ public: SMDS_Mesh(); - //! to retreive this SMDS_Mesh instance from its elements (index stored in SMDS_Elements) + //! to retrieve this SMDS_Mesh instance from its elements (index stored in SMDS_Elements) static std::vector _meshList; //! actual nodes coordinates, cells definition and reverse connectivity are stored in a vtkUnstructuredGrid @@ -689,6 +689,9 @@ public: static const SMDS_MeshElement* FindElement(const std::vector& nodes, const SMDSAbs_ElementType type=SMDSAbs_All, const bool noMedium=true); + static int GetElementsByNodes(const std::vector& nodes, + std::vector& foundElems, + const SMDSAbs_ElementType type=SMDSAbs_All); /*! * \brief Raise an exception if free memory (ram+swap) too low @@ -705,6 +708,7 @@ public: const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; } virtual int NbNodes() const; + virtual int NbElements() const; virtual int Nb0DElements() const; virtual int NbBalls() const; virtual int NbEdges() const; @@ -739,14 +743,10 @@ public: typedef std::vector SetOfNodes; typedef std::vector SetOfCells; - void updateNodeMinMax(); - void updateBoundingBox(); + //void updateBoundingBox(); double getMaxDim(); int fromVtkToSmds(int vtkid); - void incrementNodesCapacity(int nbNodes); - void incrementCellsCapacity(int nbCells); - void adjustStructure(); void dumpGrid(std::string ficdump="dumpGrid"); static int chunkSize; @@ -754,7 +754,7 @@ public: inline void setMyModified() { this->myModified = true; } void Modified(); - unsigned long GetMTime() const; + vtkMTimeType GetMTime() const; bool isCompacted(); protected: @@ -809,10 +809,10 @@ protected: int myMeshId; //! actual nodes coordinates, cells definition and reverse connectivity are stored in a vtkUnstructuredGrid - SMDS_UnstructuredGrid* myGrid; + SMDS_UnstructuredGrid* myGrid; //! Small objects like SMDS_MeshNode are allocated by chunks to limit memory costs of new - ObjectPool* myNodePool; + ObjectPool* myNodePool; //! Small objects like SMDS_VtkVolume are allocated by chunks to limit memory costs of new ObjectPool* myVolumePool; @@ -820,32 +820,27 @@ protected: ObjectPool* myEdgePool; ObjectPool* myBallPool; - //! SMDS_MeshNodes refer to vtk nodes (vtk id = index in myNodes),store reference to this mesh, and sub-shape - SetOfNodes myNodes; - - //! SMDS_MeshCells refer to vtk cells (vtk id != index in myCells),store reference to this mesh, and sub-shape - SetOfCells myCells; + //! SMDS_MeshNodes refer to vtk nodes (vtk id != index in myNodes),store reference to this mesh, and sub-shape + SetOfNodes myNodes; + SetOfCells myCells; //! a buffer to speed up elements addition by excluding some memory allocation - std::vector myNodeIds; + std::vector myNodeIds; //! for cells only: index = ID in vtkUnstructuredGrid, value = ID for SMDS users - std::vector myCellIdVtkToSmds; + std::vector myCellIdVtkToSmds; - SMDS_Mesh * myParent; - std::list myChildren; - SMDS_MeshNodeIDFactory *myNodeIDFactory; - SMDS_MeshElementIDFactory *myElementIDFactory; - SMDS_MeshInfo myInfo; + SMDS_Mesh * myParent; + std::list myChildren; + SMDS_MeshNodeIDFactory * myNodeIDFactory; + SMDS_MeshElementIDFactory * myElementIDFactory; + SMDS_MeshInfo myInfo; //! any add, remove or change of node or cell bool myModified; //! use a counter to keep track of modifications unsigned long myModifTime, myCompactTime; - int myNodeMin; - int myNodeMax; - bool myHasConstructionEdges; bool myHasConstructionFaces; bool myHasInverseElements;