Skip to content

Commit 2f37e98

Browse files
authored
Merge pull request #2102 from su2code/prepare_for_v8
Prepare release scripts for version 8
2 parents f26b292 + 0758281 commit 2f37e98

45 files changed

Lines changed: 109 additions & 103 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/change-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
id: extract_branch
1717
- name: Change the version number
1818
run: |
19-
SU2_PY/change_version_number.py -v ${GITHUB_REF##*/release_v} -r Blackbird -y
19+
SU2_PY/change_version_number.py -v ${GITHUB_REF##*/release_v} -r Harrier -y
2020
- name: Commit files
2121
run: |
2222
git config --local user.email "action@github.com"

Common/src/CConfig.cpp

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,41 +3226,41 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) {
32263226

32273227
void CConfig::SetHeader(SU2_COMPONENT val_software) const{
32283228

3229-
if ((iZone == 0) && (rank == MASTER_NODE)){
3230-
cout << endl << "-------------------------------------------------------------------------" << endl;
3231-
cout << "| ___ _ _ ___ |" << endl;
3232-
cout << "| / __| | | |_ ) Release 7.5.1 \"Blackbird\" |" << endl;
3233-
cout << "| \\__ \\ |_| |/ / |" << endl;
3229+
if ((iZone == 0) && (rank == MASTER_NODE)) {
3230+
cout << "\n";
3231+
cout << "-------------------------------------------------------------------------\n";
3232+
cout << "| ___ _ _ ___ |\n";
3233+
cout << "| / __| | | |_ ) Release 7.5.1 \"Blackbird\" |\n";
3234+
cout << "| \\__ \\ |_| |/ / |\n";
32343235
switch (val_software) {
3235-
case SU2_COMPONENT::SU2_CFD: cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |" << endl; break;
3236-
case SU2_COMPONENT::SU2_DEF: cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |" << endl; break;
3237-
case SU2_COMPONENT::SU2_DOT: cout << "| |___/\\___//___| Suite (Gradient Projection Code) |" << endl; break;
3238-
case SU2_COMPONENT::SU2_GEO: cout << "| |___/\\___//___| Suite (Geometry Definition Code) |" << endl; break;
3239-
case SU2_COMPONENT::SU2_SOL: cout << "| |___/\\___//___| Suite (Solution Exporting Code) |" << endl; break;
3240-
}
3241-
3242-
cout << "| |" << endl;
3243-
cout <<"-------------------------------------------------------------------------" << endl;
3244-
cout << "| SU2 Project Website: https://su2code.github.io |" << endl;
3245-
cout << "| |" << endl;
3246-
cout << "| The SU2 Project is maintained by the SU2 Foundation |" << endl;
3247-
cout << "| (http://su2foundation.org) |" << endl;
3248-
cout <<"-------------------------------------------------------------------------" << endl;
3249-
cout << "| Copyright 2012-2023, SU2 Contributors |" << endl;
3250-
cout << "| |" << endl;
3251-
cout << "| SU2 is free software; you can redistribute it and/or |" << endl;
3252-
cout << "| modify it under the terms of the GNU Lesser General Public |" << endl;
3253-
cout << "| License as published by the Free Software Foundation; either |" << endl;
3254-
cout << "| version 2.1 of the License, or (at your option) any later version. |" << endl;
3255-
cout << "| |" << endl;
3256-
cout << "| SU2 is distributed in the hope that it will be useful, |" << endl;
3257-
cout << "| but WITHOUT ANY WARRANTY; without even the implied warranty of |" << endl;
3258-
cout << "| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |" << endl;
3259-
cout << "| Lesser General Public License for more details. |" << endl;
3260-
cout << "| |" << endl;
3261-
cout << "| You should have received a copy of the GNU Lesser General Public |" << endl;
3262-
cout << "| License along with SU2. If not, see <http://www.gnu.org/licenses/>. |" << endl;
3263-
cout <<"-------------------------------------------------------------------------" << endl;
3236+
case SU2_COMPONENT::SU2_CFD: cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |\n"; break;
3237+
case SU2_COMPONENT::SU2_DEF: cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |\n"; break;
3238+
case SU2_COMPONENT::SU2_DOT: cout << "| |___/\\___//___| Suite (Gradient Projection Code) |\n"; break;
3239+
case SU2_COMPONENT::SU2_GEO: cout << "| |___/\\___//___| Suite (Geometry Definition Code) |\n"; break;
3240+
case SU2_COMPONENT::SU2_SOL: cout << "| |___/\\___//___| Suite (Solution Exporting Code) |\n"; break;
3241+
}
3242+
cout << "| |\n";
3243+
cout << "-------------------------------------------------------------------------\n";
3244+
cout << "| SU2 Project Website: https://su2code.github.io |\n";
3245+
cout << "| |\n";
3246+
cout << "| The SU2 Project is maintained by the SU2 Foundation |\n";
3247+
cout << "| (http://su2foundation.org) |\n";
3248+
cout << "-------------------------------------------------------------------------\n";
3249+
cout << "| Copyright 2012-2023, SU2 Contributors |\n";
3250+
cout << "| |\n";
3251+
cout << "| SU2 is free software; you can redistribute it and/or |\n";
3252+
cout << "| modify it under the terms of the GNU Lesser General Public |\n";
3253+
cout << "| License as published by the Free Software Foundation; either |\n";
3254+
cout << "| version 2.1 of the License, or (at your option) any later version. |\n";
3255+
cout << "| |\n";
3256+
cout << "| SU2 is distributed in the hope that it will be useful, |\n";
3257+
cout << "| but WITHOUT ANY WARRANTY; without even the implied warranty of |\n";
3258+
cout << "| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |\n";
3259+
cout << "| Lesser General Public License for more details. |\n";
3260+
cout << "| |\n";
3261+
cout << "| You should have received a copy of the GNU Lesser General Public |\n";
3262+
cout << "| License along with SU2. If not, see <http://www.gnu.org/licenses/>. |\n";
3263+
cout << "-------------------------------------------------------------------------" << endl;
32643264
}
32653265

32663266
}

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ void CFlowOutput::LoadHistoryDataScalar(const CConfig* config, const CSolver* co
12391239

12401240
void CFlowOutput::SetVolumeOutputFieldsScalarSolution(const CConfig* config){
12411241
/*--- Only place outputs of the "SOLUTION" group here. ---*/
1242-
1242+
12431243
switch (TurbModelFamily(config->GetKind_Turb_Model())) {
12441244
case TURB_FAMILY::SA:
12451245
AddVolumeOutput("NU_TILDE", "Nu_Tilde", "SOLUTION", "Spalart-Allmaras variable");
@@ -2594,13 +2594,13 @@ void CFlowOutput::WriteForcesBreakdown(const CConfig* config, const CSolver* flo
25942594
ofstream file;
25952595
file.open(fileName);
25962596

2597-
file << "\n-------------------------------------------------------------------------\n";
2597+
file << "\n";
2598+
file << "-------------------------------------------------------------------------\n";
25982599
file << "| ___ _ _ ___ |\n";
25992600
file << "| / __| | | |_ ) Release 7.5.1 \"Blackbird\" |\n";
26002601
file << "| \\__ \\ |_| |/ / |\n";
26012602
file << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |\n";
26022603
file << "| |\n";
2603-
// file << "| Local date and time: " << dt << " |\n";
26042604
file << "-------------------------------------------------------------------------\n";
26052605
file << "| SU2 Project Website: https://su2code.github.io |\n";
26062606
file << "| |\n";

SU2_PY/change_version_number.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,17 @@
110110

111111
# Loop through and correct all files
112112
for fname in filelist:
113-
s = open(fname, "r").read()
114-
s_new = s.replace(oldvers, newvers)
115-
s_new = s_new.replace(oldvers_q, newvers_q)
116-
f = open(fname, "w")
117-
f.write(s_new)
118-
f.close()
113+
with open(fname, "r") as f:
114+
lines = f.readlines()
115+
for i, line in enumerate(lines):
116+
for old, new in zip((oldvers, oldvers_q), (newvers, newvers_q)):
117+
# Avoid breaking the formating of some headers
118+
if old + " " in line:
119+
n = len(new) - len(old)
120+
lines[i] = line.replace(old + " " * max(0, n), new + " " * max(0, -n))
121+
elif old in line:
122+
lines[i] = line.replace(old, new)
123+
with open(fname, "w") as f:
124+
f.writelines(lines)
119125

120126
os.system("rm -rf version.txt")

TestCases/aeroelastic/aeroelastic_NACA64A010.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
% Author: Santiago Padron %
66
% Institution: Stanford University %
77
% Date: 07-09-15 %
8-
% File Version 7.5.1 "Blackbird" %
8+
% File Version 7.5.1 "Blackbird" %
99
% %
1010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1111

TestCases/cont_adj_euler/naca0012/inv_NACA0012.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
% Author: Thomas D. Economon %
66
% Institution: Stanford University %
77
% Date: 2011.11.02 %
8-
% File Version 7.5.1 "Blackbird" %
8+
% File Version 7.5.1 "Blackbird" %
99
% %
1010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1111

TestCases/cont_adj_euler/naca0012/inv_NACA0012_FD.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
% Author: Thomas D. Economon %
66
% Institution: Stanford University %
77
% Date: 2011.11.02 %
8-
% File Version 7.5.1 "Blackbird" %
8+
% File Version 7.5.1 "Blackbird" %
99
% %
1010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1111

TestCases/cont_adj_euler/naca0012/inv_NACA0012_discadj.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
% Author: Thomas D. Economon %
66
% Institution: Stanford University %
77
% Date: 2011.11.02 %
8-
% File Version 7.5.1 "Blackbird" %
8+
% File Version 7.5.1 "Blackbird" %
99
% %
1010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1111

TestCases/cont_adj_euler/wedge/inv_wedge_ROE.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
% Author: Thomas D. Economon %
66
% Institution: Stanford University %
77
% Date: 2012.10.07 %
8-
% File Version 7.5.1 "Blackbird" %
8+
% File Version 7.5.1 "Blackbird" %
99
% %
1010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1111

@@ -107,7 +107,7 @@ GRAD_OBJFUNC_FILENAME= of_grad.dat
107107
SURFACE_FILENAME= surface_flow
108108
SURFACE_ADJ_FILENAME= surface_adjoint
109109
OUTPUT_WRT_FREQ= 250
110-
SCREEN_OUTPUT = (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_ENERGY, SENS_GEO, SENS_AOA)
110+
SCREEN_OUTPUT = (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_ENERGY, SENS_GEO, SENS_AOA)
111111
OUTPUT_FILES=(RESTART_ASCII)
112112

113113
% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------%

TestCases/cont_adj_euler/wedge/inv_wedge_ROE_multiobj.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
% Author: H.L. Kline, modified from inviscid wedge by Thomas D. Economon %
77
% Institution: Stanford University %
88
% Date: 2018.01.07 %
9-
% File Version 7.5.1 "Blackbird" %
9+
% File Version 7.5.1 "Blackbird" %
1010
% %
1111
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1212

0 commit comments

Comments
 (0)