Skip to content

Commit 0956549

Browse files
authored
Merge branch 'develop' into feature_multiline
2 parents 85df634 + 33adee2 commit 0956549

137 files changed

Lines changed: 3663 additions & 5420 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.

.github/workflows/regression.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI]
19+
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP]
2020
include:
2121
- config_set: BaseMPI
2222
flags: '-Denable-pywrapper=true -Denable-tests=true --werror'
@@ -30,6 +30,8 @@ jobs:
3030
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --werror'
3131
- config_set: ForwardNoMPI
3232
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --werror'
33+
- config_set: BaseOMP
34+
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --werror'
3335
runs-on: ubuntu-latest
3436
steps:
3537
- name: Cache Object Files
@@ -54,7 +56,7 @@ jobs:
5456
strategy:
5557
fail-fast: false
5658
matrix:
57-
testscript: ['tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py']
59+
testscript: ['tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py']
5860
include:
5961
- testscript: 'tutorials.py'
6062
tag: MPI
@@ -66,31 +68,22 @@ jobs:
6668
tag: NoMPI
6769
- testscript: 'serial_regression_AD.py'
6870
tag: NoMPI
71+
- testscript: 'hybrid_regression.py'
72+
tag: OMP
6973
steps:
70-
- name: Download Base
71-
uses: actions/download-artifact@v1
72-
with:
73-
name: ${{format('Base{0}', matrix.tag)}}
74-
- name: Download Reverse
75-
uses: actions/download-artifact@v1
76-
with:
77-
name: ${{format('Reverse{0}', matrix.tag)}}
78-
- name: Download Forward
79-
uses: actions/download-artifact@v1
80-
with:
81-
name: ${{format('Forward{0}', matrix.tag)}}
74+
- name: Download All artifact
75+
uses: actions/download-artifact@v2
8276
- name: Move Binaries
8377
run: |
8478
mkdir -p install/bin
85-
cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/
86-
cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/
87-
cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/
88-
chmod a+x install/bin/*
79+
if [ -d "${{format('Base{0}', matrix.tag)}}" ]; then cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/; fi
80+
if [ -d "${{format('Reverse{0}', matrix.tag)}}" ]; then cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/; fi
81+
if [ -d "${{format('Forward{0}', matrix.tag)}}" ]; then cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/; fi
82+
chmod a+x install/bin/*
8983
- name: Run Tests in Container
9084
uses: docker://su2code/test-su2:20200303
9185
with:
9286
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
93-
9487
unit_tests:
9588
runs-on: ubuntu-latest
9689
name: Unit Tests
@@ -125,7 +118,7 @@ jobs:
125118
cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/
126119
cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/
127120
cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/
128-
chmod a+x install/bin/*
121+
chmod a+x install/bin/*
129122
- name: Run Unit Tests
130123
uses: docker://su2code/test-su2:20191031
131124
with:

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ env:
3737
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true"
3838
TEST_SCRIPT=parallel_regression.py
3939

40+
# Hybrid-parallel build and test
41+
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false"
42+
TEST_SCRIPT=hybrid_regression.py
43+
4044
# Serial build and test for AD
4145
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true -Dwith-mpi=disabled -Denable-autodiff=true -Denable-directdiff=true"
4246
TEST_SCRIPT=serial_regression_AD.py
4347

44-
# Parallel build and test for AD:
48+
# Parallel build and test for AD
4549
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true -Denable-autodiff=true"
4650
TEST_SCRIPT=parallel_regression_AD.py
4751

@@ -51,7 +55,7 @@ before_install:
5155
- sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
5256
# Install the necessary packages using apt-get with sudo
5357
- sudo apt-get update -qq
54-
- sudo apt-get install -qq build-essential python3-numpy python3-scipy libopenmpi-dev openmpi-bin swig python3-mpi4py
58+
- sudo apt-get install -qq build-essential python3-numpy python3-scipy libopenmpi-dev openmpi-bin swig python3-mpi4py
5559
# to avoid interference with MPI
5660
- test -n $CC && unset CC
5761
- test -n $CXX && unset CXX

AUTHORS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Copyright holders might be the individual person or their respective employer. I
4343
```
4444
Akshay.K.R
4545
Alejandro
46+
Aman uz zaman Baig
4647
Amit Sachdeva
4748
Ana Lourenco
4849
Andrew Burkett
@@ -59,6 +60,7 @@ Daumantas Kavolis
5960
Dave Taflin
6061
Eduardo Molina
6162
Ethan Alan Hereth
63+
FlorianDm
6264
Francisco D. Palacios
6365
Gaurav Bansal
6466
Giulio Gori
@@ -76,7 +78,9 @@ João Loureiro
7678
Kedar Naik
7779
LaSerpe
7880
Matteo Pini
81+
Max Le
7982
Max Sagebaum
83+
Michele Gaffuri
8084
Mickael Philit
8185
Ole Burghardt
8286
Patrick Mischke
@@ -90,6 +94,7 @@ Ryan Barrett
9094
Salvatore Vitale
9195
Samet Cakmakcioglu
9296
Scott Imlay
97+
Steffen Schotthöfer
9398
Steven Endres
9499
Teus van der Stelt
95100
Thomas D. Economon
@@ -98,18 +103,22 @@ TobiKattmann
98103
Trent Lukaczyk
99104
VivaanKhatri
100105
Wally Maier
106+
aaronyicongfu
101107
anilvar
102108
bmunguia
103109
chamsolli
104110
costat
111+
cr109
105112
cvencro
106113
daniel-linton
107114
demanosalvas
108115
dmudiger
109116
erangit
117+
flo
110118
hlkline
111119
juliendm
112120
jvanoostrom
121+
koodlyakshay
113122
mcolonno
114123
minkwankim
115124
padronas

Common/include/CConfig.hpp

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include <assert.h>
4545

4646
#include "./option_structure.hpp"
47-
#include "./datatype_structure.hpp"
4847

4948
#ifdef HAVE_CGNS
5049
#include "cgnslib.h"
@@ -1282,7 +1281,7 @@ class CConfig {
12821281
* \brief Constructor of the class which takes an istream buffer containing the config options.
12831282
*/
12841283
CConfig(istream &case_buffer, unsigned short val_software, bool verb_high);
1285-
1284+
12861285
/*!
12871286
* \brief Constructor of the class which reads the input file and uses default options from another config.
12881287
*/
@@ -1302,7 +1301,7 @@ class CConfig {
13021301
* \brief Destructor of the class.
13031302
*/
13041303
~CConfig(void);
1305-
1304+
13061305
/*!
13071306
* \brief Initialize common fields of the config structure.
13081307
*/
@@ -1322,13 +1321,13 @@ class CConfig {
13221321
* \brief Print the header to screen
13231322
* \param val_software - Kind of software component
13241323
*/
1325-
void SetHeader(unsigned short val_software);
1324+
void SetHeader(unsigned short val_software) const;
13261325

13271326
/*!
13281327
* \brief Get the MPI communicator of SU2.
13291328
* \return MPI communicator of SU2.
13301329
*/
1331-
SU2_MPI::Comm GetMPICommunicator();
1330+
SU2_MPI::Comm GetMPICommunicator() const;
13321331

13331332
/*!
13341333
* \brief Set the MPI communicator for SU2.
@@ -3937,7 +3936,7 @@ class CConfig {
39373936
* \brief Get flag for whether a second gradient calculation is required for upwind reconstruction alone.
39383937
* \return <code>TRUE</code> means that a second gradient will be calculated for upwind reconstruction.
39393938
*/
3940-
bool GetReconstructionGradientRequired(void) { return ReconstructionGradientRequired; }
3939+
bool GetReconstructionGradientRequired(void) const { return ReconstructionGradientRequired; }
39413940

39423941
/*!
39433942
* \brief Get flag for whether a least-squares gradient method is being applied.
@@ -5403,13 +5402,13 @@ class CConfig {
54035402
* \brief Append the zone index to the restart or the solution files.
54045403
* \return Name of the restart file for the flow variables.
54055404
*/
5406-
string GetMultizone_FileName(string val_filename, int val_iZone, string ext);
5405+
string GetMultizone_FileName(string val_filename, int val_iZone, string ext) const;
54075406

54085407
/*!
54095408
* \brief Append the zone index to the restart or the solution files.
54105409
* \return Name of the restart file for the flow variables.
54115410
*/
5412-
string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext);
5411+
string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext) const;
54135412

