Skip to content

Commit 1197856

Browse files
author
fabien
committed
Version 3.1
Major points: * Add velocity-equilibrium model. Read the following paper for more information: K. Schmidmayer, J. Cazé, F. Petitpas, E. Daniel, N. Favrie. "Modelling interactions between waves and diffused interfaces". 2021. * Add velocity-equilibrium model based on total-energy equations. Read the previous paper for more information. * Possibility to use another gradient method (Green-Gauss) which is compatible with unstructured meshes. Previously, finite differences were the only available. * Possibility to use low-Mach preconditioning technique for Euler & pressure-velocity-equilibrium models. * Option to use 1D with smooth cross-section-variation scheme (useful for nozzles). * Add models augmented Euler-Korteweg and defocusing non-linear Schrödinger as well as Van der Waals equation of state. Mainly experimental work. Minor points: * Possibility to reduce output variable number for UEq and PUEq models. * Restarting computation possible for all models for XML format output. * Possibility to record flux on boundary (massflow, total enthalpy) and/or flow quantities (density, pressure, velocity) in agreement with Moving Reference Frame method. * Possibility to set precision for specific outputs (probes, cuts, global quantities, boundary flux/quantities). * Possibility to run test cases from a different folder. * Minor modification of axi-symmetric computations for second-order simulations. * Better handling of pressure relaxations when Newton-Raphson method does not converge. * Update of documentation regarding test cases. Fixes: * Fix recording of probes with computational restart. * Fix bug on unstructured meshes using hexaedron and prisms. * Correction on NASG EOS to allow null volume fractions. * Fix bug GNU dataset output precision. * Fix bug AMR parallel when large domains were used * Fix bug AMR parallel on printing of load.
1 parent 61007b9 commit 1197856

File tree

741 files changed

+22473
-9077
lines changed

Some content is hidden

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

741 files changed

+22473
-9077
lines changed

Diff for: AUTHORS

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Expert enginneer turbopumps at CNES, France.
1313

1414
K. Schmidmayer
1515
--------------
16-
Postdoctoral scholar at Aix-Marseille Universite, France.
16+
Permanent researcher at Inria Sud Ouest, France.
1717
e-mail adress: [email protected]
1818
Personal web page: https://kevinschmidmayer.github.io/
1919

@@ -24,7 +24,8 @@ e-mail adress: [email protected]
2424

2525
B. Dorschner
2626
------------
27-
Postdoctoral scholar at ETH Zurich, Switzerland.
27+
Senior scientist at Swiss Federal Institute of Technology (ETH Zurich), Switzerland.
28+
Personal web page: https://benedikt-dorschner.com/
2829

2930
J. Caze
3031
-------

Diff for: COPYRIGHT

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Copyright © 2016-2017 Fabien Petitpas, Kevin Schmidmayer
55
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
8-
Copyright © 2021 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze
8+
Copyright © 2021-2022 Fabien Petitpas, Kevin Schmidmayer, Eric Daniel, Joris Caze

Diff for: ECOGEN

2.29 MB
Binary file not shown.

Diff for: ECOGEN.xml

+88-53
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,111 @@
33

44
<!-- Logo ECOGEN -->
55
<!-- ----------- -->
6-
<!-- <testCase>./libTests/logoECOGEN/ECOGEN/</testCase> -->
7-
<!-- <testCase>./libTests/logoECOGEN/ECOGENFluide/</testCase> -->
6+
<!-- <testCase>libTests/logoECOGEN/ECOGEN/</testCase> -->
7+
<!-- <testCase>libTests/logoECOGEN/ECOGENFluide/</testCase> -->
88

