mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
fix and use in swapimprove as well
This commit is contained in:
parent
1f314ae0ee
commit
7743503c1d
@ -648,6 +648,9 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
|
|||||||
if (multithread.terminate)
|
if (multithread.terminate)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex())
|
||||||
|
continue;
|
||||||
|
|
||||||
multithread.percent = 100.0 * (ei+1) / ne;
|
multithread.percent = 100.0 * (ei+1) / ne;
|
||||||
|
|
||||||
if ((mesh.ElementType(ei)) == FIXEDELEMENT)
|
if ((mesh.ElementType(ei)) == FIXEDELEMENT)
|
||||||
@ -1236,6 +1239,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
|
|||||||
int oldpi = suroundpts[l-1];
|
int oldpi = suroundpts[l-1];
|
||||||
int newpi = 0;
|
int newpi = 0;
|
||||||
|
|
||||||
|
|
||||||
for (int k = 0; k < nsuround && !newpi; k++)
|
for (int k = 0; k < nsuround && !newpi; k++)
|
||||||
if (!tetused[k])
|
if (!tetused[k])
|
||||||
{
|
{
|
||||||
@ -1250,6 +1254,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
|
|||||||
|
|
||||||
tetused[k] = 1;
|
tetused[k] = 1;
|
||||||
suroundpts[l] = newpi;
|
suroundpts[l] = newpi;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2392,6 +2397,9 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal)
|
|||||||
CalcBad (mesh.Points(), mesh[eli1], 0) < 1e3)
|
CalcBad (mesh.Points(), mesh[eli1], 0) < 1e3)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex())
|
||||||
|
continue;
|
||||||
|
|
||||||
// cout << "eli = " << eli1 << endl;
|
// cout << "eli = " << eli1 << endl;
|
||||||
// (*testout) << "swapimp2, eli = " << eli1 << "; el = " << mesh[eli1] << endl;
|
// (*testout) << "swapimp2, eli = " << eli1 << "; el = " << mesh[eli1] << endl;
|
||||||
|
|
||||||
|
@ -1116,7 +1116,7 @@ namespace netgen
|
|||||||
|
|
||||||
bool check_impossible = 0;
|
bool check_impossible = 0;
|
||||||
|
|
||||||
int only3D_domain_nr = -1;
|
int only3D_domain_nr = 0;
|
||||||
|
|
||||||
///
|
///
|
||||||
int secondorder = 0;
|
int secondorder = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user