diff --git a/Common/Context.h b/Common/Context.h index f18ea0054d09adb82edc32e32f14ff2b9b24c238..5e9b0f3e1c019765683a288edff4cc05e68a9d50 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -19,7 +19,7 @@ struct contextMeshOptions { int points, lines, triangles, quadrangles, tetrahedra, hexahedra, prisms, pyramids; int surfacesEdges, surfacesFaces, volumesEdges, volumesFaces, numSubEdges; int pointsNum, linesNum, surfacesNum, volumesNum, qualityType, labelType; - int optimize, optimizeNetgen, optimizeLloyd, refineSteps, remove4triangles; + int optimize, optimizeNetgen, optimizeLloyd, smoothCrossField, refineSteps, remove4triangles; double normals, tangents, explode, angleSmoothNormals, allowSwapEdgeAngle; double mshFileVersion, mshFilePartitioned, pointSize, lineWidth; double qualityInf, qualitySup, radiusInf, radiusSup; diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 3417beddf023a44f2a13ee946ff0990a3ea9d1bb..a0a4327b064be6c67ee939280909531e791f72e6 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -833,6 +833,8 @@ StringXNumber MeshOptions_Number[] = { "Apply Bunin optimization on quad meshes (the parameter is the maximal size of a cavity that may be remeshed)" }, { F|O, "Lloyd" , opt_mesh_lloyd , 0. , "Apply lloyd optimization on surface meshes" }, + { F|O, "SmoothCrossField" , opt_mesh_smooth_cross_field , 0. , + "Apply n barycentric smoothing passes to the cross field" }, { F|O, "CgnsImportOrder" , opt_mesh_cgns_import_order , 1. , "Enable the creation of high-order mesh from CGNS structured meshes." diff --git a/Common/GmshSocket.h b/Common/GmshSocket.h index b153c9898391c1e2d75e551c9d5ca7c85bba77ba..8435237e7bd79b814c0406174477194f2dcee2ab 100644 --- a/Common/GmshSocket.h +++ b/Common/GmshSocket.h @@ -78,6 +78,7 @@ class GmshSocket{ GMSH_PARAMETER_QUERY = 24, GMSH_PARAM_QUERY_ALL = 25, GMSH_PARAM_QUERY_END = 26, + GMSH_CONNECT = 27, GMSH_SPEED_TEST = 30, GMSH_OPTION_1 = 100, GMSH_OPTION_2 = 101, diff --git a/Common/Options.cpp b/Common/Options.cpp index 5af7a5f371136b4ecbda4edc1aa5c03ff84d1d78..e57cb6acd56fbc0859ff78534c9fa8f23c314973 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -5167,6 +5167,13 @@ double opt_mesh_lloyd(OPT_ARGS_NUM) return CTX::instance()->mesh.optimizeLloyd; } +double opt_mesh_smooth_cross_field(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX::instance()->mesh.smoothCrossField = (int)val; + return CTX::instance()->mesh.smoothCrossField; +} + double opt_mesh_bdf_field_format(OPT_ARGS_NUM) { if(action & GMSH_SET){ diff --git a/Common/Options.h b/Common/Options.h index 17bc72829a231d10dcca0712b08d6c9f6d950a7d..834016f61274f4edeaae73402007523d5c44573b 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -406,6 +406,7 @@ double opt_mesh_partition_tri_weight(OPT_ARGS_NUM); double opt_mesh_binary(OPT_ARGS_NUM); double opt_mesh_bunin(OPT_ARGS_NUM); double opt_mesh_lloyd(OPT_ARGS_NUM); +double opt_mesh_smooth_cross_field(OPT_ARGS_NUM); double opt_mesh_bdf_field_format(OPT_ARGS_NUM); double opt_mesh_nb_smoothing(OPT_ARGS_NUM); double opt_mesh_algo2d(OPT_ARGS_NUM);