The page describes the new functionalities of Version 5.2 of the TFEL project.

1 Known incompatibilities

2 New TFEL/Math features

2.1 Views of tensorial objects with coalescent memory access for data separated by a constant stride

In 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);

3 New features in tfel-check

3.1 Parallelization

The 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.

3.1.1 Specifying the number of jobs run simultaneously

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.

3.1.1.1 Limit on the number of jobs

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.

3.1.2 Caution

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.

3.2 New features in TFEL/System

3.2.1 Improvements in ProcessManager

3.2.2 Improvements in SignalManager

4 New TFEL/Material features

4.1 Homogenization

The 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.

5 New MFront features

5.1 Configuration file

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:

None 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_options and model_dsl_options may 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-file command line arguments introduced in Version 4.1.

5.1.1 Example of configuration file

interfaces_options: {
  generic-parallel: {
    backend: {"stlpar", execution_policy: "par_unseq"}
  }
}

5.1.2 The interfaces_options section

5.1.3 The compilation_options section

compilation_options : {
  cxx : {
    compiler: "nvc++",
    compilation_flags: "-O2 -stdpar=gpu -std=c++20 -march=native -gpu=sm_89" 
  }
}

5.1.3.1 The compiler option

5.1.3.2 The compilation_flags option

5.1.4 The linking_options section

5.1.4.1 The linker_flags option

5.2 Passing options to interfaces on the command line

5.2.1 First syntax

~~{bash} $ mfront –obuild –interface=‘generic-parallel{backend:{“stlpar”: {execution_policy:“par_unseq”}}}’ UO2_ShearModulus.mfront~~

5.2.2 Second syntax

~~{bash} $ mfront –obuild –interface=‘{generic-parallel:{backend:“stlpar”{execution_policy:“par_unseq”}}}’ UO2_ShearModulus.mfront~~

5.3 The generic-parallel interface for material properties

See this page for details.

5.3.1 Available backends

5.3.1.1 STLPar

5.3.1.2 CUDA

6 Acknowledgements

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).

7 Issues fixed

7.1 Issue 926: [tfel-math] Add TFEL_HOST_DEVICE to LeftCauchyGreenTensorDerivativeExpr and RightCauchyGreenTensorDerivativeExpr classes

For more details, see https://github.com/thelfer/tfel/issues/926

7.2 Issue 925: [tfel-math] Introduce the StressStensorConcept and NoUnitStensorConcept concepts and siblings for orther tensorial objects

For more details, see https://github.com/thelfer/tfel/issues/925

7.3 Issue 922: [tfel-math] two functions have no GPU device support

For more details, see https://github.com/thelfer/tfel/issues/922

7.4 Issue 890: mfront Add Ponte Castaneda 1992 non linear scheme

For more details, see https://github.com/thelfer/tfel/issues/890

7.5 Issue 905: [TFEL/Math] Pointer-heavy CoalescedView

For more details, see https://github.com/thelfer/tfel/issues/905

7.6 Issue 853: [tfel-fcheck] Have the possibility to launch multiple call to tfel-check simultaenously in a CI context

For more details, see https://github.com/thelfer/tfel/issues/853