Skip to content

Commit 335b49d

Browse files
committed
Merge branch 'develop' into feature_binary_su2
2 parents 6bf0e76 + 764b3be commit 335b49d

File tree

73 files changed

+11662
-3301
lines changed

Some content is hidden

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

73 files changed

+11662
-3301
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: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ jobs:
5454
key: ${{ matrix.config_set }}-${{ github.sha }}
5555
restore-keys: ${{ matrix.config_set }}
5656
- name: Pre Cleanup
57-
uses: docker://ghcr.io/su2code/su2/build-su2:240320-1536
57+
uses: docker://ghcr.io/su2code/su2/build-su2:250717-1402
5858
with:
5959
entrypoint: /bin/rm
6060
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
6161
- name: Build
62-
uses: docker://ghcr.io/su2code/su2/build-su2:240320-1536
62+
uses: docker://ghcr.io/su2code/su2/build-su2:250717-1402
6363
with:
6464
args: -b ${{github.ref}} -f "${{matrix.flags}}"
6565
- name: Compress binaries
@@ -70,7 +70,7 @@ jobs:
7070
name: ${{ matrix.config_set }}
7171
path: install_bin.tgz
7272
- name: Post Cleanup
73-
uses: docker://ghcr.io/su2code/su2/build-su2:240320-1536
73+
uses: docker://ghcr.io/su2code/su2/build-su2:250717-1402
7474
with:
7575
entrypoint: /bin/rm
7676
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -97,12 +97,12 @@ jobs:
9797
key: ${{ matrix.config_set }}-${{ github.sha }}
9898
restore-keys: ${{ matrix.config_set }}
9999
- name: Pre Cleanup
100-
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:240320-1536
100+
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:250717-1402
101101
with:
102102
entrypoint: /bin/rm
103103
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
104104
- name: Build
105-
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:240320-1536
105+
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:250717-1402
106106
with:
107107
args: -b ${{github.ref}} -f "${{matrix.flags}}"
108108
- name: Compress binaries
@@ -113,7 +113,7 @@ jobs:
113113
name: ${{ matrix.config_set }}
114114
path: install_bin.tgz
115115
- name: Post Cleanup
116-
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:240320-1536
116+
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:250717-1402
117117
with:
118118
entrypoint: /bin/rm
119119
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -137,12 +137,12 @@ jobs:
137137
key: ${{ matrix.config_set }}-${{ github.sha }}
138138
restore-keys: ${{ matrix.config_set }}
139139
- name: Pre Cleanup
140-
uses: docker://ghcr.io/su2code/su2/build-su2-asan:240320-1536
140+
uses: docker://ghcr.io/su2code/su2/build-su2-asan:250717-1402
141141
with:
142142
entrypoint: /bin/rm
143143
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
144144
- name: Build
145-
run: docker run --rm --cap-add SYS_PTRACE -v $(pwd):${{ github.workspace }} -w ${{ github.workspace }} ghcr.io/su2code/su2/build-su2-asan:240320-1536 -b ${{github.ref}} -f "${{matrix.flags}}"
145+
run: docker run --rm --cap-add SYS_PTRACE -v $(pwd):${{ github.workspace }} -w ${{ github.workspace }} ghcr.io/su2code/su2/build-su2-asan:250717-1402 -b ${{github.ref}} -f "${{matrix.flags}}"
146146
- name: Compress binaries
147147
run: tar -zcvf install_bin.tgz install/*
148148
- name: Upload Binaries
@@ -151,7 +151,7 @@ jobs:
151151
name: ${{ matrix.config_set }}
152152
path: install_bin.tgz
153153
- name: Post Cleanup
154-
uses: docker://ghcr.io/su2code/su2/build-su2-asan:240320-1536
154+
uses: docker://ghcr.io/su2code/su2/build-su2-asan:250717-1402
155155
with:
156156
entrypoint: /bin/rm
157157
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -182,7 +182,7 @@ jobs:
182182
tag: OMP
183183
steps:
184184
- name: Pre Cleanup
185-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
185+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
186186
with:
187187
entrypoint: /bin/rm
188188
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -208,12 +208,12 @@ jobs:
208208
chmod a+x $BIN_FOLDER/*
209209
ls -lahR $BIN_FOLDER
210210
- name: Run Tests in Container
211-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
211+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
212212
with:
213213
# -t <Tutorials-branch> -c <Testcases-branch>
214214
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
215215
- name: Cleanup
216-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
216+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
217217
with:
218218
entrypoint: /bin/rm
219219
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -231,7 +231,7 @@ jobs:
231231
tag: TagNoMPI
232232
steps:
233233
- name: Pre Cleanup
234-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
234+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
235235
with:
236236
entrypoint: /bin/rm
237237
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -257,12 +257,12 @@ jobs:
257257
chmod a+x $BIN_FOLDER/*
258258
ls -lahR $BIN_FOLDER
259259
- name: Run Tests in Container
260-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
260+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
261261
with:
262262
# -t <Tutorials-branch> -c <Testcases-branch>
263263
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests"
264264
- name: Cleanup
265-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
265+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
266266
with:
267267
entrypoint: /bin/rm
268268
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -277,7 +277,7 @@ jobs:
277277
testscript: ['hybrid_regression.py', 'hybrid_regression_AD.py']
278278
steps:
279279
- name: Pre Cleanup
280-
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
280+
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:250717-1402
281281
with:
282282
entrypoint: /bin/rm
283283
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -303,12 +303,12 @@ jobs:
303303
chmod a+x $BIN_FOLDER/*
304304
ls -lahR $BIN_FOLDER
305305
- name: Run Tests in Container
306-
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
306+
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:250717-1402
307307
with:
308308
# -t <Tutorials-branch> -c <Testcases-branch>
309309
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
310310
- name: Cleanup
311-
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
311+
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:250717-1402
312312
with:
313313
entrypoint: /bin/rm
314314
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -322,7 +322,7 @@ jobs:
322322
testscript: ['serial_regression.py', 'serial_regression_AD.py']
323323
steps:
324324
- name: Pre Cleanup
325-
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
325+
uses: docker://ghcr.io/su2code/su2/test-su2-asan:250717-1402
326326
with:
327327
entrypoint: /bin/rm
328328
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -348,12 +348,12 @@ jobs:
348348
chmod a+x $BIN_FOLDER/*
349349
ls -lahR $BIN_FOLDER
350350
- name: Run Tests in Container
351-
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
351+
uses: docker://ghcr.io/su2code/su2/test-su2-asan:250717-1402
352352
with:
353353
# -t <Tutorials-branch> -c <Testcases-branch>
354354
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan"
355355
- name: Cleanup
356-
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
356+
uses: docker://ghcr.io/su2code/su2/test-su2-asan:250717-1402
357357
with:
358358
entrypoint: /bin/rm
359359
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -374,7 +374,7 @@ jobs:
374374
tag: MPI
375375
steps:
376376
- name: Pre Cleanup
377-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
377+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
378378
with:
379379
entrypoint: /bin/rm
380380
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
@@ -435,11 +435,11 @@ jobs:
435435
echo $PWD
436436
ls -lahR
437437
- name: Run Unit Tests
438-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
438+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
439439
with:
440440
entrypoint: install/bin/${{matrix.testdriver}}
441441
- name: Post Cleanup
442-
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
442+
uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402
443443
with:
444444
entrypoint: /bin/rm
445445
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}

.github/workflows/release-management.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
key: ${{ matrix.os_bin }}-${{ github.sha }}
3636
restore-keys: ${{ matrix.os_bin }}
3737
- name: Build
38-
uses: docker://ghcr.io/su2code/su2/build-su2-cross:230813-0103
38+
uses: docker://ghcr.io/su2code/su2/build-su2-cross:250717-1402
3939
with:
4040
args: -b ${{ github.sha }} -f "${{matrix.flags}}"
4141
- name: Create Archive

Common/include/CConfig.hpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ class CConfig {
591591
MUSCL_AdjTurb; /*!< \brief MUSCL scheme for the adj turbulence equations.*/
592592
bool MUSCL_Species; /*!< \brief MUSCL scheme for the species equations.*/
593593
bool Use_Accurate_Jacobians; /*!< \brief Use numerically computed Jacobians for AUSM+up(2) and SLAU(2). */
594+
bool Use_Accurate_Turb_Jacobians; /*!< \brief Use numerically computed Jacobians for standard SA turbulence model. */
594595
bool EulerPersson; /*!< \brief Boolean to determine whether this is an Euler simulation with Persson shock capturing. */
595596
bool FSI_Problem = false,/*!< \brief Boolean to determine whether the simulation is FSI or not. */
596597
Multizone_Problem; /*!< \brief Boolean to determine whether we are solving a multizone problem. */
@@ -706,6 +707,7 @@ class CConfig {
706707
Wrt_Restart_Overwrite, /*!< \brief Overwrite restart files or append iteration number.*/
707708
Wrt_Surface_Overwrite, /*!< \brief Overwrite surface output files or append iteration number.*/
708709
Wrt_Volume_Overwrite, /*!< \brief Overwrite volume output files or append iteration number.*/
710+
PyCustomSource, /*!< \brief Use a user-defined custom source term .*/
709711
Restart_Flow; /*!< \brief Restart flow solution for adjoint and linearized problems. */
710712
unsigned short nMarker_Monitoring, /*!< \brief Number of markers to monitor. */
711713
nMarker_Designing, /*!< \brief Number of markers for the objective function. */
@@ -1090,6 +1092,7 @@ class CConfig {
10901092
su2double *FreeStreamTurboNormal; /*!< \brief Direction to initialize the flow in turbomachinery computation */
10911093
su2double Restart_Bandwidth_Agg; /*!< \brief The aggregate of the bandwidth for writing binary restarts (to be averaged later). */
10921094
su2double Max_Vel2; /*!< \brief The maximum velocity^2 in the domain for the incompressible preconditioner. */
1095+
su2double RangePressure[2]; /*!< \brief The pressure difference pmax-pmin in the domain for the target mass flow rate scaling. */
10931096
bool topology_optimization; /*!< \brief If the structural solver should consider a variable density field to penalize element stiffness. */
10941097
string top_optim_output_file; /*!< \brief File to where the derivatives w.r.t. element densities will be written to. */
10951098
su2double simp_exponent; /*!< \brief Exponent for the density-based stiffness penalization of the SIMP method. */
@@ -3086,6 +3089,12 @@ class CConfig {
30863089
*/
30873090
unsigned short GetnMarker_PyCustom(void) const { return nMarker_PyCustom; }
30883091

3092+
/*!
3093+
* \brief Get the Python custom source term activation.
3094+
* \return Custom source term is active or not.
3095+
*/
3096+
bool GetPyCustomSource(void) const { return PyCustomSource; }
3097+
30893098
/*!
30903099
* \brief Get the total number of moving markers.
30913100
* \return Total number of moving markers.
@@ -4516,6 +4525,12 @@ class CConfig {
45164525
*/
45174526
bool GetUse_Accurate_Jacobians(void) const { return Use_Accurate_Jacobians; }
45184527

4528+
/*!
4529+
* \brief Get whether to "Use Accurate Jacobians" for Standard SA turbulence model.
4530+
* \return yes/no.
4531+
*/
4532+
bool GetUse_Accurate_Turb_Jacobians(void) const { return Use_Accurate_Turb_Jacobians; }
4533+
45194534
/*!
45204535
* \brief Get the kind of integration scheme (explicit or implicit)
45214536
* for the flow equations.
@@ -9208,6 +9223,18 @@ class CConfig {
92089223
*/
92099224
void SetMax_Vel2(su2double val_max_vel2) { Max_Vel2 = val_max_vel2; }
92109225

9226+
/*!
9227+
* \brief Get the maximum pressure (pmax - pmin) in the domain.
9228+
* \return Value of the maximum pressure in the domain.
9229+
*/
9230+
su2double GetRangePressure(int minmax) const { return RangePressure[minmax]; }
9231+
9232+
/*!
9233+
* \brief Set the maximum pressure in the domain.
9234+
* \param[in] Value of the maximum pressure in the domain.
9235+
*/
9236+
void SetRangePressure(su2double val_dp_min,su2double val_dp_max) { RangePressure[0] = val_dp_min;RangePressure[1]=val_dp_max; }
9237+
92119238
/*!
92129239
* \brief Get the maximum velocity^2 in the domain for the incompressible preconditioner.
92139240
* \return Value of the maximum velocity^2 in the domain for the incompressible preconditioner.

Common/include/basic_types/ad_structure.hpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ inline void StartRecording() {}
5252
* \brief Pause the recording of the operations and involved variables.
5353
* If called, all operations occuring after the call will not be stored on the computational graph.
5454
*/
55-
inline void PauseRecording() {}
55+
inline bool PauseRecording() { return false; }
5656

5757
/*!
5858
* \brief Resume the recording of the operations and variables after the recording had been paused.
5959
*/
60-
inline void ResumeRecording() {}
60+
inline void ResumeRecording(bool wasActive) { (void)wasActive; }
6161

6262
/*!
6363
* \brief Stops the recording of the operations and variables.
@@ -413,9 +413,19 @@ FORCEINLINE void ResetInput(su2double& data) { data = data.getValue(); }
413413

414414
FORCEINLINE void StartRecording() { AD::getTape().setActive(); }
415415

416-
FORCEINLINE void PauseRecording() { AD::getTape().setPassive(); }
416+
FORCEINLINE bool PauseRecording() {
417+
if (AD::getTape().isActive()) {
418+
AD::getTape().setPassive();
419+
return true;
420+
}
421+
return false;
422+
}
417423

418-
FORCEINLINE void ResumeRecording() { AD::getTape().setActive(); }
424+
FORCEINLINE void ResumeRecording(bool wasActive) {
425+
if (wasActive) {
426+
AD::getTape().setActive();
427+
}
428+
}
419429

420430
FORCEINLINE void StopRecording() { AD::getTape().setPassive(); }
421431

0 commit comments

Comments
 (0)