Skip to content

Commit b3d2fbf

Browse files
committed
Merge branch 'develop' of https://github.com/su2code/SU2
2 parents c4dbe5c + b8dfec2 commit b3d2fbf

File tree

85 files changed

+12363
-3393
lines changed

Some content is hidden

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

85 files changed

+12363
-3393
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
3535
- name: Configure (cpp)
3636
if: ${{ matrix.language == 'cpp' }}
37-
run: ./meson.py build --optimization=1
37+
run: ./meson.py setup build --optimization=1
3838

3939
- name: Initialize CodeQL
4040
uses: github/codeql-action/init@v3

.github/workflows/regression.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
26+
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, ReverseTagNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
2727
include:
2828
- config_set: BaseMPI
2929
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Dinstall-mpp=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2'
@@ -37,6 +37,8 @@ jobs:
3737
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
3838
- config_set: ForwardNoMPI
3939
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
40+
- config_set: ReverseTagNoMPI
41+
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror -Dcodi-tape=Tag'
4042
- config_set: BaseOMP
4143
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
4244
- config_set: ReverseOMP
@@ -215,6 +217,55 @@ jobs:
215217
with:
216218
entrypoint: /bin/rm
217219
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
220+
discadj_tape_tests:
221+
if: inputs.runner != 'ARM64'
222+
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
223+
name: Tape Tests
224+
needs: build
225+
strategy:
226+
fail-fast: false
227+
matrix:
228+
testscript: ['serial_regression_AD.py']
229+
include:
230+
- testscript: 'serial_regression_AD.py'
231+
tag: TagNoMPI
232+
steps:
233+
- name: Pre Cleanup
234+
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
235+
with:
236+
entrypoint: /bin/rm
237+
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
238+
- name: Download All artifacts
239+
uses: actions/download-artifact@v4
240+
- name: Uncompress and Move Binaries
241+
run: |
242+
BIN_FOLDER="$PWD/install/bin"
243+
mkdir -p $BIN_FOLDER
244+
ls -lah $BIN_FOLDER
245+
for type in Base Reverse Forward; do
246+
TYPE_FOLDER="${type}${{matrix.tag}}"
247+
echo "Processing '$TYPE_FOLDER' ..."
248+
if [ -d $TYPE_FOLDER ]; then
249+
pushd $TYPE_FOLDER
250+
ls -lah
251+
tar -zxvf install_bin.tgz
252+
ls -lah install/bin/
253+
cp -r install/* $BIN_FOLDER/../
254+
popd;
255+
fi
256+
done
257+
chmod a+x $BIN_FOLDER/*
258+
ls -lahR $BIN_FOLDER
259+
- name: Run Tests in Container
260+
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
261+
with:
262+
# -t <Tutorials-branch> -c <Testcases-branch>
263+
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests"
264+
- name: Cleanup
265+
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
266+
with:
267+
entrypoint: /bin/rm
268+
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
218269
thread_sanitizer_tests:
219270
if: inputs.runner != 'ARM64'
220271
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}

Common/include/CConfig.hpp

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,17 @@ class CConfig {
592592
MUSCL_AdjTurb; /*!< \brief MUSCL scheme for the adj turbulence equations.*/
593593
bool MUSCL_Species; /*!< \brief MUSCL scheme for the species equations.*/
594594
bool Use_Accurate_Jacobians; /*!< \brief Use numerically computed Jacobians for AUSM+up(2) and SLAU(2). */
595+
bool Use_Accurate_Turb_Jacobians; /*!< \brief Use numerically computed Jacobians for standard SA turbulence model. */
595596
bool EulerPersson; /*!< \brief Boolean to determine whether this is an Euler simulation with Persson shock capturing. */
596597
bool FSI_Problem = false,/*!< \brief Boolean to determine whether the simulation is FSI or not. */
597598
Multizone_Problem; /*!< \brief Boolean to determine whether we are solving a multizone problem. */
598599
//bool ContactResistance = false; /*!< \brief Apply contact resistance for conjugate heat transfer. */
599600
unsigned short nID_DV; /*!< \brief ID for the region of FEM when computed using direct differentiation. */
600601

601-
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
602-
bool AD_Preaccumulation; /*!< \brief Enable or disable preaccumulation in the AD mode. */
602+
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
603+
bool AD_Preaccumulation; /*!< \brief Enable or disable preaccumulation in the AD mode. */
604+
CHECK_TAPE_TYPE AD_CheckTapeType; /*!< \brief Type of tape that is checked in a tape debug run. */
605+
CHECK_TAPE_VARIABLES AD_CheckTapeVariables; /*!< \brief Type of variables that are checked in a tape debug run. */
603606
STRUCT_COMPRESS Kind_Material_Compress; /*!< \brief Determines if the material is compressible or incompressible (structural analysis). */
604607
STRUCT_MODEL Kind_Material; /*!< \brief Determines the material model to be used (structural analysis). */
605608
STRUCT_DEFORMATION Kind_Struct_Solver; /*!< \brief Determines the geometric condition (small or large deformations) for structural analysis. */
@@ -707,6 +710,7 @@ class CConfig {
707710
Wrt_Restart_Overwrite, /*!< \brief Overwrite restart files or append iteration number.*/
708711
Wrt_Surface_Overwrite, /*!< \brief Overwrite surface output files or append iteration number.*/
709712
Wrt_Volume_Overwrite, /*!< \brief Overwrite volume output files or append iteration number.*/
713+
PyCustomSource, /*!< \brief Use a user-defined custom source term .*/
710714
Restart_Flow; /*!< \brief Restart flow solution for adjoint and linearized problems. */
711715
unsigned short nMarker_Monitoring, /*!< \brief Number of markers to monitor. */
712716
nMarker_Designing, /*!< \brief Number of markers for the objective function. */
@@ -825,6 +829,7 @@ class CConfig {
825829
SurfSens_FileName, /*!< \brief Output file for the sensitivity on the surface (discrete adjoint). */
826830
VolSens_FileName, /*!< \brief Output file for the sensitivity in the volume (discrete adjoint). */
827831
ObjFunc_Hess_FileName; /*!< \brief Hessian approximation obtained by the Sobolev smoothing solver. */
832+
bool Multizone_Adapt_FileName; /*!< \brief Append zone number to solution and restart file names. */
828833

829834
bool
830835
Wrt_Performance, /*!< \brief Write the performance summary at the end of a calculation. */
@@ -1058,7 +1063,8 @@ class CConfig {
10581063
long ParMETIS_pointWgt; /*!< \brief Load balancing weight given to points. */
10591064
long ParMETIS_edgeWgt; /*!< \brief Load balancing weight given to edges. */
10601065
unsigned short DirectDiff; /*!< \brief Direct Differentation mode. */
1061-
bool DiscreteAdjoint; /*!< \brief AD-based discrete adjoint mode. */
1066+
bool DiscreteAdjoint, /*!< \brief AD-based discrete adjoint mode. */
1067+
DiscreteAdjointDebug; /*!< \brief Discrete adjoint debug mode using tags. */
10621068
su2double Const_DES; /*!< \brief Detached Eddy Simulation Constant. */
10631069
WINDOW_FUNCTION Kind_WindowFct; /*!< \brief Type of window (weight) function for objective functional. */
10641070
unsigned short Kind_HybridRANSLES; /*!< \brief Kind of Hybrid RANS/LES. */
@@ -1900,6 +1906,12 @@ class CConfig {
19001906
*/
19011907
su2double GetPressure_FreeStreamND(void) const { return Pressure_FreeStreamND; }
19021908

1909+
/*!
1910+
* \brief Get a reference to the non-dimensionalized freestream pressure (used for AD tracking).
1911+
* \return Reference to non-dimensionalized freestream pressure.
1912+
*/
1913+
su2double& GetPressure_FreeStreamND(void) { return Pressure_FreeStreamND; }
1914+
19031915
/*!
19041916
* \brief Get the value of the thermodynamic pressure.
19051917
* \return Thermodynamic pressure.
@@ -1925,6 +1937,12 @@ class CConfig {
19251937
*/
19261938
su2double GetTemperature_FreeStreamND(void) const { return Temperature_FreeStreamND; }
19271939

1940+
/*!
1941+
* \brief Get a reference to the non-dimensionalized freestream temperature (used for AD tracking).
1942+
* \return Reference to non-dimensionalized freestream temperature.
1943+
*/
1944+
su2double& GetTemperature_FreeStreamND(void) { return Temperature_FreeStreamND; }
1945+
19281946
/*!
19291947
* \brief Get the value of the non-dimensionalized vibrational-electronic freestream temperature.
19301948
* \return Non-dimensionalized vibrational-electronic freestream temperature.
@@ -3073,6 +3091,12 @@ class CConfig {
30733091
*/
30743092
unsigned short GetnMarker_PyCustom(void) const { return nMarker_PyCustom; }
30753093

3094+
/*!
3095+
* \brief Get the Python custom source term activation.
3096+
* \return Custom source term is active or not.
3097+
*/
3098+
bool GetPyCustomSource(void) const { return PyCustomSource; }
3099+
30763100
/*!
30773101
* \brief Get the total number of moving markers.
30783102
* \return Total number of moving markers.
@@ -4521,6 +4545,12 @@ class CConfig {
45214545
*/
45224546
bool GetUse_Accurate_Jacobians(void) const { return Use_Accurate_Jacobians; }
45234547

4548+
/*!
4549+
* \brief Get whether to "Use Accurate Jacobians" for Standard SA turbulence model.
4550+
* \return yes/no.
4551+
*/
4552+
bool GetUse_Accurate_Turb_Jacobians(void) const { return Use_Accurate_Turb_Jacobians; }
4553+
45244554
/*!
45254555
* \brief Get the kind of integration scheme (explicit or implicit)
45264556
* for the flow equations.
@@ -5405,19 +5435,25 @@ class CConfig {
54055435
bool GetWrt_Volume_Overwrite(void) const { return Wrt_Volume_Overwrite; }
54065436

54075437
/*!
5408-
* \brief Provides the number of varaibles.
5438+
* \brief Get whether filenames are appended the zone number automatically (multiphysics solver).
5439+
* \return Flag for appending zone numbers to restart and solution filenames. If Flag=true, zone numer is appended.
5440+
*/
5441+
bool GetMultizone_AdaptFilename(void) const { return Multizone_Adapt_FileName; }
5442+
5443+
/*!
5444+
* \brief Provides the number of variables.
54095445
* \return Number of variables.
54105446
*/
54115447
unsigned short GetnVar(void);
54125448

54135449
/*!
5414-
* \brief Provides the number of varaibles.
5450+
* \brief Provides the number of variables.
54155451
* \return Number of variables.
54165452
*/
54175453
unsigned short GetnZone(void) const { return nZone; }
54185454

54195455
/*!
5420-
* \brief Provides the number of varaibles.
5456+
* \brief Provides the number of variables.
54215457
* \return Number of variables.
54225458
*/
54235459
unsigned short GetiZone(void) const { return iZone; }
@@ -8800,6 +8836,12 @@ class CConfig {
88008836
*/
88018837
bool GetDiscrete_Adjoint(void) const { return DiscreteAdjoint; }
88028838

8839+
/*!
8840+
* \brief Get the indicator whether a debug run for the discrete adjoint solver will be started.
8841+
* \return the discrete adjoint debug indicator.
8842+
*/
8843+
bool GetDiscrete_Adjoint_Debug(void) const { return DiscreteAdjointDebug; }
8844+
88038845
/*!
88048846
* \brief Get the number of subiterations while a ramp is applied.
88058847
* \return Number of FSI subiters.
@@ -9237,6 +9279,16 @@ class CConfig {
92379279
*/
92389280
su2double GetConst_DES(void) const { return Const_DES; }
92399281

9282+
/*!
9283+
* \brief Get the type of tape that will be checked in a tape debug run.
9284+
*/
9285+
CHECK_TAPE_TYPE GetAD_CheckTapeType(void) const { return AD_CheckTapeType; }
9286+
9287+
/*!
9288+
* \brief Get the type of variables that will be checked for in a tape debug run.
9289+
*/
9290+
CHECK_TAPE_VARIABLES GetAD_CheckTapeVariables(void) const { return AD_CheckTapeVariables; }
9291+
92409292
/*!
92419293
* \brief Get if AD preaccumulation should be performed.
92429294
*/
@@ -9626,6 +9678,11 @@ class CConfig {
96269678
*/
96279679
unsigned short GetnVolumeOutputFiles() const { return nVolumeOutputFiles; }
96289680

9681+
/*!
9682+
* \brief GetnVolumeOutputFrequencies
9683+
*/
9684+
unsigned short GetnVolumeOutputFrequencies() const { return nVolumeOutputFrequencies; }
9685+
96299686
/*!
96309687
* \brief GetVolumeOutputFrequency
96319688
* \param[in] iFile: index of file number for which the writing frequency needs to be returned.

0 commit comments

Comments
 (0)