CM2 MeshTools® SDK /release 5.6.0
- 5.6.0
- June 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
- Lib names now end with
_56
(Windows®),5.6.0
with symlinks from5.6
(Linux®, macOS®). - New builds with gcc 15.1 and clang 20 on Linux (Fedora 42).
- CM2 SurfMesh T3 and CM2 SurfMesh Q4 Windows (Visual Studio 2017, 2019, 2022 only) builds upgraded to OpenCascade 7.9.
Linux builds (clang 20 and gcc 15.1 on F42 only) upgraded to OpenCascade 7.8.
Other builds (Visual Studio 2010/2015, Linux gcc 4.8/8.5/12/clang 14, macOS) remain based on OpenCascade 7.6. - Visual Studio 2015 deprecated (will be no longer provided in future versions).
/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
. The default.
- 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. The default.
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. - The
meshtools2d::get_element_containing_point
(no longer experimental) can now search for 3-D points in a surface mesh (not only for 2-D points in plane meshes).
In addition, works now also on quadratic meshes (with caveats). - New
meshtools2d::get_elements_containing_points
to search for a set of points (2-D or 3-D) in a plane or surface mesh (linear or quadratic). - New
meshtools3d::get_elements_containing_points
to search for a set of points (3-D) in a solid mesh (tetrahedrons only, linear or quadratic).
COM wrapper
- Updated.
/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.
- Additional 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 about
meshtools1d::mesh_curve_param
).
CM2 TetraMesh Iso, CM2 TetraMesh Aniso
- Fewer Steiner nodes (again).
- Improvements in the quality of the generated meshes in some cases.
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 high 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). - The
settings_type::load
function failed on Linux and macOS.
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 SurfRemesh T3, CM2 SurfRemesh Q4
- Could fail or even crash when
settings_type::refine_flag = false
.
CM2 HexaMesh Iso
- Could crash with
target_metric
.
CM2 Intersect T3
- Spurious splits on regular (non-intersecting) edges sometimes.
Core MeshTools libs
meshtools::node_detector
: errors when the coordinates matrix has two rows but a greater leading dimension (for instance 3).meshtools::NASTRAN_input
: elements aren’t read when the PID fields are void.meshtools1d::mesh_curve_param
: bug in 3-d metric reduction.meshtools2d::mesh_surface_param
: non-optimal background mesh generation.meshtools2d::mesh_disk_UR_T3
,meshtools2d::mesh_disk_UR_Q4
,meshtools2d::mesh_disk_T3
,meshtools2d::mesh_disk_Q4
: bugs with non-empty initial matrices (coordinates and/or connectivity).
/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.9.1 on Windows (except the Visual Studio 2010 and 2015 builds).
Note: the OCCT 7.8 libs are binary compatible. - Upgraded to OpenCascade 7.8.1 on Fedora 42. Other Linux and macOS builds remain based on OCCT 7.6.
- 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).meshtools2d::get_element_containing_point
(no longer experimental) has gained a new output parameter: the reference coordinates (2-D) of the point in the containing element.meshtools3d::get_element_containing_point
(no longer experimental) has gained a new output parameter: the reference coordinates (3-D) of the point in the containing element (tetrahedrons only).