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

make thomas' experimental flipped element opti available in .geo

parent 9fd86cf9
Branches
Tags
No related merge requests found
......@@ -42,7 +42,7 @@ struct contextMeshOptions {
int order, secondOrderLinear, secondOrderIncomplete;
int secondOrderExperimental, meshOnlyVisible;
int minCircPoints, minCurvPoints;
int hoOptimize, hoNLayers;
int hoOptimize, hoNLayers, hoOptPrimSurfMesh;
double hoThresholdMin, hoThresholdMax, hoPoissonRatio;
int saveAll, saveTri, saveGroupsOfNodes, binary, bdfFieldFormat, saveParametric;
int smoothNormals, reverseAllNormals, zoneDefinition, clip;
......
......@@ -980,6 +980,8 @@ StringXNumber MeshOptions_Number[] = {
"Minimum threshold for high order element optimization"},
{ F|O, "HighOrderThresholdMax", opt_mesh_ho_threshold_max, 2.0,
"Maximum threshold for high order element optimization"},
{ F|O, "HighOrderOptPrimSurfMesh", opt_mesh_ho_opt_prim_surf_mesh, 0,
"Try to fix flipped surface mesh elements in high-order optimizer"},
{ F|O, "LabelSampling" , opt_mesh_label_sampling , 1. ,
"Label sampling rate (display one label every `LabelSampling' elements)" },
......
......@@ -5638,6 +5638,13 @@ double opt_mesh_ho_threshold_max(OPT_ARGS_NUM)
return CTX::instance()->mesh.hoThresholdMax;
}
double opt_mesh_ho_opt_prim_surf_mesh(OPT_ARGS_NUM)
{
if(action & GMSH_SET)
CTX::instance()->mesh.hoOptPrimSurfMesh = (int)val;
return CTX::instance()->mesh.hoOptPrimSurfMesh;
}
double opt_mesh_ho_poisson(OPT_ARGS_NUM)
{
if(action & GMSH_SET) {
......
......@@ -453,6 +453,7 @@ double opt_mesh_ho_nlayers(OPT_ARGS_NUM);
double opt_mesh_ho_threshold_min(OPT_ARGS_NUM);
double opt_mesh_ho_threshold_max(OPT_ARGS_NUM);
double opt_mesh_ho_poisson(OPT_ARGS_NUM);
double opt_mesh_ho_opt_prim_surf_mesh(OPT_ARGS_NUM);
double opt_mesh_second_order_experimental(OPT_ARGS_NUM);
double opt_mesh_second_order_linear(OPT_ARGS_NUM);
double opt_mesh_second_order_incomplete(OPT_ARGS_NUM);
......
......@@ -808,7 +808,7 @@ void GenerateMesh(GModel *m, int ask)
p.BARRIER_MIN = CTX::instance()->mesh.hoThresholdMin;
p.BARRIER_MAX = CTX::instance()->mesh.hoThresholdMax;
p.dim = GModel::current()->getDim();
//p.optPrimSurfMesh = true;
p.optPrimSurfMesh = CTX::instance()->mesh.hoOptPrimSurfMesh;
HighOrderMeshOptimizer(GModel::current(), p);
}
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment