Skip to content

Commit c77ff59

Browse files
committed
Merge branch 'develop' into feature_custom_source
2 parents e94bb0c + 5627e49 commit c77ff59

Some content is hidden

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

51 files changed

+1483
-267
lines changed

.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
@@ -132,6 +132,7 @@ class CConfig {
132132
Sens_Remove_Sharp, /*!< \brief Flag for removing or not the sharp edges from the sensitivity computation. */
133133
Hold_GridFixed, /*!< \brief Flag hold fixed some part of the mesh during the deformation. */
134134
Axisymmetric, /*!< \brief Flag for axisymmetric calculations */
135+
Enable_Cuda, /*!< \brief Flag for switching GPU computing*/
135136
Integrated_HeatFlux; /*!< \brief Flag for heat flux BC whether it deals with integrated values.*/
136137
su2double Buffet_k; /*!< \brief Sharpness coefficient for buffet sensor.*/
137138
su2double Buffet_lambda; /*!< \brief Offset parameter for buffet sensor.*/
@@ -594,14 +595,17 @@ class CConfig {
594595
MUSCL_AdjTurb; /*!< \brief MUSCL scheme for the adj turbulence equations.*/
595596
bool MUSCL_Species; /*!< \brief MUSCL scheme for the species equations.*/
596597
bool Use_Accurate_Jacobians; /*!< \brief Use numerically computed Jacobians for AUSM+up(2) and SLAU(2). */
598+
bool Use_Accurate_Turb_Jacobians; /*!< \brief Use numerically computed Jacobians for standard SA turbulence model. */
597599
bool EulerPersson; /*!< \brief Boolean to determine whether this is an Euler simulation with Persson shock capturing. */
598600
bool FSI_Problem = false,/*!< \brief Boolean to determine whether the simulation is FSI or not. */
599601
Multizone_Problem; /*!< \brief Boolean to determine whether we are solving a multizone problem. */
600602
//bool ContactResistance = false; /*!< \brief Apply contact resistance for conjugate heat transfer. */
601603
unsigned short nID_DV; /*!< \brief ID for the region of FEM when computed using direct differentiation. */
602604

603-
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
604-
bool AD_Preaccumulation; /*!< \brief Enable or disable preaccumulation in the AD mode. */
605+
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
606+
bool AD_Preaccumulation; /*!< \brief Enable or disable preaccumulation in the AD mode. */
607+
CHECK_TAPE_TYPE AD_CheckTapeType; /*!< \brief Type of tape that is checked in a tape debug run. */
608+
CHECK_TAPE_VARIABLES AD_CheckTapeVariables; /*!< \brief Type of variables that are checked in a tape debug run. */
605609
STRUCT_COMPRESS Kind_Material_Compress; /*!< \brief Determines if the material is compressible or incompressible (structural analysis). */
606610
STRUCT_MODEL Kind_Material; /*!< \brief Determines the material model to be used (structural analysis). */
607611
STRUCT_DEFORMATION Kind_Struct_Solver; /*!< \brief Determines the geometric condition (small or large deformations) for structural analysis. */
@@ -827,6 +831,7 @@ class CConfig {
827831
SurfSens_FileName, /*!< \brief Output file for the sensitivity on the surface (discrete adjoint). */
828832
VolSens_FileName, /*!< \brief Output file for the sensitivity in the volume (discrete adjoint). */
829833
ObjFunc_Hess_FileName; /*!< \brief Hessian approximation obtained by the Sobolev smoothing solver. */
834+
bool Multizone_Adapt_FileName; /*!< \brief Append zone number to solution and restart file names. */
830835

831836
bool
832837
Wrt_Performance, /*!< \brief Write the performance summary at the end of a calculation. */
@@ -1060,7 +1065,8 @@ class CConfig {
10601065
long ParMETIS_pointWgt; /*!< \brief Load balancing weight given to points. */
10611066
long ParMETIS_edgeWgt; /*!< \brief Load balancing weight given to edges. */
10621067
unsigned short DirectDiff; /*!< \brief Direct Differentation mode. */
1063-
bool DiscreteAdjoint; /*!< \brief AD-based discrete adjoint mode. */
1068+
bool DiscreteAdjoint, /*!< \brief AD-based discrete adjoint mode. */
1069+
DiscreteAdjointDebug; /*!< \brief Discrete adjoint debug mode using tags. */
10641070
su2double Const_DES; /*!< \brief Detached Eddy Simulation Constant. */
10651071
WINDOW_FUNCTION Kind_WindowFct; /*!< \brief Type of window (weight) function for objective functional. */
10661072
unsigned short Kind_HybridRANSLES; /*!< \brief Kind of Hybrid RANS/LES. */
@@ -1902,6 +1908,12 @@ class CConfig {
19021908
*/
19031909
su2double GetPressure_FreeStreamND(void) const { return Pressure_FreeStreamND; }
19041910

1911+
/*!
1912+
* \brief Get a reference to the non-dimensionalized freestream pressure (used for AD tracking).
1913+
* \return Reference to non-dimensionalized freestream pressure.
1914+
*/
1915+
su2double& GetPressure_FreeStreamND(void) { return Pressure_FreeStreamND; }
1916+
19051917
/*!
19061918
* \brief Get the value of the thermodynamic pressure.
19071919
* \return Thermodynamic pressure.
@@ -1927,6 +1939,12 @@ class CConfig {
19271939
*/
19281940
su2double GetTemperature_FreeStreamND(void) const { return Temperature_FreeStreamND; }
19291941

1942+
/*!
1943+
* \brief Get a reference to the non-dimensionalized freestream temperature (used for AD tracking).
1944+
* \return Reference to non-dimensionalized freestream temperature.
1945+
*/
1946+
su2double& GetTemperature_FreeStreamND(void) { return Temperature_FreeStreamND; }
1947+
19301948
/*!
19311949
* \brief Get the value of the non-dimensionalized vibrational-electronic freestream temperature.
19321950
* \return Non-dimensionalized vibrational-electronic freestream temperature.
@@ -4505,6 +4523,12 @@ class CConfig {
45054523
*/
45064524
bool GetUse_Accurate_Jacobians(void) const { return Use_Accurate_Jacobians; }
45074525

4526+
/*!
4527+
* \brief Get whether to "Use Accurate Jacobians" for Standard SA turbulence model.
4528+
* \return yes/no.
4529+
*/
4530+
bool GetUse_Accurate_Turb_Jacobians(void) const { return Use_Accurate_Turb_Jacobians; }
4531+
45084532
/*!
45094533
* \brief Get the kind of integration scheme (explicit or implicit)
45104534
* for the flow equations.
@@ -5389,19 +5413,25 @@ class CConfig {
53895413
bool GetWrt_Volume_Overwrite(void) const { return Wrt_Volume_Overwrite; }
53905414

53915415
/*!
5392-
* \brief Provides the number of varaibles.
5416+
* \brief Get whether filenames are appended the zone number automatically (multiphysics solver).
5417+
* \return Flag for appending zone numbers to restart and solution filenames. If Flag=true, zone numer is appended.
5418+
*/
5419+
bool GetMultizone_AdaptFilename(void) const { return Multizone_Adapt_FileName; }
5420+
5421+
/*!
5422+
* \brief Provides the number of variables.
53935423
* \return Number of variables.
53945424
*/
53955425
unsigned short GetnVar(void);
53965426

53975427
/*!
5398-
* \brief Provides the number of varaibles.
5428+
* \brief Provides the number of variables.
53995429
* \return Number of variables.
54005430
*/
54015431
unsigned short GetnZone(void) const { return nZone; }
54025432

54035433
/*!
5404-
* \brief Provides the number of varaibles.
5434+
* \brief Provides the number of variables.
54055435
* \return Number of variables.
54065436
*/
54075437
unsigned short GetiZone(void) const { return iZone; }
@@ -6198,6 +6228,12 @@ class CConfig {
61986228
*/
61996229
bool GetAxisymmetric(void) const { return Axisymmetric; }
62006230

6231+
/*!
6232+
* \brief Get information about GPU support.
6233+
* \return <code>TRUE</code> if cuda is enabled; otherwise <code>FALSE</code>.
6234+
*/
6235+
bool GetCUDA(void) const { return Enable_Cuda; }
6236+
62016237
/*!
62026238
* \brief Subtract one to the index of the finest grid (full multigrid strategy).
62036239
* \return Change the index of the finest grid.
@@ -8778,6 +8814,12 @@ class CConfig {
87788814
*/
87798815
bool GetDiscrete_Adjoint(void) const { return DiscreteAdjoint; }
87808816

8817+
/*!
8818+
* \brief Get the indicator whether a debug run for the discrete adjoint solver will be started.
8819+
* \return the discrete adjoint debug indicator.
8820+
*/
8821+
bool GetDiscrete_Adjoint_Debug(void) const { return DiscreteAdjointDebug; }
8822+
87818823
/*!
87828824
* \brief Get the number of subiterations while a ramp is applied.
87838825
* \return Number of FSI subiters.
@@ -9215,6 +9257,16 @@ class CConfig {
92159257
*/
92169258
su2double GetConst_DES(void) const { return Const_DES; }
92179259

9260+
/*!
9261+
* \brief Get the type of tape that will be checked in a tape debug run.
9262+
*/
9263+
CHECK_TAPE_TYPE GetAD_CheckTapeType(void) const { return AD_CheckTapeType; }
9264+
9265+
/*!
9266+
* \brief Get the type of variables that will be checked for in a tape debug run.
9267+
*/
9268+
CHECK_TAPE_VARIABLES GetAD_CheckTapeVariables(void) const { return AD_CheckTapeVariables; }
9269+
92189270
/*!
92199271
* \brief Get if AD preaccumulation should be performed.
92209272
*/
@@ -9616,6 +9668,11 @@ class CConfig {
96169668
*/
96179669
unsigned short GetnVolumeOutputFiles() const { return nVolumeOutputFiles; }
96189670

9671+
/*!
9672+
* \brief GetnVolumeOutputFrequencies
9673+
*/
9674+
unsigned short GetnVolumeOutputFrequencies() const { return nVolumeOutputFrequencies; }
9675+
96199676
/*!
96209677
* \brief GetVolumeOutputFrequency
96219678
* \param[in] iFile: index of file number for which the writing frequency needs to be returned.

0 commit comments

Comments
 (0)