Call FindOpenElements before each optimization step

This commit is contained in:
Matthias Hochsteger 2022-04-14 17:40:22 +02:00
parent ab462237af
commit a7a5067830

View File

@ -451,6 +451,7 @@ namespace netgen
const char * optstr = "mcmstmcmstmcmstmcm"; const char * optstr = "mcmstmcmstmcmstmcm";
for (size_t j = 1; j <= strlen(optstr); j++) for (size_t j = 1; j <= strlen(optstr); j++)
{ {
mesh.FindOpenElements();
mesh.CalcSurfacesOfNode(); mesh.CalcSurfacesOfNode();
mesh.FreeOpenElementsEnvironment(2); mesh.FreeOpenElementsEnvironment(2);
mesh.CalcSurfacesOfNode(); mesh.CalcSurfacesOfNode();
@ -466,12 +467,12 @@ namespace netgen
} }
mesh.FindOpenElements(); mesh.FindOpenElements(domain);
PrintMessage (3, "Call remove problem"); PrintMessage (3, "Call remove problem");
// mesh.Save("before_remove.vol"); // mesh.Save("before_remove.vol");
RemoveProblem (mesh, domain); RemoveProblem (mesh, domain);
// mesh.Save("after_remove.vol"); // mesh.Save("after_remove.vol");
mesh.FindOpenElements(); mesh.FindOpenElements(domain);
} }
else else
{ {