99
<!-- Euler reference test cases -->
1010
<!-- -------------------------- -->
11-
<!-- <testCase>./libTests/referenceTestCases/euler/1D/transport/positiveVelocity/</testCase> -->
12-
<!-- <testCase>./libTests/referenceTestCases/euler/1D/transport/negativeVelocity/</testCase> -->
13-
<!-- <testCase>./libTests/referenceTestCases/euler/1D/shockTubes/HPLeft/</testCase> -->
14-
<!-- <testCase>./libTests/referenceTestCases/euler/1D/shockTubes/HPRight/</testCase> -->
15-
<!-- <testCase>./libTests/referenceTestCases/euler/1D/shockTubes/spherical/</testCase> -->
16-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/transports/rectangleDiagonal/</testCase> -->
17-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/HPCenter/</testCase> -->
18-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/HPUnstructured/</testCase> -->
19-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/nozzles/tankWithShock/</testCase> -->
20-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/nozzles/supersonicInjection/</testCase> --> <!-- Something is wrong with the results of this test case (certainly coming from injection boundary condition), maybe something missing in initialConditionsV4.xml -->
21-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/nozzles/subsonicInjection/</testCase> -->
22-
<!-- <testCase>./libTests/referenceTestCases/euler/2D/shockTubes/cylindrical/</testCase> -->
23-
<!-- <testCase>./libTests/referenceTestCases/euler/3D/LPCenter/</testCase> -->
11+
<!-- <testCase>libTests/referenceTestCases/euler/1D/transport/positiveVelocity/</testCase> -->
12+
<!-- <testCase>libTests/referenceTestCases/euler/1D/transport/negativeVelocity/</testCase> -->
13+
<!-- <testCase>libTests/referenceTestCases/euler/1D/shockTubes/HPLeft/</testCase> -->
14+
<!-- <testCase>libTests/referenceTestCases/euler/1D/shockTubes/HPRight/</testCase> -->
15+
<!-- <testCase>libTests/referenceTestCases/euler/1D/shockTubes/spherical/</testCase> -->
16+
<!-- <testCase>libTests/referenceTestCases/euler/2D/transports/rectangleDiagonal/</testCase> -->
17+
<!-- <testCase>libTests/referenceTestCases/euler/2D/HPCenter/</testCase> -->
18+
<!-- <testCase>libTests/referenceTestCases/euler/2D/HPUnstructured/</testCase> -->
19+
<!-- <testCase>libTests/referenceTestCases/euler/2D/nozzles/tankWithShock/</testCase> -->
20+
<!-- <testCase>libTests/referenceTestCases/euler/2D/nozzles/supersonicInjection/</testCase> --> <!-- Something is wrong with the results of this test case (certainly coming from injection boundary condition), maybe something missing in initialConditionsV4.xml -->
21+
<!-- <testCase>libTests/referenceTestCases/euler/2D/nozzles/subsonicInjection/</testCase> -->
22+
<!-- <testCase>libTests/referenceTestCases/euler/2D/nozzles/lowMachSmoothCrossSection/</testCase> -->
23+
<!-- <testCase>libTests/referenceTestCases/euler/2D/shockTubes/cylindrical/</testCase> -->
24+
<!-- <testCase>libTests/referenceTestCases/euler/2D/Blasius/BlasiusLaminar/</testCase> -->
25+
<!-- <testCase>libTests/referenceTestCases/euler/2D/Blasius/BlasiusTurbulent/</testCase> -->
26+
<!-- <testCase>libTests/referenceTestCases/euler/2D/Blasius/BlasiusLEIS/</testCase> -->
27+
<!-- <testCase>libTests/referenceTestCases/euler/2D/RayleighTaylor/</testCase> -->
28+
<!-- <testCase>libTests/referenceTestCases/euler/3D/LPCenter/</testCase> -->
2429

