mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Merge branch 'fix_swapimprove' into 'master'
Fix SwapImprove See merge request jschoeberl/netgen!327
This commit is contained in:
commit
dd4110a351
@ -2015,6 +2015,8 @@ double MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal,
|
||||
}
|
||||
}
|
||||
|
||||
bool have_bad_element = false;
|
||||
|
||||
for (ElementIndex ei : hasbothpoints)
|
||||
{
|
||||
if (mesh[ei].GetType () != TET)
|
||||
@ -2037,10 +2039,13 @@ double MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal,
|
||||
|
||||
if ((goal == OPT_LEGAL) &&
|
||||
mesh.LegalTet (mesh[ei]) &&
|
||||
CalcBad (mesh.Points(), mesh[ei], 0) < 1e3)
|
||||
return 0.0;
|
||||
CalcBad (mesh.Points(), mesh[ei], 0) >= 1e3)
|
||||
have_bad_element = true;
|
||||
}
|
||||
|
||||
if ((goal == OPT_LEGAL) && !have_bad_element)
|
||||
return 0.0;
|
||||
|
||||
int nsuround = hasbothpoints.Size();
|
||||
int mattyp = mesh[hasbothpoints[0]].GetIndex();
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user