Skip to content

Commit c2c8d69

Browse files
author
code-mphi
committed
Version 5.0
# Major points - Possibility to use second-order numerical scheme on unstructured meshes. Although still in beta. - Acoustic waves can now be modelled through source terms (sinusoidal or Gaussian pulses). This follows the work of _Maeda & Colonius_ [https://doi.org/10.1016/j.wavemoti.2017.08.004](https://doi.org/10.1016/j.wavemoti.2017.08.004) for single-phase flows and has been extended here for multiphase systems of equations. - For developers: Improvement of the CI now including code coverage, clang-formatting, better artefact management, use of address sanitizer and pre-commit. - Clang-format applied to the whole code. # Minor points - Gnuplot scripts added for pdf generation of results with GNU output format - Add velocity in x-direction to the 1D output using Gnuplot. - Correction of translation: restart -> resume. - The CFL length estimation has been improved for quadrangle elements. - Possibility to add record frequency for cuts. - Correction of memory errors (deallocations). - Possibility to compile the code using `cmake` instead of `makefile` (for advanced users). - Update of documentation and test cases, as usual. - Use `VTK` key instead of `XML` one for `outputMode` tag of `main.xml` file. - Modify the deepness of all 1D and 2D test cases to unity. This was made to avoid possible issues during the visualisation of the results with tools such as Paraview. # Fixes - Update names of manuals to be coherent with input files from the test cases. - Update Cv from air EOS. - Fix bug and variables names update on `ModUEq::solveRIemannInletInjTemp`. - Fix EOS assignment in boundary conditions and add that the EOS key must be present in `dataFluid` tag of boundary conditions (must be consistent with model EOS). - Fix `Euler` test cases missing EOS key in `dataFluid` tag of boundary conditions. - Fix memory errors during termination of the execution when EOS is missing. - Fix unstructured-mesh file parsing using msh v4 format (working now, although only for serial simulations). - Fix wrong elapsed time from simulations (was using CPU time, now uses wall time).
1 parent dab2c84 commit c2c8d69

1,258 files changed

Lines changed: 37942 additions & 28156 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Language: Cpp
2+
BasedOnStyle: LLVM
3+
4+
# To find default options: clang-format --dump-config -style llvm
5+
6+
BreakBeforeBraces: Custom #Stroustrup
7+
8+
ColumnLimit: 150
9+
10+
AccessModifierOffset: 2 # Access modifiers (public, protected and private keywords) indentation
11+
IndentAccessModifiers: true # Give the access modifiers their own level of indentation
12+
13+
AlignConsecutiveAssignments:
14+
Enabled: true
15+
AcrossEmptyLines: false
16+
AcrossComments: false
17+
AlignCompound: true
18+
AlignFunctionPointers: false
19+
PadOperators: true
20+
21+
AlignEscapedNewlines: LeftWithLastLine
22+
AlignOperands: AlignAfterOperator
23+
24+
AlignTrailingComments:
25+
# Kind: Leave # Bug: https://github.com/llvm/llvm-project/issues/75035
26+
Kind: Always
27+
OverEmptyLines: 0
28+
29+
AllowAllArgumentsOnNextLine: true
30+
AllowAllParametersOfDeclarationOnNextLine: true
31+
32+
33+
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
34+
AllowShortBlocksOnASingleLine: false
35+
AllowShortLoopsOnASingleLine: true
36+
AllowShortFunctionsOnASingleLine: true
37+
38+
BinPackArguments: false # If all args of a function doesn't fit on one line, put one arg per line
39+
BinPackParameters: false # If all params doesn't fit on one line, put one per line
40+
41+
42+
BraceWrapping:
43+
AfterClass: true
44+
AfterEnum: true
45+
AfterNamespace: true
46+
AfterStruct: true
47+
AfterUnion: true
48+
AfterFunction: true
49+
AfterExternBlock: true
50+
BeforeElse: true
51+
BeforeCatch: true
52+
SplitEmptyFunction: false
53+
SplitEmptyNamespace: false
54+
55+
BreakConstructorInitializers: AfterColon
56+
BreakInheritanceList: AfterComma
57+
58+
ConstructorInitializerIndentWidth: 2
59+
ContinuationIndentWidth: 2
60+
61+
Cpp11BracedListStyle: true
62+
63+
IndentPPDirectives: BeforeHash
64+
PackConstructorInitializers: NextLine
65+
66+
PenaltyBreakAssignment: 100 # Default 2
67+
PenaltyBreakBeforeFirstCallParameter: 100 # Default 19
68+
PenaltyBreakComment: 10000 # Default 300
69+
# PenaltyBreakFirstLessLess: 120 # Default 120
70+
# PenaltyBreakOpenParenthesis: 0 # Default 0
71+
# PenaltyBreakScopeResolution: 500 # default 500
72+
# PenaltyBreakString: 1000 # default 1000
73+
# PenaltyBreakTemplateDeclaration: 10 # default 10
74+
PenaltyExcessCharacter: 49 # default 1000000
75+
# PenaltyIndentedWhitespace: 0 # default 0
76+
# PenaltyReturnTypeOnItsOwnLine: 60 # default 10
77+
78+
# Remark: penalty to break before +, -, *, ... operators seems to be 50 (heuristic eval)
79+
# 1 -> 50
80+
# 2 -> 17
81+
# 3 -> 9
82+
# 4 -> 6
83+
# 5 -> 5
84+
# PenaltyBreakAssignment: if <14, break on '=', if >=14, break on '*'
85+
86+
PointerAlignment: Left
87+
88+
ReflowComments: false
89+
90+
SpacesInLineCommentPrefix:
91+
Minimum: 0
92+
93+
SortIncludes: false

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
# System
55
*.DS_Store
66

7-
# Compilation
8-
ECOGEN
7+
# Compilation
8+
/ECOGEN
99
*.o
10+
*.gcda
11+
*.gcno
1012

1113
# Non-reg & code analysis
1214
/results/
@@ -23,6 +25,8 @@ venv
2325
*.txt
2426
*.out
2527
*.bak
28+
# Explicitly track CMakeLists.txt
29+
!CMakeLists.txt
2630

2731
# Others
2832
*.opensdf

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
args: [--markdown-linebreak-ext=md]
7+
8+
- id: end-of-file-fixer
9+
- id: check-added-large-files
10+
11+
# Check code style (indentations, line breaks, etc..)
12+
- repo: https://github.com/pre-commit/mirrors-clang-format
13+
rev: v19.1.7
14+
hooks:
15+
- id: clang-format
16+
args: ["-style=file"]
17+
files: src/.*
18+
exclude: src/libTierces/.*
19+
stages: [pre-commit]
20+
21+
# propose commit message title style ('<branch_name>: ...')
22+
- repo: local
23+
hooks:
24+
- id: prepare-commit-msg
25+
name: prepare-commit-msg
26+
entry: ./scripts/preCommitHooks/prepare-commit-msg.sh
27+
language: script
28+
stages: [prepare-commit-msg]
29+
30+
# check commit message title style ('<branch_name>: ...')
31+
- repo: local
32+
hooks:
33+
- id: commit-msg
34+
name: check-commit-msg
35+
entry: ./scripts/preCommitHooks/commit-msg.sh
36+
language: script
37+
stages: [commit-msg]

AUTHORS

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ECOGEN is under GPLv3 or later license. Here is the name and contact information
33
F. Petitpas
44
-----------
55
Associate professor at Aix-Marseille Universite, France. Teaching at the Polytech Marseille engineering school.
6-
e-mail adress: fabien.petitpas@univ-amu.fr
6+
e-mail address: fabien.petitpas@univ-amu.fr
77

88
S. LeMartelot
99
-------------
@@ -12,13 +12,13 @@ Expert enginneer turbopumps at CNES, France.
1212
K. Schmidmayer
1313
--------------
1414
Permanent researcher at Inria Center of the University of Bordeaux, France. Teaching at Université de Pau et des Pays de l'Adour.
15-
e-mail adress: kevin.schmidmayer@inria.fr
15+
e-mail address: kevin.schmidmayer@inria.fr
1616
Personal web page: https://kevinschmidmayer.github.io/
1717

1818
E. Daniel
1919
---------
2020
Professor at Aix-Marseille Universite, France. Teaching at the Polytech Marseille engineering school.
21-
e-mail adress: eric.daniel@univ-amu.fr
21+
e-mail address: eric.daniel@univ-amu.fr
2222

2323
B. Dorschner
2424
------------
@@ -34,7 +34,22 @@ F. Gadiri
3434
---------
3535
Was a Master student at Aix Marseille Universite, France.
3636

37+
N. Favrie
38+
---------
39+
Associate professor at Aix-Marseille Universite, France. Teaching at the Polytech Marseille engineering school.
40+
e-mail address: nicolas.favrie@univ-amu.fr
41+
3742
S. Schropff
3843
-----------
3944
PhD student at Aix Marseille Universite, France.
40-
e-mail adress: solene.schropff@univ-amu.fr
45+
e-mail address: solene.schropff@univ-amu.fr
46+
47+
A. Ade-Onojobi
48+
--------------
49+
PhD student at Inria Center of the University of Bordeaux, France. He is attached to the Université de Pau et des Pays de l'Adour.
50+
e-mail address: adedotun.ade-onojobi@inria.fr
51+
52+
A. Froehly
53+
----------
54+
Engineer at Inria Center of the University of Bordeaux, France.
55+
e-mail address: algiane.froehly@inria.fr

