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

interactive debug

parent a0201fb7
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ StringXNumber CrackOptions_Number[] = { ...@@ -22,7 +22,7 @@ StringXNumber CrackOptions_Number[] = {
{GMSH_FULLRC, "NormalY", nullptr, 0.}, {GMSH_FULLRC, "NormalY", nullptr, 0.},
{GMSH_FULLRC, "NormalZ", nullptr, 1.}, {GMSH_FULLRC, "NormalZ", nullptr, 1.},
{GMSH_FULLRC, "NewPhysicalGroup", nullptr, 0}, {GMSH_FULLRC, "NewPhysicalGroup", nullptr, 0},
{GMSH_FULLRC, "Debug", nullptr, 0} {GMSH_FULLRC, "DebugView", nullptr, 0}
}; };
extern "C" { extern "C" {
...@@ -249,16 +249,10 @@ PView *GMSH_CrackPlugin::execute(PView *view) ...@@ -249,16 +249,10 @@ PView *GMSH_CrackPlugin::execute(PView *view)
} }
if(debug) { if(debug) {
Msg::Info("Writing 'debug.pos' file with elements detected on one side " std::map<int, std::vector<double> > d;
"of the crack"); for(auto e : oneside) d[e->getNum()] = {(double)e->getNum()};
FILE *fp = fopen("debug.pos", "w"); view = new PView("Elements on one side of crack", "ElementData",
if(fp){ GModel::current(), d);
fprintf(fp, "View \"Elements on one side\" {\n");
for(auto it = oneside.begin(); it != oneside.end(); it++)
(*it)->writePOS(fp, false, true, false, false, false, false);
fprintf(fp, "};\n");
fclose(fp);
}
} }
// create new crack entity // create new crack entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment