# thelfer/tfel architecture

> Architecture diagram of the GitHub repository thelfer/tfel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thelfer/tfel
- Repository: https://github.com/thelfer/tfel

## Overview

TFEL/MFront is a material-modeling toolkit: MFront translates domain-specific descriptions of material properties, mechanical behaviours, and point-wise models into C++, while MTest exercises material behaviour locally. The graph preserves these documented product branches and the solver-interface capability. Sampled generic interface headers show the data contracts for behaviour integration and material-property evaluation; the broader generator and test internals were not sampled, so those connections follow README statements rather than inspected implementation calls.

Main entry points: [`mfront`](https://github.com/thelfer/tfel/tree/master/mfront) (MFront generator), [`mtest`](https://github.com/thelfer/tfel/tree/master/mtest) (MTest), [`mfront/include/MFront/GenericBehaviour/BehaviourData.h`](https://github.com/thelfer/tfel/blob/master/mfront/include/MFront/GenericBehaviour/BehaviourData.h) (Generic behaviour ABI), [`mfront/include/MFront/GenericMaterialProperty/MaterialProperty.h`](https://github.com/thelfer/tfel/blob/master/mfront/include/MFront/GenericMaterialProperty/MaterialProperty.h) (Generic property ABI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Model authoring"]
  node_mfront["MFront generator"]
  node_material_properties["Material properties"]
  node_mechanical_behaviours["Mechanical behaviours"]
  node_pointwise_models["Point-wise models"]
end

subgraph group_runtime["Generated model interfaces"]
  node_generated_cpp["Generated C++"]
  node_generic_behaviour["Generic behaviour ABI<br/>[BehaviourData.h]"]
  node_generic_property["Generic property ABI<br/>[MaterialProperty.h]"]
  node_solver_interfaces["Solver interfaces"]
end

subgraph group_testing["Local testing"]
  node_mtest["MTest"]
end

subgraph group_foundation["TFEL foundation"]
  node_tfel_library["TFEL library"]
  node_process_manager["Process status helpers<br/>[ProcessManager-c.c]"]
  node_function_lookup["Dynamic function lookup<br/>[getFunction.c]"]
end

node_engineer(("Model developer"))
node_solver["FE and FFT solvers"]

node_engineer -->|"authors models"| node_mfront
node_mfront -->|"generates C++"| node_generated_cpp
node_mfront -->|"defines DSLs for"| node_material_properties
node_mfront -->|"defines DSLs for"| node_mechanical_behaviours
node_mfront -->|"defines DSLs for"| node_pointwise_models
node_generated_cpp -.->|"exposes behaviour data"| node_generic_behaviour
node_generated_cpp -.->|"exposes property interface"| node_generic_property
node_mechanical_behaviours -->|"offers interfaces"| node_solver_interfaces
node_solver_interfaces -->|"integrates with"| node_solver
node_engineer -->|"tests locally"| node_mtest
node_mtest -->|"tests behaviour"| node_generated_cpp

click node_mfront "https://github.com/thelfer/tfel/tree/master/mfront"
click node_material_properties "https://github.com/thelfer/tfel/tree/master/mfront"
click node_mechanical_behaviours "https://github.com/thelfer/tfel/tree/master/mfront"
click node_pointwise_models "https://github.com/thelfer/tfel/tree/master/mfront"
click node_generated_cpp "https://github.com/thelfer/tfel/tree/master/mfront"
click node_generic_behaviour "https://github.com/thelfer/tfel/blob/master/mfront/include/MFront/GenericBehaviour/BehaviourData.h"
click node_generic_property "https://github.com/thelfer/tfel/blob/master/mfront/include/MFront/GenericMaterialProperty/MaterialProperty.h"
click node_solver_interfaces "https://github.com/thelfer/tfel/tree/master/mfront"
click node_mtest "https://github.com/thelfer/tfel/tree/master/mtest"
click node_tfel_library "https://github.com/thelfer/tfel/tree/master/src"
click node_process_manager "https://github.com/thelfer/tfel/blob/master/src/System/ProcessManager-c.c"
click node_function_lookup "https://github.com/thelfer/tfel/blob/master/src/System/getFunction.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mfront,node_material_properties,node_mechanical_behaviours,node_pointwise_models toneBlue
class node_generated_cpp,node_generic_behaviour,node_generic_property,node_solver_interfaces toneAmber
class node_mtest toneMint
class node_tfel_library,node_process_manager,node_function_lookup toneRose
class node_engineer,node_solver toneIndigo
```

## Components

### Model authoring

- [MFront generator](https://github.com/thelfer/tfel/tree/master/mfront): `mfront`
- [Material properties](https://github.com/thelfer/tfel/tree/master/mfront): `mfront`
- [Mechanical behaviours](https://github.com/thelfer/tfel/tree/master/mfront): `mfront`
- [Point-wise models](https://github.com/thelfer/tfel/tree/master/mfront): `mfront`

### Generated model interfaces

- [Generated C++](https://github.com/thelfer/tfel/tree/master/mfront): `mfront`
- [Generic behaviour ABI](https://github.com/thelfer/tfel/blob/master/mfront/include/MFront/GenericBehaviour/BehaviourData.h): `mfront/include/MFront/GenericBehaviour/BehaviourData.h`
- [Generic property ABI](https://github.com/thelfer/tfel/blob/master/mfront/include/MFront/GenericMaterialProperty/MaterialProperty.h): `mfront/include/MFront/GenericMaterialProperty/MaterialProperty.h`
- [Solver interfaces](https://github.com/thelfer/tfel/tree/master/mfront): `mfront`

### Local testing

- [MTest](https://github.com/thelfer/tfel/tree/master/mtest): `mtest`

### TFEL foundation

- [TFEL library](https://github.com/thelfer/tfel/tree/master/src): `src`
- [Process status helpers](https://github.com/thelfer/tfel/blob/master/src/System/ProcessManager-c.c): `src/System/ProcessManager-c.c`
- [Dynamic function lookup](https://github.com/thelfer/tfel/blob/master/src/System/getFunction.c): `src/System/getFunction.c`

### Other components

- **Model developer**
- **FE and FFT solvers**

## Connections

- Model developer → MFront generator: authors models (evidence: `README.md`)
- MFront generator → Generated C++: generates C++ (evidence: `README.md`)
- MFront generator → Material properties: defines DSLs for (evidence: `README.md`)
- MFront generator → Mechanical behaviours: defines DSLs for (evidence: `README.md`)
- MFront generator → Point-wise models: defines DSLs for (evidence: `README.md`)
- Generated C++ → Generic behaviour ABI: exposes behaviour data (evidence: `mfront/include/MFront/GenericBehaviour/BehaviourData.h`)
- Generated C++ → Generic property ABI: exposes property interface (evidence: `mfront/include/MFront/GenericMaterialProperty/MaterialProperty.h`)
- Mechanical behaviours → Solver interfaces: offers interfaces (evidence: `README.md`)
- Solver interfaces → FE and FFT solvers: integrates with (evidence: `README.md`)
- Model developer → MTest: tests locally (evidence: `README.md`)
- MTest → Generated C++: tests behaviour (evidence: `README.md`)