2530
<!-- Pressure- and velocity-equilibrium-model reference test cases -->
2631
<!-- ------------------------------------------------------------- -->
27-
<!-- <testCase>./libTests/referenceTestCases/PUEq/1D/transports/interfaceWaterAir/</testCase> -->
28-
<!-- <testCase>./libTests/referenceTestCases/PUEq/1D/shockTubes/interfaceWaterAir/</testCase> -->
29-
<!-- <testCase>./libTests/referenceTestCases/PUEq/1D/shockTubes/interfaceWaterAirNASG/</testCase> -->
30-
<!-- <testCase>./libTests/referenceTestCases/PUEq/1D/shockTubes/epoxySpinel/</testCase> -->
31-
<!-- <testCase>./libTests/referenceTestCases/PUEq/1D/cavitation/</testCase> -->
32-
<!-- <testCase>./libTests/referenceTestCases/PUEq/1D/sphericalCollapse/Pratio1427/</testCase> -->
33-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/transportWaterSquareInAir/</testCase> -->
34-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/squareWaterExplosion/</testCase> -->
35-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/shockBubble/heliumAir/</testCase> -->
36-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/richtmyerMeshkov/</testCase> -->
37-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/sphericalCollapse/Pratio1427/</testCase> -->
38-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/nozzles/tank/</testCase> -->
39-
<!-- <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 initialConditionsV4.xml -->
40-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/testUnstructured/</testCase> -->
41-
<!-- <testCase>./libTests/referenceTestCases/PUEq/2D/shockTubeFreeSurface/</testCase> --> <!-- Works but initial conditions (mesh) might not be the best ones -->
42-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/evap/evapShockTube/</testCase> -->
43-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/squareToCircle/</testCase> -->
44-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/squareToCircleSymmetry/</testCase> -->
45-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterCylinderInAir/</testCase> -->
46-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterDropletInAir/</testCase> -->
47-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterDropletInAir_axisym/</testCase> -->
48-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact/</testCase> -->
49-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact_restart/</testCase> -->
50-
<!-- <testCase>./libTests/referenceTestCases/PUEq/AddPhysicalEffects/gravity/</testCase> -->
51-
<!-- <testCase>./libTests/referenceTestCases/PUEq/3D/shockBubble/heliumAir/</testCase> -->
52-
<!-- <testCase>./libTests/referenceTestCases/PUEq/3D/sphericalCollapse/Pratio1427/</testCase> -->
53-
<!-- <testCase>./libTests/referenceTestCases/PUEq/3D/unstructured/</testCase> --> <!-- Not working, once corrected, to add to nonreg -->
32+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/transports/interfaceWaterAir/</testCase> -->
33+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/shockTubes/interfaceWaterAir/</testCase> -->
34+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/shockTubes/interfaceWaterAirNASG/</testCase> -->
35+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/shockTubes/epoxySpinel/</testCase> -->
36+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/cavitation/</testCase> -->
37+
<!-- <testCase>libTests/referenceTestCases/PUEq/1D/sphericalCollapse/Pratio1427/</testCase> -->
38+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/transportWaterSquareInAir/</testCase> -->
39+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/squareWaterExplosion/</testCase> -->
40+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/shockBubble/heliumAir/</testCase> -->
41+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/RichtmyerMeshkov/</testCase> -->
42+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/RayleighTaylor/sameDynamicViscosity/</testCase> -->
43+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/RayleighTaylor/sameKinematicViscosity/</testCase> -->
44+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/sphericalCollapse/Pratio1427/</testCase> -->
45+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/nozzles/tank/</testCase> -->
46+
<!-- <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 initialConditionsV4.xml -->
47+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/nozzles/lowMachSmoothCrossSection/</testCase> -->
48+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/testUnstructured/</testCase> -->
49+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/shockTubeFreeSurface/</testCase> --> <!-- Works but initial conditions (mesh) might not be the best ones -->
50+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/foil/noCavitation/</testCase> -->
51+
<!-- <testCase>libTests/referenceTestCases/PUEq/2D/foil/cavitation/</testCase> -->
52+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/evap/evapShockTube/</testCase> -->
53+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/squareToCircle/</testCase> -->
54+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/squareToCircleSymmetry/</testCase> -->
55+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterCylinderInAir/</testCase> -->
56+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterDropletInAir/</testCase> -->
57+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/waterDropletInAir_axisym/</testCase> -->
58+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact/</testCase> -->
59+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/surfaceTension/dropletImpact_restart/</testCase> -->
60+
<!-- <testCase>libTests/referenceTestCases/PUEq/AddPhysicalEffects/gravity/</testCase> -->
61+
<!-- <testCase>libTests/referenceTestCases/PUEq/3D/shockBubble/heliumAir/</testCase> -->
62+
<!-- <testCase>libTests/referenceTestCases/PUEq/3D/sphericalCollapse/Pratio1427/</testCase> -->
63+
<!-- <testCase>libTests/referenceTestCases/PUEq/3D/unstructured/</testCase> -->
5464

5565
<!-- Temperature-, pressure- and velocity-equilibrium-model reference test cases -->
5666
<!-- --------------------------------------------------------------------------- -->
57-
<!-- <testCase>./libTests/referenceTestCases/PTUEq/transports/interfaceAirHelium/</testCase> -->
58-
<!-- <testCase>./libTests/referenceTestCases/PTUEq/shockTubes/interfaceWaterAir/</testCase> -->
59-
<!-- <testCase>./libTests/referenceTestCases/PTUEq/shockTubes/interfaceDodecane/</testCase> -->
67+
<!-- <testCase>libTests/referenceTestCases/PTUEq/transports/interfaceAirHelium/</testCase> -->
68+
<!-- <testCase>libTests/referenceTestCases/PTUEq/shockTubes/interfaceWaterAir/</testCase> -->
69+
<!-- <testCase>libTests/referenceTestCases/PTUEq/shockTubes/interfaceDodecane/</testCase> -->
6070

