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 'gni/documentation'
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_ProxyMesh.hxx
diff --git
a/src/SMESH/SMESH_ProxyMesh.hxx
b/src/SMESH/SMESH_ProxyMesh.hxx
index 35a4c3a97b8ff6d2804084a0a6d7d1cd89ed7a47..35480adaf35768448c7b0822b9c4fd53024af044 100644
(file)
--- a/
src/SMESH/SMESH_ProxyMesh.hxx
+++ b/
src/SMESH/SMESH_ProxyMesh.hxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-31,6
+31,7
@@
#include "SMESH_TypeDefs.hxx"
#include <TopoDS_Shape.hxx>
#include "SMESH_TypeDefs.hxx"
#include <TopoDS_Shape.hxx>
+#include <NCollection_DataMap.hxx>
#include <map>
#include <vector>
#include <map>
#include <vector>
@@
-57,7
+58,7
@@
public:
/*!
* \brief Proxy sub-mesh
*/
/*!
* \brief Proxy sub-mesh
*/
- class SMESH_EXPORT SubMesh : public SMESHDS_SubMesh
, SMDS_ElementHolder
+ class SMESH_EXPORT SubMesh : public SMESHDS_SubMesh
{
public:
{
public:
@@
-79,8
+80,7
@@
public:
// for which the caller is responsible
_elements.assign( it, end );
}
// for which the caller is responsible
_elements.assign( it, end );
}
- SubMesh(const SMDS_Mesh* mesh, int index=0)
- :SMESHDS_SubMesh(0,index), SMDS_ElementHolder(mesh), _n2n(0) {}
+ SubMesh(const SMDS_Mesh* mesh, int index=0);
virtual ~SubMesh() { Clear(); }
protected:
virtual ~SubMesh() { Clear(); }
protected:
@@
-104,23
+104,26
@@
public:
SMESH_ProxyMesh(const SMESH_Mesh& mesh);
virtual ~SMESH_ProxyMesh();
SMESH_ProxyMesh(const SMESH_Mesh& mesh);
virtual ~SMESH_ProxyMesh();
- // Returns
the sub
mesh of a shape; it can be a proxy sub-mesh
+ // Returns
a sub-
mesh of a shape; it can be a proxy sub-mesh
const SMESHDS_SubMesh* GetSubMesh(const TopoDS_Shape& shape) const;
const SMESHDS_SubMesh* GetSubMesh(const TopoDS_Shape& shape) const;
- // Returns the proxy sub-mesh of a shape; it can be NULL
+ // Return a sub-mesh by a shape ID; it can be a proxy sub-mesh
+ const SMESHDS_SubMesh* GetSubMesh(const int shapeID) const;
+
+ // Return a proxy sub-mesh of a shape; it can be NULL
const SubMesh* GetProxySubMesh(const TopoDS_Shape& shape) const;
const SubMesh* GetProxySubMesh(const TopoDS_Shape& shape) const;
- // Return
s the
proxy node of a node; the input node is returned if no proxy exists
+ // Return
a
proxy node of a node; the input node is returned if no proxy exists
const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* node ) const;
const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* node ) const;
- // Return
s
number of proxy sub-meshes
+ // Return number of proxy sub-meshes
int NbProxySubMeshes() const;
int NbProxySubMeshes() const;
- // Return
s
iterator on all faces of the mesh taking into account substitutions.
+ // Return iterator on all faces of the mesh taking into account substitutions.
// To be used in case of mesh without shape
SMDS_ElemIteratorPtr GetFaces() const;
// To be used in case of mesh without shape
SMDS_ElemIteratorPtr GetFaces() const;
- // Return
s
iterator on all faces on the face taking into account substitutions
+ // Return iterator on all faces on the face taking into account substitutions
SMDS_ElemIteratorPtr GetFaces(const TopoDS_Shape& face) const;
// Return total nb of faces taking into account substitutions
SMDS_ElemIteratorPtr GetFaces(const TopoDS_Shape& face) const;
// Return total nb of faces taking into account substitutions
@@
-128,7
+131,12
@@
public:
bool IsTemporary(const SMDS_MeshElement* elem ) const;
bool IsTemporary(const SMDS_MeshElement* elem ) const;
+ // Return iterator on inverse elements of a node that may be a proxy one
+ SMDS_ElemIteratorPtr GetInverseElementIterator(const SMDS_MeshNode* node,
+ SMDSAbs_ElementType type) const;
+ // Check if a FACE has prisms on its both sides
+ static bool HasPrismsOnTwoSides( SMESHDS_SubMesh* faceSM );
SMESH_Mesh* GetMesh() const { return const_cast<SMESH_Mesh*>( _mesh ); }
SMESH_Mesh* GetMesh() const { return const_cast<SMESH_Mesh*>( _mesh ); }
@@
-144,13
+152,13
@@
public:
virtual SubMesh* newSubmesh(int index=0) const;
virtual SubMesh* newSubmesh(int index=0) const;
- //
returns
a proxy sub-mesh; zero index is for the case of mesh w/o shape
+ //
Return
a proxy sub-mesh; zero index is for the case of mesh w/o shape
SubMesh* findProxySubMesh(int shapeIndex=0) const;
SubMesh* findProxySubMesh(int shapeIndex=0) const;
- //
returns
a proxy sub-mesh; it is created if not yet exists
+ //
Return
a proxy sub-mesh; it is created if not yet exists
SubMesh* getProxySubMesh(int shapeIndex);
SubMesh* getProxySubMesh(int shapeIndex);
- //
returns
a proxy sub-mesh; it is created if not yet exists
+ //
Return
a proxy sub-mesh; it is created if not yet exists
SubMesh* getProxySubMesh(const TopoDS_Shape& shape=TopoDS_Shape());
// move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found
SubMesh* getProxySubMesh(const TopoDS_Shape& shape=TopoDS_Shape());
// move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found
@@
-185,6
+193,12
@@
public:
// tmp elements residing the _mesh, to be deleted at destruction
std::set< const SMDS_MeshElement* > _elemsInMesh;
// tmp elements residing the _mesh, to be deleted at destruction
std::set< const SMDS_MeshElement* > _elemsInMesh;
+ // inverse elements of proxy nodes
+ typedef NCollection_DataMap< const SMDS_MeshNode*,
+ std::vector< const SMDS_MeshElement* >,
+ SMESH_Hasher > TNodeElemVecMap;
+ TNodeElemVecMap _inverseElements;
+
// Complex submesh used to iterate over elements in other sub-meshes
mutable SubMesh* _subContainer;
};
// Complex submesh used to iterate over elements in other sub-meshes
mutable SubMesh* _subContainer;
};