CM2 MeshTools® SDK /release 5.6.0 Preview 1
- 5.6.0 Preview 1
- February 2025.
- Major release of the CM2 MeshTools® SDK.
- All CM2 MeshTools® SDK.
- Due to changes in the API, client applications must be recompiled against the new headers.
/caveats
- Major version. Due to changes in the API, client applications must be recompiled against the new headers.
- Lib names now end with
_56
(Windows®),5.6.0
with symlinks from5.6
(Linux®, macOS®). - Visual Studio 2015 deprecated (will be no longer provided in future versions).
- CM2 SurfMesh T3 and CM2 SurfMesh Q4 upgraded to OpenCascade 7.8.0, except the Visual Studio 2010 and 2015 builds which are still based on OpenCascade 7.6.0 (because VS 2010/2015 don’t support C++11 required by OCCT 7.8.0).
/new features
CM2 SurfMesh T3, CM2 SurfMesh Q4
- New
data_type::vertex_H
(resp.curve_H
,surface_H
) for user-defined mesh sizes (isotropic) on specific vertices (resp. curves, surfaces).
The precedence order is:vertex_H
(highest precedence).curve_H
.surface_H
.settings_type::target_h
(lowest precedence).
Note that the mesher may use reduced mesh sizes in all directions (when
settings_type::chordal_control_type
= 1 or 3) or in selected directions (whensettings_type::chordal_control_type
= 2 or 4) to honor thesettings_type::max_chordal_error
criterion.
CM2 HexaMesh Iso
- New
settings_type::conformation_level
(replacingsettings_type::make_conformation_flag
, see Breaking Changes below).
The value for this setting can be:- 0 : Minimal conformation: nothing specific is done to force conformal joints in the mesh.
Non-conformal joints (i.e. quad faces connected to two triangle faces) are possible everywhere in the mesh but many joints can be still be conformal (i.e. quad faces connected to quad faces, triangle faces connected to triangle faces).
Equivalent to formersettings_type::make_conformation_flag = false
. - 1 : Partial conformation: conformal joints are enforced only near the hard quadrangles. Joints elsewhere inside the domain can still be non-conformal. This type of conformation is new in this release.
- 2+: Full conformation: conformal joints are enforced everywhere in the mesh.
Equivalent to formersettings_type::make_conformation_flag = true
.
- 0 : Minimal conformation: nothing specific is done to force conformal joints in the mesh.
- New
settings_type::hard_quads_enforcement_flag
to force the recovery of hard quadrangles (as much as possible).
If the recovery of all boundary (or any hard embedded) quadrangles isn’t a requirement for you and the split into pairs of triangles is acceptable, you can turn off this flag to save nodes, elements and get a better mesh (usually).
Conversely, this flag set (true
) together withsettings_type::conformation_level >= 1
forces the recovery of all boundary quadrangles.
Core MeshTools libs
- New
meshtools::vizir_sols
to output solutions (scalars, vectors, tensors, matrices) for VIZIR (the new name of MEDIT).
Note that themeshtools::medit_output
,meshtools::medit_vector
andmeshtools::medit_tensor
are replaced with their equivalentvizir
functions or deprecated (see Breaking Changes below). - New
meshtools2d::mesh_parallelepiped_Q4
andmeshtools2d::mesh_parallelepiped_T3
to generate structured surface meshes on parallelepipeds withCM2_FACEQ4
orCM2_FACET3
elements.
/improvements
All meshers (except specialized tools)
- Significant speed-ups when using
settings_type::target_metric
andsettings_type::max_gradation
, especially with the anisotropic mesh generators (CM2 TetraMesh Aniso can show speed-ups of 300% on large meshes). - Improvements in the shape qualities after the refine step (especially CM2 TetraMesh Aniso).
This has several nice outcomes:- The mesh sizes (isotropic and anisotropic) are better honored.
- It makes the optimization step easier and faster.
- The final mesh can be significantly better.
- New scheme in the optimizers to remove long edges.
CM2 QuadMesh Iso, CM2 QuadMesh Aniso, CM2 SurfMesh Q4, CM2 SurfRemesh Q4
- Fortified all-quad mode: fewer
CM2_DEGENERATED_ELEMENT
errors. - Somewhat faster optimization step (up to 15%) in large meshes.
CM2 SurfMesh T3, CM2 SurfMesh Q4
- Improvements in the quality of meshes.
- Better generation along curves with high gradients of tangents (see below on
meshtools1d::mesh_curve_param
).
CM2 TetraMesh Iso, CM2 TetraMesh Aniso
- Fewer Steiner nodes (again).
- Somewhat improved quality of the generated meshes.
CM2 TetraMesh Aniso
- Speed-ups (about 20%) even when
settings_type::target_metric
andsettings_type::max_gradation
aren’t used.
CM2 HexaMesh Iso
- More structured meshes (all-hexes).
- More OMP-parallelization (average gain = 15% on a 8-SMT CPU).
- Speed-ups in single-thread (average gain = 5%).
Core MeshTools libs
meshtools1d::mesh_curve_param
: improvements in the size of edges when curves have higher gradients of tangents.
/fixes
All meshers (except specialized tools)
- The
settings_type::max_gradation
wasn’t always properly honored (the actual gradations could be excessive).
CM2 SurfMesh T3, CM2 SurfMesh Q4
- The bug in
meshtools1d::mesh_curve_param
(see below) could caused non-optimal meshes. - The bug in
meshtools2d::mesh_surface_param
(see below) could caused strange aligned refinements. - Loop curves couldn’t be merged.
CM2 SurfMesh Q4
- In all-quad mode: failed meshing surfaces when their contour had degenerated curves (segments with the two vertices merged together).
CM2 Intersect T3
- Spurious splits on regular (non-intersecting) edges sometimes.
Core MeshTools libs
meshtools1d::mesh_curve_param
: bug in 3-d metric reduction.meshtools2d::mesh_surface_param
: non-optimal background mesh generation.
/breaking changes
CM2 TriaMesh Iso, CM2 TriaMesh Aniso, CM2 TetraMesh Iso, CM2 TetraMesh Aniso
- Setting
'bool no_clamped_edges_flag'
replaced with'unsigned no_edge_with_nodes_below'
.
With the former flag, users were able to forbid edges between any two hard nodes (any nodes of the boundaries or embedded hard nodes). The new setting allows for a greater freedom over the type of edges to forbid.
Consider nodes ordered in thedata_type::pos
matrix such that the highest boundary node id (sayNb
) is before (i.e. smaller) than any other embedded node ids. Thenno_edge_with_nodes_below = Nb+1
forbids any edge between two boundary nodes but still allows edges between a boundary node and an embedded node or between two embedded nodes.
Conversely, if nodes are ordered such that the last embedded node (say with idNe
) is before any boundary nodes, thenno_edge_with_nodes_below = Ne+1
forbids any edge between two embedded nodes but still allows edges between a boundary node and an embedded node or between two boundary nodes.
no_edge_with_nodes_below = 0
(the default) is equivalent to the former default settingno_clamped_edges_flag = false
.
no_edge_with_nodes_below = data.pos.cols()
is equivalent to the former settingno_clamped_edges_flag = true
.
CM2 SurfMesh T3, CM2 SurfMesh Q4
- Upgraded to OpenCascade 7.8.0, except the Visual Studio 2010 and 2015 builds which are still based on OpenCascade 7.6.0 (because OCCT 7.8.0 requires C++11 and VS 2010/2015 don’t support it).
- The output fields
data_type::color
,data_type::colorE
,data_type::merged_vertices
,data_type::merged_curves
anddata_type::failed
now follow the CAD indexing scheme.
As OOCT has a 1-base indexing scheme, all these fields are 1-shifted vs. the previous version.
CM2 SurfMesh T3, CM2 SurfMesh Q4 (source-code licenses only)
- New requested enum in the CAD interface
cad_interface::INDEX_BASE
to specify the indexing scheme (0 or 1). - New requested function in the CAD interface
'int cad_interface::orientation (const edge_type& E);'
to give the orientation (+1, -1 or 0) of an edge. - New requested functions in the CAD interface
'bool is_Uclosed (const surface_type& S);'
and'bool is_Vclosed (const surface_type& S);'
to help tell whether a surface is periodic or not, on top of'bool is_periodic (const surface_type& S, double& U_period, double& V_period);'
. - New requested function in the CAD interface
'bool periodic_surfaces_supported();'
to tell whether the kernel supports periodic surfaces or not.
CM2 HexaMesh Iso
bool settings_type::make_conformation_flag
is replaced withunsigned settings_type::conformation_level
.
The formermake_conformation_flag = false
is now equivalent toconformation_level = 0
.
The formermake_conformation_flag = true
is now equivalent toconformation_level = 2
.- The internal formula used to compute the shape-quality of an hexahedron has changed (now gives higher values for elongated elements).
Core MeshTools libs
meshtools::shape_qualities
,meshtools::min_quality
: changed values for hexahedrons (the new values are usually higher).meshtools::medit_output
,meshtools::medit_vector
andmeshtools::medit_tensor
are replaced with their equivalentvizir
functions (some are just deprecated for the moment).