6171
<!-- Homogeneous-Euler reference test cases -->
6272
<!-- -------------------------------------- -->
63-
<!-- <testCase>./libTests/referenceTestCases/eulerHomogeneous/shockTubes/</testCase> -->
73+
<!-- <testCase>libTests/referenceTestCases/eulerHomogeneous/shockTubes/</testCase> -->
6474

6575
<!-- Velocity-equilibrium-model reference test cases -->
6676
<!-- ----------------------------------------------- -->
67-
<!-- <testCase>./libTests/referenceTestCases/UEq/1D/transports/interfaceWaterAir/</testCase> -->
68-
<!-- <testCase>./libTests/referenceTestCases/UEq/1D/shockTubes/interfaceAirHelium/</testCase> -->
69-
<!-- <testCase>./libTests/referenceTestCases/UEq/1D/shockTubes/interfaceWaterAir/</testCase> -->
70-
<!-- <testCase>./libTests/referenceTestCases/UEq/1D/shockTubes/epoxySpinel/</testCase> -->
71-
<!-- <testCase>./libTests/referenceTestCases/UEq/1D/cavitation/</testCase> -->
77+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/transports/interfaceWaterAir/</testCase> -->
78+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockTubes/interfaceAirHelium/</testCase> -->
79+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockTubes/interfaceWaterAir/</testCase> -->
80+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockTubes/interfaceWaterAirNASG/</testCase> -->
81+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockTubes/epoxySpinel/</testCase> -->
82+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockTubes/mixtures/</testCase> -->
83+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/mixture/waterAir/</testCase> -->
84+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockOnInterface/sharpInterfaceWaterAir/</testCase> -->
85+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/shockOnInterface/diffusedInterfaceWaterAir/</testCase> -->
86+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/cavitation/</testCase> -->
87+
<!-- <testCase>libTests/referenceTestCases/UEq/1D/sphericalCollapse/Pratio1427/</testCase> -->
88+
<!-- <testCase>libTests/referenceTestCases/UEq/2D/nonSphericalCollapseNearWall/</testCase> -->
89+
<!-- <testCase>libTests/referenceTestCases/UEq/2D/squareToCircleSymmetry/</testCase> -->
90+
91+
<!-- Velocity-equilibrium-model with total energy reference test cases -->
92+
<!-- ----------------------------------------------------------------- -->
93+
<!-- <testCase>libTests/referenceTestCases/UEqTotEnergy/1D/transports/interfaceWaterAir/</testCase> -->
94+
<!-- <testCase>libTests/referenceTestCases/UEqTotEnergy/1D/shockTubes/interfaceAirHelium/</testCase> -->
95+
<!-- <testCase>libTests/referenceTestCases/UEqTotEnergy/1D/shockTubes/interfaceWaterAir/</testCase> -->
96+
<!-- <testCase>libTests/referenceTestCases/UEqTotEnergy/1D/shockTubes/epoxySpinel/</testCase> -->
97+
<!-- <testCase>libTests/referenceTestCases/UEqTotEnergy/1D/shockOnInterface/interfaceWaterAir/</testCase> -->
98+
99+
<!-- Non-linear-Schrodinger reference test cases -->
100+
<!-- ------------------------------------------- -->
101+
<!-- <testCase>libTests/referenceTestCases/nonLinearSchrodinger/1D/shockTube/</testCase> -->
102+
103+
<!-- Euler-Korteweg reference test cases -->
104+
<!-- ------------------------------------------- -->
105+
<!-- <testCase>./libTests/referenceTestCases/eulerKorteweg/1D/shockTubes/VanDerWaals/</testCase> -->
106+
<!-- <testCase>./libTests/referenceTestCases/eulerKorteweg/1D/shockTubes/polynomialEOS/</testCase> -->
72107

73108
<!-- Error test cases -->
74109
<!-- ---------------- -->
75-
<!-- <testCase>./libTests/referenceTestCases/errors/errorXMLElement/</testCase> -->
76-
<!-- <testCase>./libTests/referenceTestCases/errors/errorXMLAttribute/</testCase> -->
110+
<!-- <testCase>libTests/referenceTestCases/errors/errorXMLElement/</testCase> -->
111+
<!-- <testCase>libTests/referenceTestCases/errors/errorXMLAttribute/</testCase> -->
77112

78113
</ecogen>

Diff for: Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CXX = mpicxx
88
CXXFLAGS = -O3 -std=c++11 -Wall -Wextra -Wpedantic #release
99
#CXXFLAGS = -g -std=c++11 -Wall -Wextra -Wpedantic #debug
1010
#CXXFLAGS = -O3 -std=c++11 -Wall -Wextra -Wpedantic -fprofile-arcs -ftest-coverage #code coverage
11+
#CXXFLAGS = -O3 -std=c++11 -Wall -Wextra -Wpedantic -pg #code profile
1112

1213
dirs = $(shell find . -type d)
1314
SOURCES = $(foreach dir,$(dirs),$(wildcard $(dir)/*.cpp))

Diff for: README_Developer.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,21 @@ Standart Doxygen comments
1818
-------------------------
1919
To automatise code documentation, comments should be insert as follow in header files.
2020

21-
A)At the head of files
22-
//! \file file name
23-
//! \author authors names
24-
//! \version 1.0
25-
//! \date 12 Novembre 2009
26-
//! \brief brief description
27-
28-
B)Before class definition
21+
A)Before class definition
2922
//! \class class name
3023
//! \brief brief descritption
3124
//! \details Detailed description
3225
//! continue description
3326

34-
C)Before function and method prototypes
27+
B)Before function and method prototypes
3528
//! \brief brief description
3629
//! \details Detailed description
3730
//! continue description
3831
//! \param parameter name description
3932
//! \param parameter name description
4033
//! \return return description
4134

42-
D)class member descrption
35+
C)class member descrption
4336
type m_variable; //!< member description
4437

4538

Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
Here is described how to compute a code coverage for ECOGEN.
22

3-
1. Open a terminal in ECOGEN/ECOGEN directory.
3+
1. Open a terminal in ECOGEN directory.
44

55
2. Execute a 'make clean' command.
66

7-
2. Compile the code with the '-fprofile-arcs -ftest-coverage' options (see code-coverage CXXFLAGS in ECOGEN Makefile).
7+
3. Compile the code with the '-fprofile-arcs -ftest-coverage' options (see code-coverage CXXFLAGS in ECOGEN Makefile).
88
This will generate .gcno files in the sources.
99

10-
3. Execute the code either in sequential or in parallel (recommended) taking care of enabling all the test cases you want to compute the coverage. Note that you can execute the code several times and it will stack up the coverage analysis. For example, enable all the sequential and parallel nonreg test cases and run:
11-
./ECOGEN nonreg/ECOGEN_nonreg_sequential.xml && mpirun -n 7 --oversubscribe ./ECOGEN nonreg/ECOGEN_nonreg_parallel.xml
10+
4. Execute the code either in sequential or in parallel (recommended) taking care of enabling all the test cases you want to compute the coverage. Note that you can execute the code several times and it will stack up the coverage analysis. For example, run the following for all the sequential and parallel nonreg test cases:
11+
./scripts/run.sh ./nonreg/ECOGEN_nonReg_full.list
1212
This will generate .gcda files in the sources.
1313

14-
4. Install lcov if not already done and execute the following command to interprete the gcda files. Note that the "--capture" option may be "--coverage" on some systems.
14+
5. Install lcov if not already done and execute the following command to interprete the gcda files. Note that the "--capture" option may be "--coverage" on some systems.
1515
lcov --capture --directory . --output-file coverage/coverage.info
1616

17-
5. Execute the following command to generate html files from the previous coverage files.
17+
6. Execute the following command to generate html files from the previous coverage files.
1818
genhtml coverage/coverage.info --output-directory coverage/html
1919

20-
6. Open coverage/html/index.html with your browser to have a look at the report.
20+
7. Open coverage/html/index.html with your browser to have a look at the report.
2121

2222
Note that the .gcno and .gcda files are voluntarily not added in the .gitignore to remind you to delete them after the analysis (and obviously if you do not want to keep them).

0 commit comments

Comments
 (0)