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
23068: [CEA 1505] Be able to keep meshing in 2D after having merged the nodes in 1D
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_Mesh.cxx
diff --git
a/src/SMESH/SMESH_Mesh.cxx
b/src/SMESH/SMESH_Mesh.cxx
index 4ba42c977ddb40bc1b26aaa9f057e8d0b2b763b6..4119c5fba0735eeec5c70d5342465522c6db1801 100644
(file)
--- a/
src/SMESH/SMESH_Mesh.cxx
+++ b/
src/SMESH/SMESH_Mesh.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
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
@@
-536,6
+536,10
@@
int SMESH_Mesh::MEDToMesh(const char* theFileName, const char* theMeshName)
MESSAGE("MEDToMesh - _myMeshDS->NbFaces() = "<<_myMeshDS->NbFaces());
MESSAGE("MEDToMesh - _myMeshDS->NbVolumes() = "<<_myMeshDS->NbVolumes());
}
MESSAGE("MEDToMesh - _myMeshDS->NbFaces() = "<<_myMeshDS->NbFaces());
MESSAGE("MEDToMesh - _myMeshDS->NbVolumes() = "<<_myMeshDS->NbVolumes());
}
+#ifdef _DEBUG_
+ SMESH_ComputeErrorPtr er = myReader.GetError();
+ if ( er && !er->IsOK() ) cout << er->myComment << endl;
+#endif
// Reading groups (sub-meshes are out of scope of MED import functionality)
list<TNameAndType> aGroupNames = myReader.GetGroupNamesAndTypes();
// Reading groups (sub-meshes are out of scope of MED import functionality)
list<TNameAndType> aGroupNames = myReader.GetGroupNamesAndTypes();
@@
-675,8
+679,8
@@
SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape,
// shape
// shape
- bool isAlgo = ( anHyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO );
-
int
event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP;
+ bool
isAlgo = ( anHyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO );
+
SMESH_subMesh::algo_event
event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP;
SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
@@
-751,8
+755,8
@@
SMESH_Hypothesis::Hypothesis_Status
// shape
// shape
- bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO );
-
i
nt event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP;
+ bool
isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO );
+
SMESH_subMesh::algo_eve
nt event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP;
SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
@@
-1117,7
+1121,7
@@
throw(SALOME_Exception)
//================================================================================
/*!
//================================================================================
/*!
- * \brief Return submeshes of groups containing the given sub-shape
+ * \brief Return sub
-
meshes of groups containing the given sub-shape
*/
//================================================================================
*/
//================================================================================
@@
-1131,8
+1135,8
@@
SMESH_Mesh::GetGroupSubMeshesContaining(const TopoDS_Shape & aSubShape) const
if ( !subMesh )
return found;
if ( !subMesh )
return found;
- // submeshes of groups have max IDs, so search from the map end
-SMESH_subMeshIteratorPtr smIt( _subMeshHolder->GetIterator( /*reverse=*/true ) );
+ // sub
-
meshes of groups have max IDs, so search from the map end
+
SMESH_subMeshIteratorPtr smIt( _subMeshHolder->GetIterator( /*reverse=*/true ) );
while ( smIt->more() ) {
SMESH_subMesh* sm = smIt->next();
SMESHDS_SubMesh * ds = sm->GetSubMeshDS();
while ( smIt->more() ) {
SMESH_subMesh* sm = smIt->next();
SMESHDS_SubMesh * ds = sm->GetSubMeshDS();
@@
-1158,6
+1162,12
@@
SMESH_subMeshIteratorPtr smIt( _subMeshHolder->GetIterator( /*reverse=*/true ) )
found.push_back( mainSM );
}
}
found.push_back( mainSM );
}
}
+ else // issue 0023068
+ {
+ if ( SMESH_subMesh * mainSM = GetSubMeshContaining(1) )
+ if ( mainSM->GetSubShape().ShapeType() == TopAbs_COMPOUND )
+ found.push_back( mainSM );
+ }
return found;
}
//=======================================================================
return found;
}
//=======================================================================
@@
-1328,7
+1338,7
@@
bool SMESH_Mesh::HasModificationsToDiscard() const
// return true if the next Compute() will be partial and
// existing but changed elements may prevent successful re-compute
bool hasComputed = false, hasNotComputed = false;
// return true if the next Compute() will be partial and
// existing but changed elements may prevent successful re-compute
bool hasComputed = false, hasNotComputed = false;
-SMESH_subMeshIteratorPtr smIt( _subMeshHolder->GetIterator() );
+
SMESH_subMeshIteratorPtr smIt( _subMeshHolder->GetIterator() );
while ( smIt->more() )
{
const SMESH_subMesh* aSubMesh = smIt->next();
while ( smIt->more() )
{
const SMESH_subMesh* aSubMesh = smIt->next();
@@
-1343,6
+1353,8
@@
SMESH_subMeshIteratorPtr smIt( _subMeshHolder->GetIterator() );
hasNotComputed = true;
if ( hasComputed && hasNotComputed)
return true;
hasNotComputed = true;
if ( hasComputed && hasNotComputed)
return true;
+
+ default:;
}
}
if ( NbNodes() < 1 )
}
}
if ( NbNodes() < 1 )
@@
-2004,7
+2016,7
@@
SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exce
bool SMESH_Mesh::SynchronizeGroups()
{
bool SMESH_Mesh::SynchronizeGroups()
{
-
in
t nbGroups = _mapGroup.size();
+
size_
t nbGroups = _mapGroup.size();
const set<SMESHDS_GroupBase*>& groups = _myMeshDS->GetGroups();
set<SMESHDS_GroupBase*>::const_iterator gIt = groups.begin();
for ( ; gIt != groups.end(); ++gIt )
const set<SMESHDS_GroupBase*>& groups = _myMeshDS->GetGroups();
set<SMESHDS_GroupBase*>::const_iterator gIt = groups.begin();
for ( ; gIt != groups.end(); ++gIt )