Skip to content
Snippets Groups Projects
Commit 3e837f72 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

crack all elements from all entities except the crack entities (instead of...

crack all elements from all entities except the crack entities (instead of just cracking elements from entities of dim+1)
parent a848dee8
Branches
Tags
No related merge requests found
...@@ -111,6 +111,10 @@ PView *GMSH_CrackPlugin::execute(PView *view) ...@@ -111,6 +111,10 @@ PView *GMSH_CrackPlugin::execute(PView *view)
} }
} }
std::set<GEntity*> crackEntities;
crackEntities.insert(entities.begin(), entities.end());
crackEntities.insert(openEntities.begin(), openEntities.end());
// get crack elements // get crack elements
std::vector<MElement*> crackElements; std::vector<MElement*> crackElements;
for(unsigned int i = 0; i < entities.size(); i++) for(unsigned int i = 0; i < entities.size(); i++)
...@@ -196,7 +200,8 @@ PView *GMSH_CrackPlugin::execute(PView *view) ...@@ -196,7 +200,8 @@ PView *GMSH_CrackPlugin::execute(PView *view)
std::vector<GEntity*> allentities; std::vector<GEntity*> allentities;
m->getEntities(allentities); m->getEntities(allentities);
for(unsigned int ent = 0; ent < allentities.size(); ent++){ for(unsigned int ent = 0; ent < allentities.size(); ent++){
if(allentities[ent]->dim() != dim + 1) continue; //if(allentities[ent]->dim() != dim + 1) continue;
if(crackEntities.find(allentities[ent]) != crackEntities.end()) continue;
for(unsigned int i = 0; i < allentities[ent]->getNumMeshElements(); i++){ for(unsigned int i = 0; i < allentities[ent]->getNumMeshElements(); i++){
MElement *e = allentities[ent]->getMeshElement(i); MElement *e = allentities[ent]->getMeshElement(i);
for(int j = 0; j < e->getNumVertices(); j++){ for(int j = 0; j < e->getNumVertices(); j++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment