Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'hydro/imps_2015' into V7_dev
[modules/smesh.git]
/
src
/
SMDS
/
SMDS_Mesh.hxx
diff --git
a/src/SMDS/SMDS_Mesh.hxx
b/src/SMDS/SMDS_Mesh.hxx
index 3c0d0ca0dde1255b4aad4f0c14d26cc89ecf26f5..d233a00a3390aed783a5260bd003386f9bd61720 100644
(file)
--- a/
src/SMDS/SMDS_Mesh.hxx
+++ b/
src/SMDS/SMDS_Mesh.hxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
3
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-6,7
+6,7
@@
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-58,7
+58,7
@@
#define MYASSERT(val) if (!(val)) throw SALOME_Exception(LOCALIZED("assertion not verified"));
#define MYASSERT(val) if (!(val)) throw SALOME_Exception(LOCALIZED("assertion not verified"));
-class SMDS_EXPORT SMDS_Mesh
:
public SMDS_MeshObject
+class SMDS_EXPORT SMDS_Mesh
:
public SMDS_MeshObject
{
public:
friend class SMDS_MeshIDFactory;
{
public:
friend class SMDS_MeshIDFactory;
@@
-576,14
+576,22
@@
public:
virtual SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*> & nodes);
virtual SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*> & nodes);
+ virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector<int> & nodes_ids,
+ const int ID);
+
+ virtual SMDS_MeshFace* AddQuadPolygonalFaceWithID(const std::vector<const SMDS_MeshNode*> & nodes,
+ const int ID);
+
+ virtual SMDS_MeshFace* AddQuadPolygonalFace(const std::vector<const SMDS_MeshNode*> & nodes);
+
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
-
(const std::vector<int> & nodes_ids,
-
const std::vector<int> & quantities,
-
const int ID);
+ (const std::vector<int> & nodes_ids,
+ const std::vector<int> & quantities,
+ const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
-
(const std::vector<const SMDS_MeshNode*> & nodes,
-
const std::vector<int> & quantities,
+ (const std::vector<const SMDS_MeshNode*> & nodes,
+ const std::vector<int> & quantities,
const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolume
const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolume
@@
-739,7
+747,7
@@
public:
void incrementNodesCapacity(int nbNodes);
void incrementCellsCapacity(int nbCells);
void adjustStructure();
void incrementNodesCapacity(int nbNodes);
void incrementCellsCapacity(int nbCells);
void adjustStructure();
- void dumpGrid(string ficdump="dumpGrid");
+ void dumpGrid(st
d::st
ring ficdump="dumpGrid");
static int chunkSize;
//! low level modification: add, change or remove node or element
static int chunkSize;
//! low level modification: add, change or remove node or element
@@
-774,14
+782,14
@@
protected:
bool registerElement(int ID, SMDS_MeshElement * element);
void addChildrenWithNodes(std::set<const SMDS_MeshElement*>& setOfChildren,
bool registerElement(int ID, SMDS_MeshElement * element);
void addChildrenWithNodes(std::set<const SMDS_MeshElement*>& setOfChildren,
- const SMDS_MeshElement * element,
+ const SMDS_MeshElement *
element,
std::set<const SMDS_MeshElement*>& nodes);
inline void adjustmyCellsCapacity(int ID)
{
assert(ID >= 0);
myElementIDFactory->adjustMaxId(ID);
std::set<const SMDS_MeshElement*>& nodes);
inline void adjustmyCellsCapacity(int ID)
{
assert(ID >= 0);
myElementIDFactory->adjustMaxId(ID);
- if (ID >= myCells.size())
+ if (ID >=
(int)
myCells.size())
myCells.resize(ID+SMDS_Mesh::chunkSize,0);
}
myCells.resize(ID+SMDS_Mesh::chunkSize,0);
}
@@
-818,8
+826,8
@@
protected:
//! SMDS_MeshCells refer to vtk cells (vtk id != index in myCells),store reference to this mesh, and sub-shape
SetOfCells myCells;
//! SMDS_MeshCells refer to vtk cells (vtk id != index in myCells),store reference to this mesh, and sub-shape
SetOfCells myCells;
- //!
for cells only: index = ID for SMDS users, value = ID in vtkUnstructuredGrid
-
//std::vector<int> myCellIdSmdsToVtk
;
+ //!
a buffer to speed up elements addition by excluding some memory allocation
+
std::vector<vtkIdType> myNodeIds
;
//! for cells only: index = ID in vtkUnstructuredGrid, value = ID for SMDS users
std::vector<int> myCellIdVtkToSmds;
//! for cells only: index = ID in vtkUnstructuredGrid, value = ID for SMDS users
std::vector<int> myCellIdVtkToSmds;
@@
-830,6
+838,8
@@
protected:
SMDS_MeshElementIDFactory *myElementIDFactory;
SMDS_MeshInfo myInfo;
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;
//! use a counter to keep track of modifications
unsigned long myModifTime, myCompactTime;
@@
-840,9
+850,6
@@
protected:
bool myHasConstructionFaces;
bool myHasInverseElements;
bool myHasConstructionFaces;
bool myHasInverseElements;
- //! any add, remove or change of node or cell
- bool myModified;
-
double xmin;
double xmax;
double ymin;
double xmin;
double xmax;
double ymin;