Skip to content

Commit b10e2c8

Browse files
authored
Merge branch 'develop' into update_catch2
2 parents 331108d + ee06fba commit b10e2c8

32 files changed

+2112
-89
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/regression.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
with:
130130
# -t <Tutorials-branch> -c <Testcases-branch>
131131
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
132-
- name: Cleanup
132+
- name: Cleanup
133133
uses: docker://ghcr.io/su2code/su2/test-su2:220614-1237
134134
with:
135135
entrypoint: /bin/rm
@@ -192,12 +192,31 @@ jobs:
192192
done
193193
find $BIN_FOLDER -type f -exec chmod a+x '{}' \;
194194
ls -lahR $BIN_FOLDER
195+
echo "cloning branch"
196+
branch="${{github.ref}}"
197+
name="SU2"
198+
SRC_FOLDER="$PWD/src"
199+
mkdir -p $SRC_FOLDER
200+
cd $SRC_FOLDER
201+
git clone --recursive --depth=1 --shallow-submodules https://github.com/su2code/SU2 $name
202+
cd $name
203+
git config --add remote.origin.fetch '+refs/pull/*/merge:refs/remotes/origin/refs/pull/*/merge'
204+
git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/refs/heads/*'
205+
git fetch origin --depth=1 $branch:$branch
206+
git checkout $branch
207+
git submodule update
208+
echo $PWD
209+
ls -lahR
210+
cd ..
211+
echo "done cloning"
212+
echo $PWD
213+
ls -lahR
195214
- name: Run Unit Tests
196215
uses: docker://ghcr.io/su2code/su2/test-su2:220614-1237
197216
with:
198217
entrypoint: install/bin/${{matrix.testdriver}}
199-
- name: Post Cleanup
218+
- name: Post Cleanup
200219
uses: docker://ghcr.io/su2code/su2/test-su2:220614-1237
201220
with:
202221
entrypoint: /bin/rm
203-
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
222+
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}

Common/include/CConfig.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ class CConfig {
445445

446446
bool ReorientElements; /*!< \brief Flag for enabling element reorientation. */
447447
string CustomObjFunc; /*!< \brief User-defined objective function. */
448+
string CustomOutputs; /*!< \brief User-defined functions for outputs. */
448449
unsigned short nDV, /*!< \brief Number of design variables. */
449450
nObj, nObjW; /*! \brief Number of objective functions. */
450451
unsigned short* nDV_Value; /*!< \brief Number of values for each design variable (might be different than 1 if we allow arbitrary movement). */
@@ -5224,6 +5225,11 @@ class CConfig {
52245225
*/
52255226
const string& GetCustomObjFunc() const { return CustomObjFunc; }
52265227

5228+
/*!
5229+
* \brief Get the user expressions for custom outputs.
5230+
*/
5231+
const string& GetCustomOutputs() const { return CustomOutputs; }
5232+
52275233
/*!
52285234
* \brief Get the kind of sensitivity smoothing technique.
52295235
* \return Kind of sensitivity smoothing technique.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*!
2+
* \file CFileReaderLUT.hpp
3+
* \brief reading lookup table for tabulated fluid properties
4+
* \author D. Mayer, T. Economon
5+
* \version 7.3.1 "Blackbird"
6+
*
7+
* SU2 Project Website: https://su2code.github.io
8+
*
9+
* The SU2 Project is maintained by the SU2 Foundation
10+
* (http://su2foundation.org)
11+
*
12+
* Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md)
13+
*
14+
* SU2 is free software; you can redistribute it and/or
15+
* modify it under the terms of the GNU Lesser General Public
16+
* License as published by the Free Software Foundation; either
17+
* version 2.1 of the License, or (at your option) any later version.
18+
*
19+
* SU2 is distributed in the hope that it will be useful,
20+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22+
* Lesser General Public License for more details.
23+
*
24+
* You should have received a copy of the GNU Lesser General Public
25+
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26+
*/
27+
#pragma once
28+
29+
#include <fstream>
30+
#include <string>
31+
#include <vector>
32+
33+
#include "../../Common/include/parallelization/mpi_structure.hpp"
34+
#include "../../../Common/include/linear_algebra/blas_structure.hpp"
35+
#include "../../../Common/include/toolboxes/CSquareMatrixCM.hpp"
36+
37+
class CFileReaderLUT {
38+
protected:
39+
int rank;
40+
41+
std::string version_lut;
42+
std::string version_reader;
43+
unsigned long n_points;
44+
unsigned long n_triangles;
45+
unsigned long n_hull_points;
46+
unsigned long n_variables;
47+
48+
/*! \brief Holds the variable names stored in the table file.
49+
* Order is in sync with tableFlamelet.
50+
*/
51+
std::vector<std::string> names_var;
52+
53+
/*! \brief Holds all data stored in the table.
54+
* First index addresses the variable while second index addresses the point.
55+
*/
56+
su2activematrix table_data;
57+
58+
su2matrix<unsigned long> triangles;
59+
60+
std::vector<unsigned long> hull;
61+
62+
std::string SkipToFlag(std::ifstream* file_stream, const std::string& flag);
63+
64+
public:
65+
CFileReaderLUT(){};
66+
67+
inline const std::string& GetVersionLUT() const { return version_lut; }
68+
inline const std::string& GetVersionReader() const { return version_reader; }
69+
inline unsigned long GetNPoints() const { return n_points; }
70+
inline unsigned long GetNTriangles() const { return n_triangles; }
71+
inline unsigned long GetNHullPoints() const { return n_hull_points; }
72+
inline unsigned long GetNVariables() const { return n_variables; }
73+
74+
inline const std::vector<std::string>& GetNamesVar() const { return names_var; }
75+
76+
inline const su2activematrix& GetTableData() const { return table_data; }
77+
78+
inline const su2matrix<unsigned long>& GetTriangles() const { return triangles; };
79+
80+
inline const std::vector<unsigned long>& GetHull() const { return hull; };
81+
82+
void ReadRawDRG(const std::string& file_name);
83+
};

0 commit comments

Comments
 (0)