TFEL,
MFront and MTestTFEL/Utilities
TFEL/Config
features
TFEL/Math features
TFEL/Material
features
tfel-check
TFEL/System
TFEL/Material
features
MFront
@LinearSystemSolver keywordgeneric-parallel
interface for material propertiesCast3M interfaceplastic_deformation_gradient_normalisation_corrections
option of the FiniteStrainSingleCrystal brickCxxTokenizer with libFuzzerx /= 2 sets every component of arrays and views to
zerork54 and rk4 compute the final stress with the
stiffness tensor of the middle of the time step--clean option to select whether or not cleaning is
done--cmake-prefix-pathdgibi file generated by
MFront, for using the FEM program
Cast3Mbuild-tests targetQuantityConcept to take mutability into accountTFEL with madnextfel-checkQuantityConcept class to allow surrogate
classes to be treated as quantitiesStridedCoalescedView has no exposed data pointer and
strideTFEL_HOST_DEVICE to
LeftCauchyGreenTensorDerivativeExpr and
RightCauchyGreenTensorDerivativeExpr classesStressStensorConcept and
NoUnitStensorConcept concepts and siblings for orther
tensorial objectstfel-check
simultaenously in a CI contextThe page describes the new functionalities of Version 5.2 of the
TFEL project.
TDLS library (Tiny Device-callable Linear Solvers)The TDLS library provides direct linear solvers for
small dense systems, callable on CPUs as well as inside
GPU kernels, and designed for maximum GPU performance:
When compiling TFEL, one must explicitly enable support
for the TDLS library, see below.
The behaviour of MFront and the results of the code it
generates are now governed by a compatibility mode, which is a version
number. A development which does not fix an explicit bug, but changes
the results of the TFEL libraries or the results or the
behaviour of MFront and of the assets it generates, such as
a new default value of an option or a new default behaviour of a working
keyword, is associated with the version which makes it the default.
Users who need the previous behaviour restore it by selecting an older
compatibility mode.
Version 5.2 provides two compatibility modes:
5.2.0, the values and behaviours of Version 5.2,future, which introduces the changes which shall be the
default of the next major version.By default, no compatibility mode is declared: the generated code
uses the entities and the algorithms of the version of the
TFEL libraries which compiles it. Declaring a compatibility
mode makes the results of the generated code independent of this
version.
The compatibility mode of a file is defined by the
compatibility_mode option of its domain specific language,
which is available for all the DSLs, whereas the
--default-compatibility-mode command line argument declares
the mode of all the files treated by a run of mfront which
do not declare their own mode:
$ mfront --obuild --interface=generic --default-compatibility-mode=5.2.0 Norton.mfrontThe compatibility mode of an asset which declares one is recorded in
its generated code as the
<entry point>_compatibility_mode symbol, which is
returned by the
ExternalLibraryManager::getCompatibilityMode method,
available both in C++ and in Python.
The values of the physical constants are the first entities to be
versioned this way. The TFEL/PhysicalConstants library now
provides one set of constants per compatibility mode, in namespaces
named after the version which introduced them
(tfel::v5_2_0::, tfel::v6_0_0::, …), whereas
the names used by the previous versions,
tfel::PhysicalConstants and the variables of
tfel::constants, keep referring to the values of the
current version. The current values of Version 5.2 are those of the
5.2.0 mode, so the physical constants of version 5.2 are
those of version 5.1: the use of the values of the CODATA
2014 adjustment with all the digits of the double
representation is postponed to version 6.0, where it is available
through the 6.0.0 set of constants.
Compatibility modes are described in the pages devoted to compatibility modes in the
TFEL libraries and to compatibility modes in
MFront.
The enable-sanitize-options option is no longer a
boolean option: it now takes the list of the sanitizers to enable, e.g.
-Denable-sanitize-options="address;undefined". Enabling all
the sanitizers at once was indeed meaningless as most sanitizers cannot
be combined (for instance address, thread and
memory). Each sanitizer can also be enabled individually
using its dedicated enable-<name>-sanitizer option,
see below.
cmake \(3.20\) or
later is now required to build TFEL.
MFront’ interfaces have to implement a method named
setOptions.
The boolean argument of
CxxTokenizer::isValidIdentifier now states, as documented,
if C++ keywords are allowed (see Issue #964): its meaning
has been inverted. With the default value (true),
C++ keywords are now considered as valid
identifiers.
The static method get of the
GlobalDomainSpecificLanguageOptionsManager class has been
removed. The global options passed to domain specific languages are now
handled by the ConfigurationManager class, which derives
from the GlobalDomainSpecificLanguageOptionsManager class
and whose unique instance is returned by
ConfigurationManager::get().
@RotationMatrix<Euler> of MTest
now gives the rotation described by the Euler angles in the convention
of Bunge, as the polycrystal classes of MFront (see Issue
#1270): the rotation matrix was the Bunge matrix instead of its
transpose, i.e. the inverse rotation was applied.
Evaluator::getVariablesNames returns the names of
the variables ordered by their positions (the order given to the
constructor, or the order of their first appearance in the expression),
instead of the alphabetical order (see Issue #1209).
MTest (see Issue #1260): an incomplete set of
orthotropic thermal expansion coefficients is now an error (except
ThermalExpansion1 and ThermalExpansion2 in
plane stress).
MTest assembles the equations associated with the
off-diagonal components of the deformation gradient of finite strain
behaviours with the off-diagonal stresses, and applies the imposed
off-diagonal Cauchy stresses to both of their rows (see Issue #1290):
computations leaving one of these components free, which failed or
converged to a wrong state, converge to the right state, and the number
of iterations of the other ones may change.
abaqusexplicit interface (see Issue #1274): the
results of orthotropic behaviours using the MFront
orthotropy management policy change when the material frame is not
symmetric with respect to the global frame: the integration applied the
inverse rotation, and the second material axis was read beyond the
orientation in 2D.
computeDeterminantSecondDerivative of a
non-symmetric tensor now returns the second derivative of the
determinant in 2D and 3D (see Issue #1262): the rows of the off-diagonal
components differ from the previous results, which were the derivative
of the adjugate.
The tiny non-linear solvers (and the Implicit DSLs)
evaluate the estimate given by the last allowed correction (see Issue
#1288): an integration that converges with exactly iterMax
corrections now succeeds, and a failing one evaluates its residual once
more.
The Levenberg-Marquardt minimisers
(LevenbergMarquardt, FSLevenbergMarquardt)
reject the steps that increase the cost (see Issue #1288): the iterates
of every fit change.
Inputs that were silently ignored are now rejected (see Issue
#1256): the overriding_parameters option of the model DSLs,
@Bounds and @PhysicalBounds on gradients and
thermodynamic forces, bounds on a component of a scalar variable, and
the Ksf option of the
HarmonicSumOfNortonHoffViscoplasticFlows inelastic
flow.
The Broyden algorithms of the Implicit DSLs
(Broyden, PowellDogLeg_Broyden and
Broyden2) update the jacobian, or its inverse, again (see
Issue #1295): since TFEL-4.0, the update was hidden by the
updateOrCheckJacobian method generated in every behaviour.
The number of iterations of the behaviours using them changes, and so do
their results within the convergence criterion. In
TinyBroydenSolver and
TinyPowellDogLegBroydenSolver (respectively
TinyBroyden2Solver), the update is performed by the
updateJacobian (respectively
updateJacobianInvert) method, which replaces their
updateOrCheckJacobian method.
The integer values read by CxxTokenizer::readInt and
CxxTokenizer::readUnsignedInt, i.e. the integers of the
MTest, MFront and tfel-check
files (numbers of iterations and of sub-steps, columns, array sizes of
the DSLs, …), shall be written without decimal point nor exponent:
3.0, 3. or 3e0 are now rejected
(see Issue #1326).
The type identifiers exported by MFront for the
variables whose type is the derivative of a tensorial type alias (such
as StressStensor, Stensor,
TVector or Tensor) with respect to a
non-scalar type follow the encoding described in the documentation: for
instance,
derivative_type<StressStensor, StrainStensor> is
exported as 268, like Stensor4, instead of
76, which MTest and MGIS decode
as derivative_type<stensor<1, real>, real>.
Behaviours declaring such variables must be generated again (see Issue
#1332).
The array sizes of the variables of MFront and the
integer formulas evaluated by IntegerEvaluator (for
instance the tile_size option of the TDLS
linear solver) shall only contain integers: a number with a decimal
point or an exponent, such as 2.5 (which was truncated to
2), 1e1 or 2.0, is now rejected
(see Issue #1321).
In the homogenisation schemes of TFEL/Material, the
elasticity of an anisotropic OrientedDistribution or
Grain, given in the local basis of its inclusions, is
rotated to the global basis (see Issue #1299): it was used as a global
elasticity, so that the orientation of these phases was ignored.
computeEllipsoidLocalisationTensor and
computePlaneStrainLocalisationTensor with an isotropic
matrix rotate the elasticity of the inclusion as well, as documented.
The results of the dilute, Mori-Tanaka and self-consistent schemes with
such phases change.
The FiniteStrainSingleCrystal brick takes into
account, in the jacobian and the consistent tangent operator, the
derivatives of the normalisation of the inverse of the plastic
deformation gradient increment (see Issues #1309 and #1359). These
derivatives were explicitly neglected, as numerical tests showed (or at
least seemed to show) that they were negligible. The residual is
unchanged, so the results only change within the convergence criteria,
unless the sub-stepping changes: the number of local and global
iterations changes, and decreases significantly when the deformation
gradient is not fully imposed. The boolean option
plastic_deformation_gradient_normalisation_corrections of
the brick, which is true by default, allows users to easily
test if this correction affects their results: setting it to
false restores the previous derivatives.
The value of a raw string literal token given by
CxxTokenizer holds the whole literal, from the
R delimiter to the closing " included, and its
offset is that of the R, as for a quoted string (see Issue
#1390): the value was the contents of the literal only and the offset
that of those contents, so that the consumers which stripped the first
and last characters of the value of the string tokens, as the parsers of
MFront, MTest and tfel-check did,
truncated the raw string literals. Those parsers read the right contents
now: @Date R"(23/11/06)"; gave the date 3/11/0
and @Author R"(Helfer "Thomas")"; the author
elfer "Thomas". Code which reads the contents of a string
token shall use the new tfel::utilities::getContents
function rather than removing the first and last characters of the
value.
The offset of a comment token which has no contents on the line
it starts on is that of the delimiter which opens the comment (see Issue
#1391): it was the offset reached after the delimiters and the spaces
which would have surrounded the contents, so that it pointed past the
end of the line for an empty C++ style comment, as
a; //, and beyond the opening delimiter for an empty
C style comment or for a comment opened at the end of a
line, as the header comments of the MFront files starting
with /*!. The flags, the lines and the values of the tokens
are unaffected.
CxxTokenizer::stripComments gathers all the comments
of a line, separated by a space character, instead of keeping only the
last one (see Issue #1392): the comments of a line holding
//! first and //! second are
first second, not second. The empty comments
bring nothing and give no separator, so that a line whose only comment
is empty gives no entry in the comments of the tokenizer.
Tokenizing a file line by line, with a call to
CxxTokenizer::parseString per line, gives the same tokens
as giving the whole contents to a single call (see Issue #1396): a file
whose last line is terminated by an end of line character gave an
additional empty line, which is not a line of the file, so that the
value of a comment or of a raw string literal which is not closed at the
end of the file held an additional end of line character, and the last
line of a file which is not terminated by an end of line character was
tokenized twice. The line numbers are unaffected.
cmake
optionsenable-tdls: add support for Tiny Device-callable
Linear Solvers (TDLS) library. OFF by
default.enable-tdls-as-default-linear-system-solver-in-mfront:
use TDLS as the default linear solver. Requires
enable-tdls to be ON. OFF by
default.enable-libfuzzer-tests: configure the
libFuzzer based analyses of the
tfel::utilities::CxxTokenizer class. OFF by
default. Those analyses can only be built with clang and
are neither built nor run by make check, see the
build-cxxtokenzier-libfuzzer-tests and
cxxtokenzier-libfuzzer-tests targets described below.The support for sanitizers has been modularised: the
enable-sanitize-options option takes the list of the
sanitizers to enable (a comma may be used as a separator instead of a
semicolon), for instance:
$ cmake <srcdir> -Denable-sanitize-options="address;undefined"The available sanitizers depend on the compiler and on its version.
The address, thread and memory
sanitizers cannot be used simultaneously.
Each sanitizer also has a dedicated option, whose name is obtained
from the sanitizer name: enable-<name>-sanitizer,
e.g. -Denable-bounds-strict-sanitizer=ON. Such options can
be combined with the enable-sanitize-options option: the
enabled sanitizers are the sanitizers listed in the
enable-sanitize-options option and the sanitizers whose
dedicated option is enabled. Dedicated options are also defined for the
sanitizers which are not supported by the current compiler (enabling
them issues a warning and they are ignored), so that the same options
can be used whatever the compiler is.
The following sanitizers are declared for gcc (the
sanitizers corresponding to a subset of the undefined behaviour
sanitizer can be enabled individually):
address, thread, leak,
hwaddress,undefined and its subsets: alignment,
bool, bounds, bounds-strict,
builtin, enum,
float-cast-overflow, float-divide-by-zero,
null, object-size, return,
shift, shift-base,
shift-exponent, signed-integer-overflow,
vptr,pointer-compare, pointer-subtract (the
address sanitizer and the link time optimization are required and added
automatically),fstack-check, fstack-protector-all,
fno-omit-frame-pointer.The following sanitizers are declared for clang:
address, thread, memory (the
memory sanitizer also enables
-fsanitize-memory-track-origins=2), leak,
hwaddress,cfi, cfi-icall, safe-stack,
shadow-call-stack, dataflow,undefined and its subsets: alignment,
bool, bounds, builtin,
enum, float-cast-overflow,
float-divide-by-zero, integer,
unsigned-integer-overflow, null,
object-size, return, shift,
shift-base, shift-exponent,
signed-integer-overflow, vptr,pointer-compare, pointer-subtract (the
address sanitizer and the link time optimization are required and added
automatically),address-use-after-scope
(-fsanitize-address-use-after-scope),
fstack-check, fstack-protector-all,
fno-omit-frame-pointer.Some sanitizers require specific settings to be fully effective (the
link time optimization for cfi and
shadow-call-stack, instrumentation of all the linked code
for memory and safe-stack, etc.), as described
in the gcc and clang documentations.
Note that the vptr check, which is part of the
undefined sanitizer, may lead to pathologically long
compilation times with gcc for some files of
MFront, which implement heavy template code: it takes more
than ninety minutes to compile
mfront/src/GenericMaterialPropertyInterfaceBase.cxx with
-fsanitize=undefined (-O2), whereas a few
minutes are needed when the vptr check is disabled. This
check can be excluded by listing individually the sanitizers of
interest, using the corresponding dedicated options
(alignment, bool, bounds,
builtin, enum, etc.) instead of the
undefined sanitizer.
When at least one sanitizer is enabled, the
-fno-omit-frame-pointer flag is added automatically to ease
the interpretation of the reports emitted by the sanitizers.
cmake
variablesgeneric-parallel-configurations: list of configurations
to be supported. See next paragraph for details and the list of
supported configurations.TFEL_GXX_COMPILER: path to the g++
compiler.TFEL_CLANGXX_COMPILER: path to the clang++
compiler.TFEL_ICPX_COMPILER: path to INTEL’s icpx
compiler.TFEL_NVHPC_COMPILER: path to NVIDIA’s
nvhpc compiler.TFEL_ACPP_COMPILER: path to AdaptativeCpp’s
acpp compiler.tdls_DIR: directory where to find the
cmake files installed by the Tiny Device-callable Linear
Solvers (TDLS) library.The following configurations are supported for parallel computations:
cuda-nvcc: configuration associated with the
CUDA parallel programming model and NVIDIA’s
nvcc compilercuda-clang: configuration associated with the
CUDA parallel programming model and LLVM’s
clang compilerhip-hipcc: configuration associated with the
HIP parallel programming model and AMD’s hipcc
compilerhip-clang: configuration associated with the
HIP parallel programming model and LLVM’s
clang compilerstlpar-parunseq-gcc: configuration associated with
C++ standard parallel algorithms using the parallel
unsequenced execution policy and the gcc compiler.stlpar-parunseq-clang: configuration associated with
C++ standard parallel algorithms using the parallel
unsequenced execution policy and the clang compiler.stlpar-parunseq-icpx: configuration associated with
C++ standard parallel algorithms using the parallel
unsequenced execution policy and the icpx compiler.stlpar-parunseq-nvhpc-gpu: configuration associated
with C++ standard parallel algorithms using the parallel
unsequenced execution policy and NVIDIA’s nvhpc compiler
with offloading on the GPU.sycl-default-icpx: configuration associated with
SYCL programming model INTEL’s icpx
compiler.sycl-default-acpp: configuration associated with
SYCL programming model and AdaptativeCpp’s
acpp compiler.sycl-gpu-acpp: configuration associated with
SYCL programming model and AdaptativeCpp’s
acpp compiler, with offloading on the GPU.build-tests
targetIn previous versions, tests were compiled and run using the
check target, which internally calls ctest for
running the test. One drawback of this approach is that
ctest could not be run in parallel.
The build-tests target (which is a dependency of the
check target) only compiles the tests. To run the tests,
one may still call the check target or call directly
ctest.
If the build-tests target has not been called, the
check target works as in previous versions.
libFuzzerThe tfel::utilities::CxxTokenizer class, which
MFront uses to read the files of its domain specific
language, is now covered by coverage guided fuzz testing, gathered in
the additional-tests/fuzzing directory of the sources.
Those analyses are configured by the enable-libfuzzer-tests
option, which is OFF by default, and can only be built with
clang.
Two targets are dedicated to them:
build-cxxtokenzier-libfuzzer-tests builds the fuzzing
executables,cxxtokenzier-libfuzzer-tests builds them and runs the
analyses, for the duration given by the
libfuzzer-tests-max-total-time option.The fuzzing executables are excluded from the default target and no
analysis is registered with ctest, so that neither
make all nor make check builds or runs them:
the duration of a fuzzing analysis is not bounded a priori. The corpus
of an analysis and the inputs it generates which lead to a failure are
kept in the build tree, so that a long campaign is a sequence of runs
sharing the same corpus.
The mfront-fuzzing analysis tokenizes
MFront files with the options MFront itself
uses, and checks the contract of the produced tokens beyond the absence
of any sanitizer report. The all value of the
mfront-fuzzing-database option uses all the
MFront files of mfront/tests/behaviours as the
database of the analysis.
For more details, see the documentation on fuzz testing the tokenizer.
TFEL/UtilitiesThe getContents function returns the contents of the
literal held by a Token: its value without the double
quotes of a quoted string, without the single quotes of a character
literal and without the R"delim( prefix and the
)delim" suffix of a raw string literal. The
isRawString and getRawStringDelimiter
functions tell if a token holds a raw string literal and give its
delimiter. Those functions allow a consumer to read the contents of a
string token without relying on the flag of the token only, as removing
the first and last characters of the value truncates a raw string
literal (see Issue #1390).
The contract of the tokens given by CxxTokenizer is
documented now, on the Token class for the value, the line
and the offset of a token, and on the CxxTokenizer class
for the exceptions: the value of a number does not hold the digit
separators of the C++14 integer literals, whereas the
offsets remain those of the file, so that a source code can be rewritten
from the offsets of its tokens (see Issue #1393); a C style
comment and a raw string literal which are not closed at the end of a
file are on the contrary accepted, and leave the state of the tokenizer
open, on the contrary to a quoted string and a character literal, which
are rejected (see Issue #1395). Checking that the tokens describe the
file they come from is what the fuzz testing analysis of the tokenizer
does, see above.
TFEL/Config
featuresThe TFEL/Config library is now documented on this page.
The getTFELDefaultSubstitutions function returns some
default substitutions used by MFront when reading
configuration files and tfel-check when analysing
.check files. The keys listed below are delimited by the
@ character in those files and in the map returned by this
function, e.g. @TFEL_CXX_STANDARD@.
TFEL_CXX_STANDARD: the C++ standard used
by the project.TFEL_GXX_COMPILER: path the g++
compiler. The value associated with this key is determined as follows,
by order of priority:
TFEL_GXX_COMPILER during the
invocation of cmake.g++ as the main compiler to compile
TFELg++ using cmake’s
find_program function.TFEL_CLANGXX_COMPILER: path to LLVM
clang++ compiler. The value associated with this key is
determined as follows, by order of priority:
TFEL_CLANGXX_COMPILER during
the invocation of cmake,clang++ as the main compiler to compile
TFEL,clang++ using cmake’s
find_program function.TFEL_ICPX_COMPILER: path to INTEL’s
icpx compiler. The value associated with this key is
determined as follows, by order of priority:
TFEL_ICPX_COMPILER during the
invocation of cmake,icpx as the main compiler to compile
TFEL,icpx using cmake’s
find_program function.TFEL_ACPP_COMPILER: path to AdaptativeCpp
acpp compiler. The value associated with this key is
determined as follows, by order of priority:
TFEL_ACPP_COMPILER during the
invocation of cmake,acpp using cmake’s
find_program function.TFEL_NVHPC_COMPILER: path to NVIDIA’s
nvhpc compiler. The value associated with this key is
determined as follows, by order of priority:
TFEL_NVHPC_COMPILER during the
invocation of cmake,nvhpc as the main compiler to compile
TFEL,nvc++ using cmake’s
find_program function.TFEL_NVCC_COMPILER: path to NVIDIA’s
nvcc as found by FindCUDAToolkit.
TFEL_HIPCC_COMPILER: path to AMD’s
hipcc compiler. The value associated with this key is
determined as follows, by order of priority:
TFEL_HIPCC_COMPILER during the
invocation of cmake,hipcc using cmake’s
find_program function.HIPCC compilerTFEL_HIPCC_FLAGS: additional flags to be passed to the
hipcc compiler.TFEL_HIP_INCLUDE_DIR: paths to HIP
headersCUDA platformTFEL_CUDA_PATH: path to NVIDIA’s CUDA
toolkit as found by CMake’s FindCUDAToolkit
module.TFEL_CUDA_LIBRARY_DIR: path to the libraries of the
NVIDIA’s CUDA toolkit as found by CMake’s
FindCUDAToolkit module.--cmake-prefix-path--cmake-prefix-path returns the path to the
CMake configuration files provided by the project
$ tfel-config --cmake-prefix-path
/home/th202608/codes/tfel/master/install-python-3.10.12/share/tfel/cmakeTFEL/Math
featuresIn previous versions, the View class allows interpreting
a contiguous memory area as a tensorial object. The
CoalescedView class allows to create a tensorial object
where each component is referred to by its own pointer.
The StridedCoalescedView assumes that each component is
separated by a constant stride in memory, so that it only have to store
one pointer and the value of the stride.
Such views are efficient on GPUs where coalescent memory access are preferable.
int values[8] = {1, 10, 2, 20, 3, 30, 4, 40};
auto s1 = map_strided<stensor<2u, int>>(values, 2);The Walpole basis relative to transverse isotropic fourth-order
tensors (st2tost2) is introduced with the
struct TransverseIsotropicWalpoleBasis, member
of tfel::math.
Quantities were deeply refactored to:
The computeAdjugateDeterminantDerivative function
returns the adjugate of a tensor, \(\det\left(F\right)\,F^{-1}\), i.e. the
transpose of the derivative of the determinant returned by
computeDeterminantDerivative. The
computeAdjugateDeterminantSecondDerivative function returns
its derivative, which computeDeterminantSecondDerivative
returned in 2D and 3D before Issue #1262 (it now returns the second
derivative of the determinant).
const auto adj = computeAdjugateDeterminantDerivative(F);
const auto dadj = computeAdjugateDeterminantSecondDerivative(F);TFEL/Material
featuresThe following methods of the ParticulateMicrostructure
objects are able to modify the microstructure:
changeElasticityOfMatrixPhasechangeElasticityOfInclusionPhasechangeFractionOfInclusionPhaseThe UserDefinedDistributionOfSpheroids allows to define
a distribution of spheroids defined by two orientation tensors. This
distribution can be used in a ParticulateMicrostructure and
the associated homogenization schemes can be used with these
microstructures.
The Polycrystal object has been added to deal with
homogenization schemes which do not assume that there is a matrix phase.
An object Grain was created for this class of
microstructures.
The computeSelfConsistent function
(computeSelfConsistentScheme in the Python
bindings) has been modified in order to be more consistent with the
literature. Now, This scheme takes a Polycrystal in which
no matrix phase exists. For the ParticulateMicrostructure,
the function computeAsymmetricSelfConsistent
(computeAsymmetricSelfConsistentScheme in the
Python bindings) has been introduced, which corresponds to
a variant of the Self-Consistent scheme for which the matrix phase plays
a particular role.
In the homogenization schemes relative to the
ParticulateMicrostructure, the computation of the
derivatives of the homogenized stiffness tensor w.r.t. the isotropic
moduli is available. It can be obtained by using the attributes
.derivative_of_homogenized_stiffness_wrt_kr and
.derivative_of_homogenized_stiffness_wrt_mur of the
HomogenizationScheme object (only for isotropic
phases).
tfel-checkThe commands described in different .check files can now
be run in distinct processes.
Note that the command described in a .check are still
run sequentially.
By default, as in previous versions, only one process is used.
The command line argument --jobs (-j) allow
specifying the number of jobs run simultaneously.
If no option is given to --jobs, the number of available
cores is used, if the system provide this information.
By default, this number must be lower than the number of cores
available. This limit can be discarded by
passing--discard-jobs-limit=true to
tfel-check.
The user must take care that the commands described in
.check files can be run in parallel.
A typical example of conflict would be to have two
.check files in the same directory that call
mfront to build somes shared libraries: the two
MFront’s processes may write concurrently files in the
src and include directories, leading to an
undefined behaviour.
Another example would be to use @CleanDirectories and
@CleanFiles commands inappropriately and erase data used by
commands of other .check files.
Configuration files can now contain an
environment_variables sections which can introduce a map
defining a set of environment variables.
environment_variables: {"CXXFLAGS": "-Wall"};@Environment keyword), the latter
definition is used.The --clean-up command line argument allows to choose
whether the generated files and directories listed by the
@CleanFiles and @CleanDirectories keywords
will be cleaned (this is the case by default) or not in case of
success.
$ tfel-check --clean-up=falseThe --discard-clean-up-on-failure command line argument
allows to choose whether the generated files and directories listed by
the @CleanFiles and @CleanDirectories keywords
will be cleaned or not (this is the case by default) in case of
failure.
$ tfel-check --discard-clean-up-on-failure=falseCommands now have a timeout option to limit their
duration:
~~{c++} [Command?] “sleep 10”{
timeout: 1 };~~
This feature requires the timeout utility to be be
available.
TFEL/SystemProcessManagercreateProcess and
execute methods allow specifying the directory where a
command shall be executed.ProcessManager shall now work properly in a
multithreaded context.SignalManagerSignalManager shall now work properly in a
multithreaded context.TFEL/Material
featuresThe second moments of strains considering a Hashin-Shtrikman scheme are available. A new tutorial shows how to use it in the implementation of Ponte-Castaneda variational bound (1992), within the framework of non-linear elasticity.
MFront@LinearSystemSolver keywordThe @LinearSystemSolver keyword is used to select the
linear system solver. It is followed by the name of the solver.
Currently, two solvers are supported:
Default. This uses the solvers provided natively by the
TFEL/Math library. As implied by its name, this solver is
used by default.TDLS (or equivalently
TinyDeviceCallableLinearSolver). See https://trsxvz.github.io/TDLS/getting_started.html for
details. If TFEL is not compiled with support for the
TDLS library, selecting this solver falls back to the
Default solver.The name of the solver can optionally be followed by a dictionary allowing to parametrize the solver.
Default Linear SolverThe Default Linear Solver does not accept any
parameter.
TDLS Linear SolverThe following options are supported:
tile_size: the matrix is processed as a grid of
tile_size x tile_size register tiles. This is the main
performance axis of the solvers. Tune it per system dimension. The
tile_size can be a strictly positive integer or a string.
If tile_size is a string, it is interpreted as an integer
formula whose variables can be any integer constant (see the
@IntegerConstant keyword), N,
TVectorSize, StensorSize or
TensorSize. This formula must evaluate to a strictly
positive integer for all hypotheses supported by the behaviour.schedule: expected values are either
left_looking (or equivalently left,
left-looking or LeftLooking) or
right_looking (or equivalently right,
right-looking or RightLooking). This parameter
defines the elimination schedule of the tiled factorization.out_of_tile_search_strategy: expected values are either
first_acceptable (or equivalently
first-acceptable or FirstAcceptable) or
full_scan (or equivalently full-scan or
FullScan). With first_acceptable, the search
below the tile stops at the first candidate whose corrected magnitude
reaches the out-of-tile search threshold. With full_scan,
all the rows below the tile are scanned and the best corrected candidate
wins.unroll_inner_loop: expected values are either
true or false. If true, loops
indexing register tiles carry a forced-unroll pragma, the guard that
keeps tiles in registers on GPU backends, where a rolled loop indexes
the tile dynamically and demotes it to slow local memory. If
false, no unroll pragma anywhere, for faster compiles, GPU
performance not guaranteed.out_of_tile_search_threshold: acceptable-pivot
threshold of the out-of-tile search. An in-tile pivot candidate whose
magnitude reaches this value is accepted without looking outside the
tile; below it, the search extends to the rows under the tile
(out-of-tile pivoting) and the best candidate wins.relative_pivot_threshold: relative threshold of the
pivot choice inside the diagonal tile, in ]0, 1]. The row
in place keeps the pivot when its magnitude reaches both this fraction
of the largest in-tile candidate and the out-of-tile search threshold;
otherwise the largest in-tile candidate wins. This threshold governs the
in-tile choice only: the out-of-tile search keeps its absolute
threshold. A value of 1 takes the largest in-tile
candidate. This option requires a version of TDLS later
than 0.2.0.singular_pivot_threshold: the factorization is declared
singular when even the best candidate of the out-of-tile recovery stays
below this threshold. This option must be set together with the
out_of_tile_search_threshold option and must not exceed
it.out_of_tile_search_diagnostics: expected values are
either true or false. If true, an
integer member mfront_tdls_oot_count, readable in user code
blocks, reports the number of out-of-tile searches of the last linear
solve. If false (the default), the generated code is
unchanged.If a parameter is not defined, the default values are inherited from
the TiledLUppConfig class defined by the TDLS
library. See the API reference
for details. At the time of writing this documentation, those default
values are:
3 for tile_sizeright_looking for schedulefirst_acceptable for
out_of_tile_search_strategytrue for unroll_inner_loop1e-10 for out_of_tile_search_threshold (or
1e-4 for single precision)0.1 for relative_pivot_threshold
(TDLS 0.2.0 takes the largest in-tile candidate, as a
threshold of 1)std::numeric_limits<double>::min() for
singular_pivot_threshold (or
std::numeric_limits<float>::min() for single
precision)@LinearSystemSolver TDLS{
tile_size: 4,
unroll_inner_loop: false
};@LinearSystemSolver TDLS{
tile_size: "StensorSize"
};MFront now allows to define options in a configuration
file define through the --configuration-file command line
argument as follows:
~~{bash} $ mfront –configuration-file=config.json
–interface=generic-parallel UO2_ShearModulus.mfront~~
Configuration file follows an extented JSON-like syntax.
It contains the following sections:
dsl_optionsmaterial_property_dsl_optionsbehaviour_dsl_optionsmodel_dsl_optionsinterfaces_optionsmaterial_property_interfaces_optionsbehaviour_interfaces_optionsmodel_interfaces_optionscompilation_optionslinking_optionsNone of those sections is required. All those sections must introduce a dictionary.
Note
The options given in sections
dsl_options,material_property_dsl_options,behaviour_dsl_optionsandmodel_dsl_optionsmay also be retrieved in dedicated configurations files, respectively specified by the--dsl-options-file,--material-property-dsl-options-file,--behaviour-dsl-options-file, and--model-dsl-options-filecommand line arguments introduced in Version 4.1.
interfaces_options: {
generic-parallel: {
backend: {stlpar: {execution_policy: "par_unseq"}}
}
}interfaces_options sectionThe interfaces_options section associates to the name of
an interface a dictionary of options passed to this interface, as in the
previous example. The material_property_interfaces_options,
behaviour_interfaces_options and
model_interfaces_options sections have the same syntax, but
their options are only passed to the interfaces dedicated to material
properties, behaviours and models respectively.
compilation_options sectionThe compilation_options section associates to a language
(c, cxx, cuda or
hip) a dictionary of options, as follows:
compilation_options : {
cxx : {
compiler: "nvc++",
compilation_flags: "-O2 -stdpar=gpu -std=c++20 -march=native -gpu=sm_89"
}
}compiler
optionThe compiler option specifies the compiler used for the
given language. The environment variables CC,
CXX, CUDA_COMPILER and
HIP_COMPILER take precedence over this option.
compilation_flags optionThe compilation_flags option specifies the compilation
flags used for the given language, as a string or as an array of
strings. The environment variables CFLAGS,
CXXFLAGS, CUDAFLAGS and HIPFLAGS
take precedence over this option.
preprocessor_flags optionThe preprocessor_flags option specifies the preprocessor
flags used for the given language, as a string or as an array of
strings. Those flags are written before the compilation flags.
linking_options sectionThe linking_options section defines the options passed
to the linker.
linker_flags optionThe linker_flags option specifies the flags passed to
the linker, as a string or as an array of strings. The environment
variable LDFLAGS takes precedence over this option.
~~{bash} $ mfront –obuild
–interface=‘generic-parallel{backend:{“stlpar”:
{execution_policy:“par_unseq”}}}’ UO2_ShearModulus.mfront~~
~~{bash} $ mfront –obuild
–interface=‘{generic-parallel:{backend:“stlpar”{execution_policy:“par_unseq”}}}’
UO2_ShearModulus.mfront~~
generic-parallel interface for material propertiesSTLParCUDACast3M interfaceGibiane input fileThe Cast3M interface generates automatically an example
of Gibiane input file to integrate which each
MFront behaviour. This example is meant to be used a
template and do not pretend to be usable without modification by the
user. For instance, previous versions of MFront did not
guarantee that the name of the variables (limited to 4
characters) were unique. Version 5.2 improves this. To illustrate this,
one may compare the output of Version 5.1 and Version 5.2:
* Version prior to 5.2
statev = 'MOTS' 'EERR' 'EEZZ' 'EETT' 'EERZ' 'KHRR' 'KHZZ' 'KHTT' 'KHRZ' 'KHRR' 'KHZZ' 'KHTT' 'KHRZ' 'P';
* Version 5.2
statev = 'MOTS' 'EERR' 'EEZZ' 'EETT' 'EERZ' 'KHRR' 'KHZZ' 'KHTT' 'KHRZ' 'V0' 'V1' 'V2' 'V3' 'P';
In Version 5.1, the variable name KHRR is declared
twice. Cast3M does not generate an error although
duplicated names leads to erroneous results. Version 5.2 avoids this
pitfall.
plastic_deformation_gradient_normalisation_corrections
option of the FiniteStrainSingleCrystal brickThe FiniteStrainSingleCrystal brick normalises the
inverse of the plastic deformation gradient increment by the cubic root
of its determinant. The derivatives of this normalisation with respect
to the plastic slips were explicitly neglected in the jacobian and in
the consistent tangent operator, as numerical tests showed (or at least
seemed to show) that they were negligible.
These derivatives are now taken into account by default (see Issue
#1359). The results are not affected, up to the convergence criteria,
but the convergence is when the deformation gradient is not fully
imposed: the global iterations recover their quadratic convergence. The
boolean option
plastic_deformation_gradient_normalisation_corrections
allows to neglect them:
@Brick FiniteStrainSingleCrystal{
plastic_deformation_gradient_normalisation_corrections : false
};The same derivatives are explicitly neglected in the
FiniteStrainSingleCrystal,
FiniteStrainSingleCrystal2 and
FiniteStrainSingleCrystal_NumericalJacobian test
behaviours. Versions taking them into account are provided by the
FiniteStrainSingleCrystal_WithCorrections,
FiniteStrainSingleCrystal2_WithCorrections and
FiniteStrainSingleCrystal_NumericalJacobian_WithCorrections
test behaviours.
A new page describes the coding conventions of the C and
C++ sources of the project, for new developers as well as
for coding agents: coding
guidelines.
Two new pages describe how compatibility modes are implemented in the
TFEL libraries (compatibility modes in the
TFEL libraries) and how they are used by
MFront (compatibility modes in
MFront).
Github actions have been updated to supported a wider range of
configurations, including testing based on
Visual Studio 2022 and Visual Studio 2026.
The authors are grateful to the many contributors to the
TFEL/MFront project. This research was conducted in the
framework of the PLEIADES project, which was supported financially by
the CEA (Commissariat à l’Énergie Atomique et aux Énergies
Alternatives), EDF (Électricité de France) and Framatome. Homogenization
developments were conducted within the framework of the AnoHonA ANR
project (n° AAPG2023).
CxxTokenizer with libFuzzerThe tfel::utilities::CxxTokenizer class is now covered
by libFuzzer based analyses, which are enabled by the
enable-libfuzzer-tests option, and by the
CxxTokenizerContractTest unit test, which checks the
contract of the tokens for the lexical constructs that were not covered
by the existing tests of the tokenizer: raw string literals, empty
comments, comments of a line and numbers with digit separators.
For more details, see https://github.com/thelfer/tfel/issues/1387
For more details, see https://github.com/thelfer/tfel/issues/1379
For more details, see https://github.com/thelfer/tfel/issues/932
For more details, see https://github.com/thelfer/tfel/issues/1376 ## Issue 1359: [mfront] FiniteStrainSingleCrystal: corrections of the derivatives of the normalised plastic deformation gradient increment, test behaviours and option of the brick
For more details, see https://github.com/thelfer/tfel/issues/1359 ## Issue 1273: [tfel-check] Warning when [Precision?] with one value keeps the second precision of a previous [Precision?]
For more details, see https://github.com/thelfer/tfel/issues/1273 ## Issue 1371: [mtest] Generalised plane strain elastic stiffness used with the generic plane stress algorithm of the castem wrappers
For more details, see https://github.com/thelfer/tfel/issues/1371
For more details, see https://github.com/thelfer/tfel/issues/1332
For more details, see https://github.com/thelfer/tfel/issues/1330
For more details, see https://github.com/thelfer/tfel/issues/1326
For more details, see https://github.com/thelfer/tfel/issues/1324
For more details, see https://github.com/thelfer/tfel/issues/1321
For more details, see https://github.com/thelfer/tfel/issues/1319
For more details, see https://github.com/thelfer/tfel/issues/1317
For more details, see https://github.com/thelfer/tfel/issues/1313
For more details, see https://github.com/thelfer/tfel/issues/1311
For more details, see https://github.com/thelfer/tfel/issues/1309
For more details, see https://github.com/thelfer/tfel/issues/1307
For more details, see https://github.com/thelfer/tfel/issues/1305
For more details, see https://github.com/thelfer/tfel/issues/1303
For more details, see https://github.com/thelfer/tfel/issues/1301
For more details, see https://github.com/thelfer/tfel/issues/1299
For more details, see https://github.com/thelfer/tfel/issues/1295
For more details, see https://github.com/thelfer/tfel/issues/1292
For more details, see https://github.com/thelfer/tfel/issues/1290
For more details, see https://github.com/thelfer/tfel/issues/1288
For more details, see https://github.com/thelfer/tfel/issues/1285
For more details, see https://github.com/thelfer/tfel/issues/1283
For more details, see https://github.com/thelfer/tfel/issues/1281
For more details, see https://github.com/thelfer/tfel/issues/1274
For more details, see https://github.com/thelfer/tfel/issues/1270
For more details, see https://github.com/thelfer/tfel/issues/1264
For more details, see https://github.com/thelfer/tfel/issues/1262
For more details, see https://github.com/thelfer/tfel/issues/1260
For more details, see https://github.com/thelfer/tfel/issues/1258
For more details, see https://github.com/thelfer/tfel/issues/1256
For more details, see https://github.com/thelfer/tfel/issues/1254
For more details, see https://github.com/thelfer/tfel/issues/1251
For more details, see https://github.com/thelfer/tfel/issues/1242
For more details, see https://github.com/thelfer/tfel/issues/1241
For more details, see https://github.com/thelfer/tfel/issues/1239
For more details, see https://github.com/thelfer/tfel/issues/1237
For more details, see https://github.com/thelfer/tfel/issues/1235
For more details, see https://github.com/thelfer/tfel/issues/1233
For more details, see https://github.com/thelfer/tfel/issues/1231
For more details, see https://github.com/thelfer/tfel/issues/1229
For more details, see https://github.com/thelfer/tfel/issues/1227
For more details, see https://github.com/thelfer/tfel/issues/1225
For more details, see https://github.com/thelfer/tfel/issues/1223
For more details, see https://github.com/thelfer/tfel/issues/1221
For more details, see https://github.com/thelfer/tfel/issues/1219
For more details, see https://github.com/thelfer/tfel/issues/1217
For more details, see https://github.com/thelfer/tfel/issues/1215
For more details, see https://github.com/thelfer/tfel/issues/1213
For more details, see https://github.com/thelfer/tfel/issues/1211
For more details, see https://github.com/thelfer/tfel/issues/1209
For more details, see https://github.com/thelfer/tfel/issues/1207
For more details, see https://github.com/thelfer/tfel/issues/1205
For more details, see https://github.com/thelfer/tfel/issues/1203
For more details, see https://github.com/thelfer/tfel/issues/1201
For more details, see https://github.com/thelfer/tfel/issues/1199
For more details, see https://github.com/thelfer/tfel/issues/1197
For more details, see https://github.com/thelfer/tfel/issues/1195
For more details, see https://github.com/thelfer/tfel/issues/1193
For more details, see https://github.com/thelfer/tfel/issues/1191
For more details, see https://github.com/thelfer/tfel/issues/1189
For more details, see https://github.com/thelfer/tfel/issues/1187
For more details, see https://github.com/thelfer/tfel/issues/1185
For more details, see https://github.com/thelfer/tfel/issues/1183
For more details, see https://github.com/thelfer/tfel/issues/1181
For more details, see https://github.com/thelfer/tfel/issues/1179
For more details, see https://github.com/thelfer/tfel/issues/1177
For more details, see https://github.com/thelfer/tfel/issues/1175
For more details, see https://github.com/thelfer/tfel/issues/1173
For more details, see https://github.com/thelfer/tfel/issues/1171
For more details, see https://github.com/thelfer/tfel/issues/1169
For more details, see https://github.com/thelfer/tfel/issues/1167
For more details, see https://github.com/thelfer/tfel/issues/1165
For more details, see https://github.com/thelfer/tfel/issues/1163
For more details, see https://github.com/thelfer/tfel/issues/1161
For more details, see https://github.com/thelfer/tfel/issues/1159
For more details, see https://github.com/thelfer/tfel/issues/1157
For more details, see https://github.com/thelfer/tfel/issues/1155
For more details, see https://github.com/thelfer/tfel/issues/1153
For more details, see https://github.com/thelfer/tfel/issues/1151
For more details, see https://github.com/thelfer/tfel/issues/1149
For more details, see https://github.com/thelfer/tfel/issues/1147
For more details, see https://github.com/thelfer/tfel/issues/1145
For more details, see https://github.com/thelfer/tfel/issues/1143
For more details, see https://github.com/thelfer/tfel/issues/1141
For more details, see https://github.com/thelfer/tfel/issues/1139
For more details, see https://github.com/thelfer/tfel/issues/1137
For more details, see https://github.com/thelfer/tfel/issues/1135
For more details, see https://github.com/thelfer/tfel/issues/1133
For more details, see https://github.com/thelfer/tfel/issues/1131
For more details, see https://github.com/thelfer/tfel/issues/1129
For more details, see https://github.com/thelfer/tfel/issues/1127
For more details, see https://github.com/thelfer/tfel/issues/1125
For more details, see https://github.com/thelfer/tfel/issues/1123
For more details, see https://github.com/thelfer/tfel/issues/1121
For more details, see https://github.com/thelfer/tfel/issues/1119
For more details, see https://github.com/thelfer/tfel/issues/1117
For more details, see https://github.com/thelfer/tfel/issues/1115
For more details, see https://github.com/thelfer/tfel/issues/1113
For more details, see https://github.com/thelfer/tfel/issues/1111
For more details, see https://github.com/thelfer/tfel/issues/1109
For more details, see https://github.com/thelfer/tfel/issues/1107
For more details, see https://github.com/thelfer/tfel/issues/1105
For more details, see https://github.com/thelfer/tfel/issues/1103
For more details, see https://github.com/thelfer/tfel/issues/1101
For more details, see https://github.com/thelfer/tfel/issues/1099
x /= 2 sets every component of arrays and views to
zeroFor more details, see https://github.com/thelfer/tfel/issues/1097
rk54 and rk4 compute the final stress with the
stiffness tensor of the middle of the time stepFor more details, see https://github.com/thelfer/tfel/issues/1095
For more details, see https://github.com/thelfer/tfel/issues/1093
The sanitizers options have been modularised to allow the continuous integration to enable sanitizers individually. For more details, see https://github.com/thelfer/tfel/issues/1089
For more details, see https://github.com/thelfer/tfel/issues/1038
--clean option to select whether or not cleaning is
doneFor more details, see https://github.com/thelfer/tfel/issues/1037
For more details, see https://github.com/thelfer/tfel/issues/1036
--cmake-prefix-pathFor more details, see https://github.com/thelfer/tfel/issues/1023
dgibi file generated by
MFront, for using the FEM program Cast3MFor more details, see https://github.com/thelfer/tfel/issues/1016
build-tests targetFor more details, see https://github.com/thelfer/tfel/issues/1014
QuantityConcept to take mutability into accountFor more details, see https://github.com/thelfer/tfel/issues/1013
TFEL with madnexFor more details, see https://github.com/thelfer/tfel/issues/1012
For more details, see https://github.com/thelfer/tfel/issues/1010
For more details, see https://github.com/thelfer/tfel/issues/1007
tfel-checkFor more details, see https://github.com/thelfer/tfel/issues/1006
For more details, see https://github.com/thelfer/tfel/issues/1004
For more details, see https://github.com/thelfer/tfel/issues/1003
QuantityConcept class to allow surrogate
classes to be treated as quantitiesFor more details, see https://github.com/thelfer/tfel/issues/1001
For more details, see https://github.com/thelfer/tfel/issues/995
StridedCoalescedView has no exposed data pointer and
strideFor more details, see https://github.com/thelfer/tfel/issues/987
TFEL_HOST_DEVICE to
LeftCauchyGreenTensorDerivativeExpr and
RightCauchyGreenTensorDerivativeExpr classesFor more details, see https://github.com/thelfer/tfel/issues/926
StressStensorConcept and
NoUnitStensorConcept concepts and siblings for orther
tensorial objectsFor more details, see https://github.com/thelfer/tfel/issues/925
For more details, see https://github.com/thelfer/tfel/issues/922
For more details, see https://github.com/thelfer/tfel/issues/890
For more details, see https://github.com/thelfer/tfel/issues/905
tfel-check
simultaenously in a CI contextFor more details, see https://github.com/thelfer/tfel/issues/853