mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
* Activated Element size weights in OpenCascade meshing
* Activated element error power other than "2" in meshing tools
This commit is contained in:
parent
96273c8861
commit
083330c033
@ -189,7 +189,6 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
double teterrpow = 2;
|
double teterrpow = 2;
|
||||||
|
|
||||||
double CalcTetBadness (const Point3d & p1, const Point3d & p2,
|
double CalcTetBadness (const Point3d & p1, const Point3d & p2,
|
||||||
@ -225,8 +224,11 @@ namespace netgen
|
|||||||
h * h * ( 1 / ll1 + 1 / ll2 + 1 / ll3 +
|
h * h * ( 1 / ll1 + 1 / ll2 + 1 / ll3 +
|
||||||
1 / ll4 + 1 / ll5 + 1 / ll6 ) - 12;
|
1 / ll4 + 1 / ll5 + 1 / ll6 ) - 12;
|
||||||
|
|
||||||
if (teterrpow == 2)
|
teterrpow = mparam.opterrpow;
|
||||||
return err*err;
|
if(teterrpow < 1) teterrpow = 1;
|
||||||
|
|
||||||
|
if (teterrpow == 1) return err;
|
||||||
|
if (teterrpow == 2) return err*err;
|
||||||
return pow (err, teterrpow);
|
return pow (err, teterrpow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,12 +349,23 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
double errpow;
|
double errpow;
|
||||||
|
|
||||||
|
teterrpow = mparam.opterrpow;
|
||||||
|
if(teterrpow < 1) teterrpow = 1;
|
||||||
|
|
||||||
|
if (teterrpow == 1)
|
||||||
|
{
|
||||||
|
errpow = err;
|
||||||
|
grad = graderr;
|
||||||
|
}
|
||||||
|
|
||||||
if (teterrpow == 2)
|
if (teterrpow == 2)
|
||||||
{
|
{
|
||||||
errpow = err*err;
|
errpow = err*err;
|
||||||
grad = (2 * err) * graderr;
|
grad = (2 * err) * graderr;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if(teterrpow > 2)
|
||||||
{
|
{
|
||||||
errpow = pow (err, teterrpow);
|
errpow = pow (err, teterrpow);
|
||||||
grad = (teterrpow * errpow / err) * graderr;
|
grad = (teterrpow * errpow / err) * graderr;
|
||||||
|
@ -915,7 +915,8 @@ namespace netgen
|
|||||||
MeshOptimize2dOCCSurfaces meshopt(geom);
|
MeshOptimize2dOCCSurfaces meshopt(geom);
|
||||||
meshopt.SetFaceIndex (k);
|
meshopt.SetFaceIndex (k);
|
||||||
meshopt.SetImproveEdges (0);
|
meshopt.SetImproveEdges (0);
|
||||||
meshopt.SetMetricWeight (0.2);
|
meshopt.SetMetricWeight (mparam.elsizeweight);
|
||||||
|
//meshopt.SetMetricWeight (0.2);
|
||||||
meshopt.SetWriteStatus (0);
|
meshopt.SetWriteStatus (0);
|
||||||
|
|
||||||
// (*testout) << "EdgeSwapping (mesh, (i > mparam.optsteps2d/2))" << endl;
|
// (*testout) << "EdgeSwapping (mesh, (i > mparam.optsteps2d/2))" << endl;
|
||||||
@ -927,7 +928,8 @@ namespace netgen
|
|||||||
MeshOptimize2dOCCSurfaces meshopt(geom);
|
MeshOptimize2dOCCSurfaces meshopt(geom);
|
||||||
meshopt.SetFaceIndex (k);
|
meshopt.SetFaceIndex (k);
|
||||||
meshopt.SetImproveEdges (0);
|
meshopt.SetImproveEdges (0);
|
||||||
meshopt.SetMetricWeight (0.2);
|
//meshopt.SetMetricWeight (0.2);
|
||||||
|
meshopt.SetMetricWeight (mparam.elsizeweight);
|
||||||
meshopt.SetWriteStatus (0);
|
meshopt.SetWriteStatus (0);
|
||||||
|
|
||||||
// (*testout) << "ImproveMesh (mesh)" << endl;
|
// (*testout) << "ImproveMesh (mesh)" << endl;
|
||||||
@ -938,7 +940,8 @@ namespace netgen
|
|||||||
MeshOptimize2dOCCSurfaces meshopt(geom);
|
MeshOptimize2dOCCSurfaces meshopt(geom);
|
||||||
meshopt.SetFaceIndex (k);
|
meshopt.SetFaceIndex (k);
|
||||||
meshopt.SetImproveEdges (0);
|
meshopt.SetImproveEdges (0);
|
||||||
meshopt.SetMetricWeight (0.2);
|
//meshopt.SetMetricWeight (0.2);
|
||||||
|
meshopt.SetMetricWeight (mparam.elsizeweight);
|
||||||
meshopt.SetWriteStatus (0);
|
meshopt.SetWriteStatus (0);
|
||||||
|
|
||||||
// (*testout) << "CombineImprove (mesh)" << endl;
|
// (*testout) << "CombineImprove (mesh)" << endl;
|
||||||
@ -950,7 +953,8 @@ namespace netgen
|
|||||||
MeshOptimize2dOCCSurfaces meshopt(geom);
|
MeshOptimize2dOCCSurfaces meshopt(geom);
|
||||||
meshopt.SetFaceIndex (k);
|
meshopt.SetFaceIndex (k);
|
||||||
meshopt.SetImproveEdges (0);
|
meshopt.SetImproveEdges (0);
|
||||||
meshopt.SetMetricWeight (0.2);
|
//meshopt.SetMetricWeight (0.2);
|
||||||
|
meshopt.SetMetricWeight (mparam.elsizeweight);
|
||||||
meshopt.SetWriteStatus (0);
|
meshopt.SetWriteStatus (0);
|
||||||
|
|
||||||
// (*testout) << "ImproveMesh (mesh)" << endl;
|
// (*testout) << "ImproveMesh (mesh)" << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user