Skip to content
Snippets Groups Projects
Commit 9e11bf59 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

new option Mesh.HighOrderFixBoundaryNodes

parent 72347721
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ struct contextMeshOptions {
int meshOnlyVisible, meshOnlyEmpty;
int minCircleNodes, minCurveNodes, minLineNodes;
int hoOptimize, hoPeriodic, hoNLayers, hoPrimSurfMesh, hoIterMax, hoPassMax;
int hoDistCAD, hoSavePeriodic;
int hoDistCAD, hoSavePeriodic, hoFixBndNodes;
double hoThresholdMin, hoThresholdMax, hoPoissonRatio;
bool hoNewFastCurvingAlgo;
int hoCurveOuterBL;
......
......@@ -1162,6 +1162,8 @@ StringXNumber MeshOptions_Number[] = {
{ F|O, "HighOrderDistCAD", opt_mesh_ho_dist_cad, 0,
"Try to optimize distance to CAD in high-order optimizer?"},
{ F|O, "HighOrderFixBoundaryNodes", opt_mesh_ho_fix_bnd_nodes, 0,
"Fix boundary nodes during high-order optimization?"},
{ F|O, "HighOrderIterMax", opt_mesh_ho_iter_max, 100,
"Maximum number of iterations in high-order optimization pass"},
{ F|O, "HighOrderNumLayers", opt_mesh_ho_nlayers, 6.,
......
......@@ -6261,6 +6261,12 @@ double opt_mesh_ho_max_in_angle(OPT_ARGS_NUM)
return CTX::instance()->mesh.hoMaxInnerAngle;
}
double opt_mesh_ho_fix_bnd_nodes(OPT_ARGS_NUM)
{
if(action & GMSH_SET) CTX::instance()->mesh.hoFixBndNodes = val;
return CTX::instance()->mesh.hoFixBndNodes;
}
double opt_mesh_second_order_linear(OPT_ARGS_NUM)
{
if(action & GMSH_SET) {
......
......@@ -568,6 +568,7 @@ double opt_mesh_ho_curve_outer_BL(OPT_ARGS_NUM);
double opt_mesh_ho_max_rho(OPT_ARGS_NUM);
double opt_mesh_ho_max_angle(OPT_ARGS_NUM);
double opt_mesh_ho_max_in_angle(OPT_ARGS_NUM);
double opt_mesh_ho_fix_bnd_nodes(OPT_ARGS_NUM);
double opt_mesh_second_order_linear(OPT_ARGS_NUM);
double opt_mesh_second_order_incomplete(OPT_ARGS_NUM);
double opt_mesh_cgns_import_order(OPT_ARGS_NUM);
......
......@@ -1015,6 +1015,7 @@ void OptimizeMesh(GModel *m, const std::string &how, bool force, int niter)
p.BARRIER_MAX = CTX::instance()->mesh.hoThresholdMax;
p.itMax = CTX::instance()->mesh.hoIterMax;
p.optPassMax = CTX::instance()->mesh.hoPassMax;
p.fixBndNodes = CTX::instance()->mesh.hoFixBndNodes;
p.dim = m->getDim();
p.optPrimSurfMesh = CTX::instance()->mesh.hoPrimSurfMesh;
p.optCAD = CTX::instance()->mesh.hoDistCAD;
......@@ -1065,50 +1066,50 @@ void OptimizeMesh(GModel *m, const std::string &how, bool force, int niter)
}
}
else if(how == "DiskQuadrangulation") {
for(GFace *gf : m->getFaces())
for(GFace *gf : m->getFaces()) {
if(gf->meshStatistics.status == GFace::DONE) {
gf->meshStatistics.status = GFace::PENDING;
}
}
transferSeamGEdgesVerticesToGFace(m);
optimizeTopologyWithDiskQuadrangulationRemeshing(m);
for(GFace *gf : m->getFaces())
for(GFace *gf : m->getFaces()) {
if(gf->meshStatistics.status == GFace::PENDING) {
gf->meshStatistics.status = GFace::DONE;
}
}
}
else if(how == "QuadCavityRemeshing") {
for(GFace *gf : m->getFaces())
for(GFace *gf : m->getFaces()) {
if(gf->meshStatistics.status == GFace::DONE) {
gf->meshStatistics.status = GFace::PENDING;
}
}
transferSeamGEdgesVerticesToGFace(m);
optimizeTopologyWithCavityRemeshing(m);
for(GFace *gf : m->getFaces())
for(GFace *gf : m->getFaces()) {
if(gf->meshStatistics.status == GFace::PENDING) {
gf->meshStatistics.status = GFace::DONE;
}
}
}
else if(how == "QuadQuasiStructured") {
// The following methods only act on faces whose status is PENDING
for(GFace *gf : m->getFaces())
for(GFace *gf : m->getFaces()) {
if(gf->meshStatistics.status == GFace::DONE) {
gf->meshStatistics.status = GFace::PENDING;
}
}
transferSeamGEdgesVerticesToGFace(m);
quadMeshingOfSimpleFacesWithPatterns(m);
optimizeTopologyWithDiskQuadrangulationRemeshing(m);
optimizeTopologyWithCavityRemeshing(m);
for(GFace *gf : m->getFaces())
for(GFace *gf : m->getFaces()) {
if(gf->meshStatistics.status == GFace::PENDING) {
gf->meshStatistics.status = GFace::DONE;
}
}
}
else if(how == "UntangleMeshGeometry") {
#if defined(HAVE_WINSLOWUNTANGLER)
int nIterWinslow = 10;
......@@ -1120,7 +1121,7 @@ void OptimizeMesh(GModel *m, const std::string &how, bool force, int niter)
untangleGFaceMeshConstrained(gf, nIterWinslow, timeMax);
}
else {
Msg::Debug("- Face %i: not planar, do not apply Winslow untangling",
Msg::Debug("- Surface %i: not planar, do not apply Winslow untangling",
gf->tag());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment