mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-25 04:10:33 +05:00
Change elementsonnode only when applying optimization
This commit is contained in:
parent
1d016f2204
commit
6c0171f2c0
@ -1027,9 +1027,6 @@ bool MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal,
|
||||
el33[3] = pi3;
|
||||
el33.SetIndex (mattyp);
|
||||
|
||||
elementsonnode.Add (pi4, hasbothpoints[1]);
|
||||
elementsonnode.Add (pi3, hasbothpoints[2]);
|
||||
|
||||
bad1 = CalcBad (mesh.Points(), el31, 0) +
|
||||
CalcBad (mesh.Points(), el32, 0) +
|
||||
CalcBad (mesh.Points(), el33, 0);
|
||||
@ -1121,6 +1118,9 @@ bool MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal,
|
||||
mesh[hasbothpoints[2]][l].Invalidate();
|
||||
mesh[hasbothpoints[2]].Delete();
|
||||
|
||||
elementsonnode.Add (pi4, hasbothpoints[1]);
|
||||
elementsonnode.Add (pi3, hasbothpoints[2]);
|
||||
|
||||
for (int k = 0; k < 2; k++)
|
||||
for (int l = 0; l < 4; l++)
|
||||
elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]);
|
||||
|
Loading…
Reference in New Issue
Block a user