CM2 FEM® SDK /release 5.7.0 Preview 2
- 5.7.0 Preview 2
- May 2026.
- Major release of the CM2 FEM® SDK.
- All CM2 FEM® 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
_57(Windows®),5.7.0with symlinks from5.7(Linux®, macOS®). - New Visual Studio 2026 builds.
- Visual Studio 2017 deprecated.
- Last version with Visual Studio 2010 builds. The Visual Studio 2015 builds shall be the legacy builds for the next series (5.8) and beyond.
/new features
Laws
- All laws
- New members (inherited by all child law classes) to manage element-specific (formerly called element-by-element) data:
get_data,nbr_specific_data,has_specific_data,remove_specific_data.
Note that membersreserve_elementsandset_element_by_elementhave been deprecated and should be replaced withreserve_specificandset_specific_data(see Breaking Changes below).
- New members (inherited by all child law classes) to manage element-specific (formerly called element-by-element) data:
law_shell_laminated- New member
get_integrated_elasticity_matrixto retrieve the elasticity matrix integrated through all plies (all ply laws considered in their elastic state). - The constructors and initialisation members now accept multipliers on each diagonal term of the elasticity matrix (multipliers vector of size 8).
Previously only two transverse-shear factors could be specified. Now multipliers can also be specified on the membrane terms and on the bending terms of the elasticity matrix (diagonal terms only).
- New member
law_shell_solid- The constructors and initialisation members now accept multipliers on each diagonal term of the elasticity matrix (multipliers vector of size 8). Same as above for
law_shell_laminated.
- The constructors and initialisation members now accept multipliers on each diagonal term of the elasticity matrix (multipliers vector of size 8). Same as above for
law_solid_uncoupled- New law for solids made of three (distinct) scalar laws (any
law_scalarelastic or elasto-plastic), one for each direction.
The elasticity matrixDis diagonal with the first three values defined by the three scalar laws. The shear moduli are constant.
This kind of law can be useful to model rebars embedded in concrete (or even concrete itself).
→ As any other solid law, this one can also be used in thelaw_shell_solidadapter to be used in plates/shells/laminates models.
- New law for solids made of three (distinct) scalar laws (any
Solvers
- All solvers
- New outputs
data_type::warning_NM_IDanddata_type::warning_FE_IDto return the first dubious model and element IDs encountered.
Whendata_type::warning_code=FEM_JACOBIAN_WARNING, these IDs can help pinpoint the elements with null or negative jacobian (only the first one is reported).
Note thatFEM_JACOBIAN_ERRORhas been replaced with the newFEM_JACOBIAN_WARNING(see Breaking Changes below).
- New outputs
solver_static_Newton- New automatic pseudo-time stepping to help convergence in difficult cases (highly non-linear systems), the solver can automatically reduce the pseudo-time increment (
settings_type::dt) or on the opposite, increase it when convergence is easy to reach the final time faster.
The ratiossettings_type::dt_cutback_factor(default = 0.25) andsettings_type::dt_increase_factor(default = 1.50) together with the boundssettings_type::dt_minandsettings_type::dt_maxcan be used to control the stepping.
Automatic pseudo-time stepping also works with Displacement-Control.
To disable automatic pseudo-time stepping and return to equal increments, set the above factors to 1. - New
data_type::potential_energiesarray (similar todata_type::elastic_energies) to give the potential energies associated to the solution snapshots.
Potential energy (usually negative) = elastic energy – work of external forces.
- New automatic pseudo-time stepping to help convergence in difficult cases (highly non-linear systems), the solver can automatically reduce the pseudo-time increment (
elementary_server- New Cauchy tensors outputs
Cauchy_E(total strains),Cauchy_Ee(elastic strains),Cauchy_Ep(plastic strains) andCauchy_S(stresses) at each integration points (tensors expressed in the local bases).
For beams (resp. plates/shells/laminates), these tensors are computed at the points with section (resp. thickness) coordinates specified in the newsettings_type::Qmatrix (no computed tensor when thisQmatrix is left empty).
- New Cauchy tensors outputs
solver_least_squares- Now accepts the new physics
FEM_NODES_CAUCHY_STRAINS,FEM_NODES_CAUCHY_PLASTIC_STRAINSandFEM_NODES_CAUCHY_STRESSESto smooth Cauchy tensors at nodes.
For beams (resp. plates/shells/laminates), these tensors are computed at the points with section (resp. thickness) coordinates specified in the newsettings_type::Qmatrix (no computed tensor when thisQmatrix is left empty).
Preferpost_processor_1dfor beams which gives exact results on linear beams.
Should now be used in place of the deprecatedCauchy_stresseswhich has limitations (stress only, approximative in elasto-plastic models).
- Now accepts the new physics
post_processor_1d- New outputs
E_loc(resp.E_glob) to give the diagram of the resultant strains in the element (resp. global) basis. - New outputs
Cauchy_E_locandCauchy_S_loc(resp.Cauchy_E_globandCauchy_S_glob) to give the 3-D Cauchy tensors in the element basis (resp. in the global XYZ basis).
These strain/stress tensors are computed at the points with coordinates in section specified in the newsettings_type::Qmatrix (no computed tensor when thisQmatrix is left empty for beams).
For rods, the tensors are always computed (only one axial component in the local basis) whatever theQmatrix. - New p-delta corrections based on an iterative scheme with additional p-delta momentums (products of the axial force with the deflections).
These p-delta corrections provide a cost-effective way to get some basic non-linear effects even with linear beams.
But note that they usually don’t respect static equilibrium at the nodes (with other connected beams) and don’t account for all geometric non-linearities.
For static equilibrium and higher accuracy, use fully non-linear beams (model_beam_gnl), a non-linear solversolver_static_Newton),
meshed segments (at least two elements along each segment) and preferably high-order elements such asCM2_EDGE4.
These p-delta corrections are provided (can be disabled) for linear and non-linear beams models. Null for rods.
- New outputs
solver_reactions_heat- New solver to compute heat flow imbalances (similar to
solver_reactionsto compute force/momentum imbalances in mechanical problems).
- New solver to compute heat flow imbalances (similar to
Elasto-plasticity
- The former Von-Mises laws have been expanded into Drucker-Prager (associated) laws with an additional
betaparameter on the hydrostatic/trace part of the stress tensor
(causing some parameters order changes in the initialisation functions, see Breaking Changes below):- scalar laws:
law_scalar_ep_perfect,law_scalar_ep_piecewise_linear,law_scalar_ep_powerandlaw_scalar_ep_RambergOsgood. - 1-D laws:
law_spring_ep_perfect,law_spring_ep_piecewise_linear,law_spring_ep_powerandlaw_spring_ep_RambergOsgood. - 3-D laws:
law_solid_ep_perfect,law_solid_ep_piecewise_linear,law_solid_ep_powerandlaw_solid_ep_RambergOsgood.
The Von-Mises behaviour can be retrieved by setting the
betaparameters to 0.
→ We recall that on top of solid models, all 3-D laws can be used with axi-3d, axi-torsion, plane-strains and plane-stresses (i.e. plate/shell/laminates) models. - scalar laws:
- New helper functions
law_scalar_ep_piecewise_linear::Se_to_Rp(resp.law_scalar_ep_piecewise_linear::Ke_to_Rp) to convert piecewise-linear sigma(eps) curves (resp. stiffness(eps)) into R(p) flow rule curves.
A plastic flow rule curve R(p) is now required in any piecewise-linear elasto-plastic law (see Breaking Changes below).
Thermal analysis
- The conductivity/capacity/convection laws (scalar) were considered constant (independent of the temperature).
Now you can uselaw_scalar_nlorlaw_scalar_poweras temperature-dependent conductivity laws inmodel_heat_conduction_1d,model_heat_conduction_2d,model_heat_conduction_3d, as heat capacity laws inmodel_heat_capacity_1d,model_heat_capacity_2d,model_heat_capacity_3dand as convection laws inmodel_heat_convection_1dandmodel_heat_convection_2d.
Note however that with no thermal non-linear solver available so far, this feature is only useful with successive static linear thermal analyses with updatedinitialtemperature solutions. - New
solver_reactions_heatto compute heat flow imbalances (similar tosolver_reactionsto compute force/momentum imbalances in mechanical problems). See above.
Miscellaneous
FEM_matrix- New
rangemember to get the range (min and max) of values for a given field type and column.
- New
/improvements
Solvers
solver_static_Newton- Very significant improvements in the convergence speed (number of iterations divided by 2 or more) with elasto-plastic plates/shells/laminates models.
/fixes
Laws
- All laws
law_base::set_element_by_elementdidn’t work when trying to reset the element’s data to the common data.
law_shell_solid,law_shell_laminated- Bug with thermal loads.
- Convergence at local Gauss points could fail.
law_beam_StVenant- Error on loads when offset in the constitutive law (again).
Solvers
elementary_server- Errors in the
elementary_server::data_type::Xmatrix (plastic strains and cumulative plasticity).
- Errors in the
solver_static_linear- Failed to solve with a
FEM_NUMERIC_ERRORin very specific cases (several load cases + prescribed DOFs + no free DOFs in some load cases).
- Failed to solve with a
solver_least_squares- Smoothing element by element in elasto-plastic models could trigger a quadratic time complexity with respect to the total number of elements in the model (instead of linear complexity).
Similar to the fix in 5.5.2, but this time specific to models with elasto-plastic constitutive laws.
- Smoothing element by element in elasto-plastic models could trigger a quadratic time complexity with respect to the total number of elements in the model (instead of linear complexity).
solver_reactions,solver_stress_1d- Bug with
data_type::load_factors.
- Bug with
post_processor_1d- Errors in deflection/rotation diagrams on beams with momentums (punctual, uniform, trapeze).
- Errors in deflection diagram on beams with trapeze loads.
- Errors on tapered beams with evolution functions or initial thermal stresses.
Miscellaneous
- As usual, doc fixes, update of the manuals, update of the tutorials.
/breaking changes
Laws
- All laws
- Members
law_base::reserve_elementsandlaw_base::set_element_by_elementhave been deprecated and should be replaced withlaw_base::reserve_specificandlaw_base::set_specific_data.
- Members
law_scalar_unsym- New scalar law replacing the former
law_scalar_ep_perfect_unsymandlaw_scalar_ep_piecewise_linear_unsym.
This new law accepts anylaw_scalar(elastic or elasto-plastic) in each of the two directions (traction and compression).
You can mix for instance alaw_scalar_ep_piecewise_linearin traction and a linear (constant)law_scalar(or none) in compression.
- New scalar law replacing the former
- All elasto-plastic laws
- The number of expected parameters (one additional
betaparameter for the Drucker-Prager behaviour) and their order have changed in the initialisation functions (constructors andinitmembers).
- The number of expected parameters (one additional
law_scalar_ep_piecewise_linear, law_rod_ep_piecewise_linear, law_solid_ep_piecewise_linear- Previously, the constructors/initializers required a stiffness curve (as a pair of ‘Es’ + ‘Ks’ vectors of same size or as a 2-column matrix).
To cope with Drucker-Prager plasticity, they now require a plasticity flow curve R(p) defined by plasticity thresholds ‘Ps’ and flow values ‘Rs’ (as two vectors or as a 2-column matrix).
Conversion helpers are provided to convert K(e) and S(e) curves into R(p) curves (Von-Mises only):int Ke_to_Rp (const DoubleVec& Es, const DoubleVec& Ks, DoubleVec& Ps, DoubleVec& Rs);int Se_to_Rp (const DoubleVec& Es, const DoubleVec& Ss, DoubleVec& Ps, DoubleVec& Rs);
- Previously, the constructors/initializers required a stiffness curve (as a pair of ‘Es’ + ‘Ks’ vectors of same size or as a 2-column matrix).
Solvers
- All solvers
FEM_JACOBIAN_ERRORhas been replaced with the newFEM_JACOBIAN_WARNING.
As a result, a bad jacobian in an element no longer aborts immediately the solvers but now only raises this warning (and records the IDs of first such an element).
However, note that bad jacobian(s) may cause the solvers to fail later on with another error (such asFEM_PIVOT_ERRORor aFEM_CONVERGENCE_ERROR).
elementary_serverdata_type::E(resp.data_type::S) renameddata_type::E_loc(resp.data_type::S_loc) for clarity and consistency with newpost_processor_1d::data_type::E_loc.
solver_static_Newton- The default value for the
settings_type::output_periodhas changed from 1 to 0.
This implies that the solution is no longer stored at each time step but now only at the _final_ time step.
Setoutput_period= 1 to get back the previous behaviour. - The convergence criterion on energy has changed from elastic energy to potential energy and the setting name
settings_type::tol_Ehas been replaced withsettings_type::tol_J. - The convergence thresholds
settings_type::tol_U,settings_type::tol_Fand
settings_type::tol_J(formersettings_type::tol_E) have been relaxed from1E-6to1E-5.
The former values appeared to be unnecessary too stringent (especially when elasto-plasticity is involved).
For the same reason, thesettings_type::min_Evalue has been relaxed from1E-12to1E-10.
A few Newton iterations can be saved with these relaxed thresholds (sometimes more when elasto-plasticity is involved).
- The default value for the
Elasto-plasticity
- The number of expected parameters (one additional
betaparameter for Drucker-Prager behaviour) and their order have changed in the initialisation functions (constructors andinitmembers). law_scalar_ep_piecewise_linear,law_rod_ep_piecewise_linear,law_solid_ep_piecewise_linear:
Previously, the constructors/initializers required a stiffness curve (as a pair ofEs+Ksvectors of same size or as a 2-column matrix).
To cope with the new Drucker-Prager plasticity, they now require a plasticity flow curve defined by plasticity thresholdsPsand flow valuesRs(also as two vectors or as a 2-column matrix).
A conversion helper is provided to convert the former into the latter:int PR_curve (const DoubleVec& Es, const DoubleVec& Ks, DoubleVec& Ps, DoubleVec& Rs);
Miscellaneous / Deprecations
Cauchy_stressesis now deprecated (stress tensors only, approximative for elasto-plastic models) and should be replaced with the new outputs ofelementary_server,solver_least_squaresorpost_processor_1d.
The first two solvers can now smooth also the plastic strains at nodes.