CMakeLists.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
set (CMAKE_RELEASE_VERSION_MAJOR "5" )
4+
set (CMAKE_RELEASE_VERSION_MINOR "0" )
5+
set (CMAKE_RELEASE_VERSION_PATCH "0" )
6+
set (CMAKE_RELEASE_DATE "2025-09-30" )
7+
8+
# Set the project name and version
9+
project (ECOGEN
10+
LANGUAGES CXX
11+
VERSION "${CMAKE_RELEASE_VERSION_MAJOR}.${CMAKE_RELEASE_VERSION_MINOR}.${CMAKE_RELEASE_VERSION_PATCH}")
12+
13+
14+
# Specify the C++ standard
15+
set(CMAKE_CXX_STANDARD 11)
16+
set(CMAKE_CXX_STANDARD_REQUIRED True)
17+
18+
# Add custom compilation type
19+
set(CMAKE_CXX_FLAGS_COVERAGE "-O3 -fprofile-arcs -ftest-coverage" CACHE STRING
20+
"Flags used by the CXX compiler during Coverage builds."
21+
FORCE)
22+
set(CMAKE_C_FLAGS_COVERAGE "-O3 -fprofile-arcs -ftest-coverage" CACHE STRING
23+
"Flags used by the C compi ler during Coverage builds."
24+
FORCE)
25+
26+
set(CMAKE_CXX_FLAGS_PROFILE "-O3 -pg" CACHE STRING
27+
"Flags used by the CXX compiler during Profile builds."
28+
FORCE)
29+
set(CMAKE_C_FLAGS_PROFILE "-O3 -pg" CACHE STRING
30+
"Flags used by the C compi ler during Profile builds."
31+
FORCE)
32+
33+
# List source files
34+
set(ECOGEN_source_dir ${PROJECT_SOURCE_DIR}/src)
35+
FILE(
36+
GLOB_RECURSE
37+
ECOGEN_source_files
38+
${ECOGEN_source_dir}/*.cpp
39+
)
40+
41+
# Search for MPI distrib
42+
FIND_PACKAGE( MPI REQUIRED )
43+
44+
# Add the executable
45+
add_executable(ECOGEN ${ECOGEN_source_files})
46+
target_link_libraries(ECOGEN MPI::MPI_CXX)

COPYRIGHT

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ Copyright © 2018 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel
66
Copyright © 2019 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Benedikt Dorschner
77
Copyright © 2020 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Benedikt Dorschner, Joris Caze
88
Copyright © 2021 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze, Fatima Gadiri
9-
Copyright © 2022 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze
10-
Copyright © 2023 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze, Solene Schropff
9+
Copyright © 2022 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze, Nicolas Favrie
10+
Copyright © 2023 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze, Solene Schropff, Adedotun Ade-Onojobi
11+
Copyright © 2025 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Adedotun Ade-Onojobi, Algiane Froehly

ECOGEN.xml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
<!-- <testCase>libTests/referenceTestCases/euler/1D/shockTubes/HPLeft/</testCase> -->
1414
<!-- <testCase>libTests/referenceTestCases/euler/1D/shockTubes/HPRight/</testCase> -->
1515
<!-- <testCase>libTests/referenceTestCases/euler/1D/shockTubes/spherical/</testCase> -->
16+
<!-- <testCase>libTests/referenceTestCases/euler/1D/pressurePulse/</testCase> -->
1617
<!-- <testCase>libTests/referenceTestCases/euler/2D/transports/rectangleDiagonal/</testCase> -->
1718
<!-- <testCase>libTests/referenceTestCases/euler/2D/transports/rectangleDiagonalUnstruct/</testCase> -->
1819
<!-- <testCase>libTests/referenceTestCases/euler/2D/transports/transport1dCartesian/</testCase> -->
1920
<!-- <testCase>libTests/referenceTestCases/euler/2D/HPCenter/</testCase> -->
21+
<!-- <testCase>libTests/referenceTestCases/euler/2D/GreshoVortex/</testCase> -->
2022
<!-- <testCase>libTests/referenceTestCases/euler/2D/HPUnstructured/</testCase> -->
2123
<!-- <testCase>libTests/referenceTestCases/euler/2D/HPUnstructuredMeshMappingRestart/</testCase> -->
2224
<!-- <testCase>libTests/referenceTestCases/euler/2D/nozzles/tankWithShock/</testCase> -->
@@ -34,6 +36,8 @@
3436
<!-- <testCase>libTests/referenceTestCases/euler/2D/foil/</testCase> -->
3537
<!-- <testCase>libTests/referenceTestCases/euler/2D/immersedBoundaries/</testCase> -->
3638
<!-- <testCase>libTests/referenceTestCases/euler/2D/venturi/</testCase> -->
39+
<!-- <testCase>libTests/referenceTestCases/euler/2D/acousticWave/planeGaussianPulse/</testCase> -->
40+
<!-- <testCase>libTests/referenceTestCases/euler/2D/acousticWave/planeSinusoidalPulse/</testCase> -->
3741
<!-- <testCase>libTests/referenceTestCases/euler/3D/LPCenter/</testCase> -->
3842
<!-- <testCase>libTests/referenceTestCases/euler/3D/shockTubeCylinder/</testCase> -->
3943

@@ -47,6 +51,10 @@
4751
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/heating/heatedVapourAir/</testCase> -->
4852
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/sphericalCollapse/Pratio1427/</testCase> -->
4953
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/sphericalCollapse/Pratio353/</testCase> -->
54+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/evapExpansionTubeEquilibrium/</testCase> -->
55+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/condensation/</testCase> -->
56+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/evaporation/</testCase> -->
57+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/shockTubes/diffusedInterfaceWaterAir/</testCase> -->
5058
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/transportWaterSquareInAir/</testCase> -->
5159
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/shockTubeUnstruct/</testCase> -->
5260
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/shockTubeUnstructRotated/</testCase> -->
@@ -57,27 +65,28 @@
5765
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/RayleighTaylor/sameKinematicViscosity/</testCase> -->
5866
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/sphericalCollapse/Pratio1427/</testCase> -->
5967
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/sphericalCollapse/Pratio353/</testCase> -->
68+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/sphericalCollapseInCone/</testCase> -->
6069
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/underwaterExplosion/</testCase> -->
6170
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/discLimitSinglePhase/</testCase> -->
6271
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/nozzles/tank/</testCase> -->
6372
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/nozzles/injection/</testCase> --> <!-- Something is wrong with the results of this test case (certainly coming from injection boundary condition), maybe something missing in initialConditions.xml -->
6473
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/nozzles/lowMachSmoothCrossSection/</testCase> -->
6574
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/nozzles/outletPressurePathological/</testCase> -->
75+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/injection/</testCase> -->
6676
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/testUnstructured/</testCase> -->
6777
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/shockTubeFreeSurface/</testCase> --> <!-- Works but initial conditions (mesh) might not be the best ones -->
6878
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/foil/noCavitation/</testCase> -->
6979
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/foil/cavitation/</testCase> -->
7080
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/venturi/</testCase> -->
71-
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/phaseChange/evapExpansionTubeEquilibrium/</testCase> -->
72-
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/phaseChange/condensation/</testCase> -->
73-
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/phaseChange/evaporation/</testCase> -->
81+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/acousticWave/planeSinusoidalPulse/</testCase> -->
82+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/bubbleTandemNearTissue/</testCase> -->
7483
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/squareToCircle/</testCase> -->
7584
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/squareToCircleSymmetry/</testCase> -->
7685
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterCylinderInAir/</testCase> -->
7786
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterDropletInAir/</testCase> -->
7887
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterDropletInAir_axisym/</testCase> -->
7988
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact/</testCase> -->
80-
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact_restart/</testCase> -->
89+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact_resume/</testCase> -->
8190
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/gravity/</testCase> -->
8291
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/heatConduction/simple/</testCase> -->
8392
<!-- <testCase>libTests/referenceTestCases/PUEq/3D/shockBubble/heliumAir/</testCase> -->
@@ -116,7 +125,11 @@
116125
<!-- <testCase>libTests/referenceTestCases/UEq/2D/squareToCircleSymmetry/</testCase> -->
117126
<!-- <testCase>libTests/referenceTestCases/UEq/2D/dropletShockInducedCavitation/Mach2_4/</testCase> -->
118127
<!-- <testCase>libTests/referenceTestCases/UEq/2D/dropletShockInducedCavitation/Mach2_4_pureWater/</testCase> -->
119-
128+
<!-- <testCase>libTests/referenceTestCases/UEq/2D/acousticWave/planeSinusoidalPulse/</testCase> -->
129+
<!-- <testCase>libTests/referenceTestCases/UEq/2D/bubbleTandemNearTissue/</testCase> -->
130+
<!-- <testCase>libTests/referenceTestCases/UEq/2D/underwaterExplosion/</testCase> -->
131+
<!-- <testCase>libTests/referenceTestCases/UEq/3D/shockBubble/heliumAir/</testCase> -->
132+
120133
<!-- Velocity-equilibrium-model with total energy reference test cases -->
121134
<!-- ----------------------------------------------------------------- -->
122135
<!-- <testCase>libTests/referenceTestCases/UEqTotEnergy/1D/transports/interfaceWaterAir/</testCase> -->

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ECOGEN is distributed under the GNU public license, found below. Please see
2-
the bottom of this document for any other licenses applicable to code used
1+
ECOGEN is distributed under the GNU public license, found below. Please see
2+
the bottom of this document for any other licenses applicable to code used
33
within ECOGEN.
44
----------------------------------------------------------------------------
55

@@ -678,4 +678,4 @@ the library. If this is what you want to do, use the GNU Lesser General
678678
Public License instead of this License. But first, please read
679679
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
680680

681-
----------------------------------------------------------------------------
681+
----------------------------------------------------------------------------

0 commit comments

Comments
 (0)