54145413
/*!
54155414
* \brief Append the instance index to the restart or the solution files.
@@ -5483,7 +5482,7 @@ class CConfig {
54835482
* \param[in] val_iter - Unsteady iteration number or time instance.
54845483
* \return Name of the file with the iteration number for an unsteady solution file.
54855484
*/
5486-
string GetUnsteady_FileName(string val_filename, int val_iter, string ext);
5485+
string GetUnsteady_FileName(string val_filename, int val_iter, string ext) const;
54875486

54885487
/*!
54895488
* \brief Append the input filename string with the appropriate objective function extension.
@@ -5688,7 +5687,7 @@ class CConfig {
56885687
* \param[in] val - new value of the origin
56895688
* \return The mesh motion origin.
56905689
*/
5691-
void SetMotion_Origin(su2double* val) { for (int iDim = 0; iDim < 3; iDim++) Motion_Origin[iDim] = val[iDim]; }
5690+
void SetMotion_Origin(const su2double* val) { for (int iDim = 0; iDim < 3; iDim++) Motion_Origin[iDim] = val[iDim]; }
56925691

56935692
/*!
56945693
* \brief Get the mesh motion origin.
@@ -5703,7 +5702,7 @@ class CConfig {
57035702
* \param[in] val - new value of the origin
57045703
* \param[in] iMarkerMoving - Index of the moving marker (as specified in Marker_Moving)
57055704
*/
5706-
void SetMarkerMotion_Origin(su2double* val, unsigned short iMarkerMoving) {
5705+
void SetMarkerMotion_Origin(const su2double* val, unsigned short iMarkerMoving) {
57075706
for (int iDim = 0; iDim < 3; iDim++) MarkerMotion_Origin[3*iMarkerMoving + iDim] = val[iDim];
57085707
}
57095708

@@ -8009,8 +8008,8 @@ class CConfig {
80098008
/*!
80108009
* \brief Set the config file parsing.
80118010
*/
8012-
void SetConfig_Parsing(istream &config_buffer);
8013-
8011+
void SetConfig_Parsing(istream &config_buffer);
8012+
80148013
/*!
80158014
* \brief Set the config file parsing.
80168015
*/
@@ -8338,27 +8337,7 @@ class CConfig {
83388337
* \brief Get the current number of non-physical reconstructions for 2nd-order upwinding.
83398338
* \return Current number of non-physical reconstructions for 2nd-order upwinding.
83408339
*/
8341-
unsigned long GetNonphysical_Reconstr(void) { return Nonphys_Reconstr; }
8342-
8343-
/*!
8344-
* \brief Given arrays x[1..n] and y[1..n] containing a tabulated function, i.e., yi = f(xi), with
8345-
x1 < x2 < . . . < xN , and given values yp1 and ypn for the first derivative of the interpolating
8346-
function at points 1 and n, respectively, this routine returns an array y2[1..n] that contains
8347-
the second derivatives of the interpolating function at the tabulated points xi. If yp1 and/or
8348-
ypn are equal to 1 × 1030 or larger, the routine is signaled to set the corresponding boundary
8349-
condition for a natural spline, with zero second derivative on that boundary.
8350-
Numerical Recipes: The Art of Scientific Computing, Third Edition in C++.
8351-
*/
8352-
void SetSpline(vector<su2double> &x, vector<su2double> &y, unsigned long n, su2double yp1, su2double ypn, vector<su2double> &y2);
8353-
8354-
/*!
8355-
* \brief Given the arrays xa[1..n] and ya[1..n], which tabulate a function (with the xai’s in order),
8356-
and given the array y2a[1..n], which is the output from spline above, and given a value of
8357-
x, this routine returns a cubic-spline interpolated value y.
8358-
Numerical Recipes: The Art of Scientific Computing, Third Edition in C++.
8359-
* \return The interpolated value of for x.
8360-
*/
8361-
su2double GetSpline(vector<su2double> &xa, vector<su2double> &ya, vector<su2double> &y2a, unsigned long n, su2double x);
8340+
unsigned long GetNonphysical_Reconstr(void) const { return Nonphys_Reconstr; }
83628341

83638342
/*!
83648343
* \brief Start the timer for profiling subroutines.
@@ -8401,7 +8380,7 @@ class CConfig {
84018380
*
84028381
* \brief Set freestream turbonormal for initializing solution.
84038382
*/
8404-
void SetFreeStreamTurboNormal(su2double* turboNormal);
8383+
void SetFreeStreamTurboNormal(const su2double* turboNormal);
84058384

84068385
/*!
84078386
*

Common/include/CMultiGridQueue.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ using namespace std;
4141
*/
4242
class CMultiGridQueue {
4343
private:
44-
vector<CFastFindAndEraseQueue<> > QueueCV; /*!< \brief Queue structure to choose the next control volume in the agglomeration process. */
45-
vector<short> Priority; /*!< \brief The priority is based on the number of pre-agglomerated neighbors. */
46-
vector<char> RightCV; /*!< \brief In the lowest priority there are some CV that can not be agglomerated, this is the way to identify them. */
47-
const unsigned long nPoint = 0; /*!< \brief Total number of points. */
44+
using QueueType = CFastFindAndEraseQueue<>;
45+
vector<QueueType> QueueCV; /*!< \brief Queue structure to choose the next control volume in the agglomeration process. */
46+
vector<short> Priority; /*!< \brief The priority is based on the number of pre-agglomerated neighbors. */
47+
vector<char> RightCV; /*!< \brief In the lowest priority there are some CV that can not be agglomerated, this is the way to identify them. */
48+
const unsigned long nPoint = 0; /*!< \brief Total number of points. */
4849

4950
/*!
5051
* \brief Throw error with error message that the point is not in the priority list.

0 commit comments

Comments
 (0)