This commit is contained in:
Matthias Hochsteger 2024-10-07 15:45:19 +02:00
parent 70eb3cc1f1
commit 6160fd4d26
2 changed files with 2 additions and 10 deletions

View File

@ -1382,20 +1382,12 @@ void MeshOptimize3d :: SwapImprove (const NgBitArray * working_elements)
break;
auto [pi0, pi1] = edges[i];
try {
double d_badness = SwapImproveEdge (working_elements, elementsonnode, faces, pi0, pi1, true);
if(d_badness<0.0)
{
int index = improvement_counter++;
candidate_edges[index] = make_tuple(d_badness, i);
}
}
catch(const ngcore::Exception &e) {
cerr << "Error in SwapImproveEdge " << pi0 << '-' << pi1 << endl;
if(debugparam.write_mesh_on_error)
mesh.Save("error_swapimproveedge_" +ToString(pi0) + "_" + ToString(pi1) +".vol");
throw;
}
}
}, TasksPerThread (4));

View File

@ -499,7 +499,6 @@ namespace netgen
PrintMessage (3, "Call remove problem");
RemoveProblem (mesh, domain);
mesh.FindOpenElements(domain);
GetOpenElements( mesh, domain )->Save("open_"+ToString(domain)+"_"+ToString(cntsteps)+".vol");
}
else
{
@ -553,6 +552,7 @@ namespace netgen
for (auto pi : Range(first_new_pi, m.Points().Range().Next()))
pmap[pi] = mesh.AddPoint(m[pi]);
for ( auto el : m.VolumeElements() )
{
for (auto i : Range(el.GetNP()))
@ -589,7 +589,7 @@ namespace netgen
// extern double teterrpow;
MESHING3_RESULT MeshVolume (const MeshingParameters & mp, Mesh& mesh3d)
{
static Timer t("MeshVolume1"); RegionTimer reg(t);
static Timer t("MeshVolume"); RegionTimer reg(t);
mesh3d.Compress();
for (auto bl : mp.boundary_layers)