-
Notifications
You must be signed in to change notification settings - Fork 919
Add look-up table class #1637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add look-up table class #1637
Changes from all commits
Commits
Show all changes
120 commits
Select commit
Hold shift + click to select a range
4aab1e4
initial commit, adding files
bigfooted 1202a60
added files to makefile and meson
bigfooted 8d88fa9
run through clang-format
bigfooted 15fb1aa
end files with newline
bigfooted d69b5a7
Update SU2_CFD/include/numerics/CFileReaderLUT.hpp
bigfooted c439501
namespace to header file
bigfooted 9bb027f
Merge branch 'develop' into feature_lookuptable
bigfooted 0b7fdb0
Merge branch 'develop' into feature_lookuptable
bigfooted 7cb4919
Merge branch 'develop' into feature_lookuptable
bigfooted 1b00541
Merge branch 'develop' into feature_lookuptable
bigfooted f4186f6
Merge branch 'develop' into feature_lookuptable
bigfooted 9bc6b93
Update SU2_CFD/include/numerics/CFileReaderLUT.hpp
bigfooted 906a5e6
Update SU2_CFD/include/numerics/CLookUpTable.hpp
bigfooted e6ac5d4
Update SU2_CFD/src/numerics/CLookUpTable.cpp
bigfooted b47cec2
Update SU2_CFD/include/numerics/CLookUpTable.hpp
bigfooted 5ee571d
Update SU2_CFD/src/numerics/CTrapezoidalMap.cpp
bigfooted a05cb46
Update SU2_CFD/src/numerics/CTrapezoidalMap.cpp
bigfooted 87eacd3
removed local implementation of gaussian inverse, added initial unit-…
bigfooted a6ad793
Update SU2_CFD/include/numerics/CLookUpTable.hpp
bigfooted b6ebb65
change .at in vectors, moved hpp to containers
bigfooted 48672f2
corrected path to hpp files
bigfooted 29889ca
move files to containers folder
bigfooted d479e0e
Merge branch 'develop' into feature_lookuptable
bigfooted d25356d
move files to containers, including lookup table
bigfooted 97c73d4
Merge branch 'feature_lookuptable' of https://github.com/su2code/SU2 …
bigfooted e3efa4e
introduce su2matrix for table_data
bigfooted 5d47c6d
remove unused variable Weights, introduce std::array for fixed size a…
bigfooted efec5c4
changed triangle into su2matrix
bigfooted 8166d65
cleaned up some unused code
bigfooted 13879e0
Merge branch 'develop' into feature_lookuptable
bigfooted e6b75b4
Update Common/include/containers/CLookUpTable.hpp
bigfooted de732fd
Merge branch 'develop' into feature_lookuptable
bigfooted fae6586
get rid of vector<vector> for table_data
bigfooted 0f428bb
merged with remote
bigfooted 8f5b214
change edge_to_triangle to std::array
bigfooted f752a0a
remove std namespace from header files and using std::array and std::…
bigfooted 92931c1
remove unnecessary includes
bigfooted 9c79fd2
Update Common/src/containers/CTrapezoidalMap.cpp
bigfooted 362968c
Merge branch 'develop' into feature_lookuptable
bigfooted b636cdd
Merge branch 'develop' into feature_lookuptable
bigfooted 3fea3dc
update lookuptable unit tests
bigfooted f7b1a47
Merge branch 'feature_lookuptable' of https://github.com/su2code/SU2 …
bigfooted 39887d6
switch off lookup table tests
bigfooted 2b9cfb6
compile empty lookuptable test
bigfooted bbf5de1
compile lookuptable test
bigfooted d2e03d9
compile lookuptable test
bigfooted ded6290
compile empty lookuptable test
bigfooted a03e1dc
compile empty lookuptable test
bigfooted 282eb51
compile empty lookuptable test
bigfooted e2091c5
compile empty lookuptable test
bigfooted 568cbfc
compile empty lookuptable test
bigfooted fcdb238
compile empty lookuptable test
bigfooted 428d2d3
compile entire lookuptable test
bigfooted 0863c11
compile empty lookuptable test
bigfooted ac16207
Merge branch 'develop' into feature_lookuptable
bigfooted 8f2c15e
Merge branch 'develop' into feature_lookuptable
bigfooted 08e884c
switched off unit test
bigfooted 320e593
switched off unit test
bigfooted 72904a5
Merge branch 'develop' into feature_lookuptable
bigfooted 471c21d
unit test change
bigfooted b52eafe
Merge branch 'feature_lookuptable' of https://github.com/su2code/SU2 …
bigfooted 3f91c32
unit test change
bigfooted 0878e08
Merge branch 'develop' into feature_lookuptable
bigfooted a36bb69
unit test change
bigfooted c1c23f8
unit test change
bigfooted 6a0120b
unit test change
bigfooted 577d075
Merge branch 'develop' into feature_lookuptable
bigfooted 8feb96a
unit test change
bigfooted 74350c4
Merge branch 'feature_lookuptable' of https://github.com/su2code/SU2 …
bigfooted 1172cdf
unit test change
bigfooted c030e73
unit test change
bigfooted 68ac2df
unit test change
bigfooted 6d3c0b6
unit test change
bigfooted dd9a6f0
unit test change
bigfooted e008afe
unit test change
bigfooted 30c7f09
unit test change
bigfooted 8c62d03
unit test change
bigfooted 2df8425
unit test change
bigfooted eb5ead1
unit test change
bigfooted 22e61f0
unit test change
bigfooted d6be81d
unit test change
bigfooted 07b34a9
unit test change
bigfooted cdb3b28
unit test change
bigfooted 04ce02d
unit test change
bigfooted 5ecf615
unit test change
bigfooted f413aa6
unit test change
bigfooted 5f22ddf
unit test change
bigfooted 57bb5c1
unit test change
bigfooted 404f2af
Merge branch 'develop' into feature_lookuptable
bigfooted d0d9995
unit test change
bigfooted f3afd67
Merge branch 'feature_lookuptable' of https://github.com/su2code/SU2 …
bigfooted ceb0fe0
unit test change
bigfooted cd19560
removed large unit test, kept small unit test for lookup table
bigfooted cbadcfe
fix lookup table
bigfooted 1536e25
fix lookup table
bigfooted cc8253c
fix unit regression values
bigfooted ad89252
modified some comments
bigfooted d046e0d
fixed unsigned int
bigfooted 27f0721
fix unit regression values
bigfooted f4c1764
Merge branch 'develop' into feature_lookuptable
bigfooted b488130
Update Common/include/containers/CFileReaderLUT.hpp
bigfooted 00f9228
Update Common/include/containers/CLookUpTable.hpp
bigfooted c62c730
Update Common/include/containers/CLookUpTable.hpp
bigfooted 45667a8
Update Common/include/containers/CTrapezoidalMap.hpp
bigfooted 9d153ba
Update Common/include/containers/CLookUpTable.hpp
bigfooted a92573b
Update Common/include/containers/CLookUpTable.hpp
bigfooted 0b6147e
Update Common/include/containers/CTrapezoidalMap.hpp
bigfooted 4246b8c
Update UnitTests/Common/containers/CLookupTable_tests.cpp
bigfooted 4cbc4fa
Update Common/src/containers/CFileReaderLUT.cpp
bigfooted 6b862f1
added descriptions of class functions, used mpi::wtime, make some cla…
bigfooted 3c0d0fb
remove using namespace std
bigfooted 1e49f4f
Update Common/include/containers/CLookUpTable.hpp
bigfooted 933fa7a
Update Common/include/containers/CLookUpTable.hpp
bigfooted 3bd230d
added additional info, removed lookup table identifier
bigfooted 67ab22c
Merge branch 'feature_lookuptable' of https://github.com/su2code/SU2 …
bigfooted 570163c
fix const
bigfooted 3bf6243
fix lookuptable_test roundoff value
bigfooted def34ab
fix lookuptable_test roundoff value
bigfooted e3d15ce
fix lookuptable_test roundoff value
bigfooted 50fcedd
remove namespace std
bigfooted File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| /*! | ||
| * \file CFileReaderLUT.hpp | ||
| * \brief reading lookup table for tabulated fluid properties | ||
| * \author D. Mayer, T. Economon | ||
| * \version 7.3.1 "Blackbird" | ||
| * | ||
| * SU2 Project Website: https://su2code.github.io | ||
| * | ||
| * The SU2 Project is maintained by the SU2 Foundation | ||
| * (http://su2foundation.org) | ||
| * | ||
| * Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md) | ||
| * | ||
| * SU2 is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * SU2 is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with SU2. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
| #pragma once | ||
|
|
||
| #include <fstream> | ||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| #include "../../Common/include/parallelization/mpi_structure.hpp" | ||
| #include "../../../Common/include/linear_algebra/blas_structure.hpp" | ||
| #include "../../../Common/include/toolboxes/CSquareMatrixCM.hpp" | ||
|
|
||
| class CFileReaderLUT { | ||
bigfooted marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| protected: | ||
| int rank; | ||
|
|
||
| std::string version_lut; | ||
| std::string version_reader; | ||
| unsigned long n_points; | ||
| unsigned long n_triangles; | ||
| unsigned long n_hull_points; | ||
| unsigned long n_variables; | ||
|
|
||
| /*! \brief Holds the variable names stored in the table file. | ||
| * Order is in sync with tableFlamelet. | ||
| */ | ||
| std::vector<std::string> names_var; | ||
|
|
||
| /*! \brief Holds all data stored in the table. | ||
| * First index addresses the variable while second index addresses the point. | ||
| */ | ||
| su2activematrix table_data; | ||
|
|
||
| su2matrix<unsigned long> triangles; | ||
|
|
||
| std::vector<unsigned long> hull; | ||
|
|
||
| std::string SkipToFlag(std::ifstream* file_stream, const std::string& flag); | ||
|
|
||
| public: | ||
| CFileReaderLUT(){}; | ||
|
|
||
| inline const std::string& GetVersionLUT() const { return version_lut; } | ||
| inline const std::string& GetVersionReader() const { return version_reader; } | ||
| inline unsigned long GetNPoints() const { return n_points; } | ||
| inline unsigned long GetNTriangles() const { return n_triangles; } | ||
| inline unsigned long GetNHullPoints() const { return n_hull_points; } | ||
| inline unsigned long GetNVariables() const { return n_variables; } | ||
|
|
||
| inline const std::vector<std::string>& GetNamesVar() const { return names_var; } | ||
|
|
||
| inline const su2activematrix& GetTableData() const { return table_data; } | ||
|
|
||
| inline const su2matrix<unsigned long>& GetTriangles() const { return triangles; }; | ||
|
|
||
| inline const std::vector<unsigned long>& GetHull() const { return hull; }; | ||
|
|
||
| void ReadRawDRG(const std::string& file_name); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,267 @@ | ||
| /*! | ||
| * \file CLookupTable.hpp | ||
| * \brief tabulation of fluid properties | ||
| * \author D. Mayer, T. Economon | ||
| * \version 7.3.1 "Blackbird" | ||
| * | ||
| * SU2 Project Website: https://su2code.github.io | ||
| * | ||
| * The SU2 Project is maintained by the SU2 Foundation | ||
| * (http://su2foundation.org) | ||
| * | ||
| * Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md) | ||
| * | ||
| * SU2 is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * SU2 is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with SU2. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <iomanip> | ||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| #include "../../Common/include/option_structure.hpp" | ||
| #include "CFileReaderLUT.hpp" | ||
| #include "CTrapezoidalMap.hpp" | ||
|
|
||
| class CLookUpTable { | ||
| protected: | ||
| int rank; /*!< \brief MPI Rank. */ | ||
|
|
||
| std::string file_name_lut; | ||
| std::string version_lut; | ||
| std::string version_reader; | ||
| unsigned long n_points; | ||
| unsigned long n_triangles; | ||
| unsigned long n_variables; | ||
| unsigned long n_hull_points; | ||
|
|
||
| /*! | ||
| * \brief the lower and upper limits of the enthalpy and progress variable. | ||
| */ | ||
| su2double limits_table_enth[2]; | ||
| su2double limits_table_prog[2]; | ||
|
|
||
| /*! \brief Holds the variable names stored in the table file. | ||
| * Order is in sync with data | ||
| */ | ||
| std::vector<std::string> names_var; | ||
|
|
||
| /*! \brief | ||
| * Holds all data stored in the table. First index addresses the variable | ||
| * while second index addresses the point. | ||
| */ | ||
| su2activematrix table_data; | ||
|
|
||
| su2matrix<unsigned long> triangles; | ||
|
|
||
| /* we do not know this size in advance until we go through the entire lookup table */ | ||
| std::vector<std::vector<unsigned long> > edges; | ||
| std::vector<std::vector<unsigned long> > edge_to_triangle; | ||
|
|
||
| /*! \brief | ||
| * The hull contains the boundary of the lookup table. | ||
| */ | ||
| std::vector<unsigned long> hull; | ||
|
|
||
| CTrapezoidalMap trap_map_prog_enth; | ||
|
|
||
| /*! \brief | ||
| * vector of all the weight factors for the interpolation. | ||
| */ | ||
| std::vector<su2activematrix> interp_mat_inv_prog_enth; | ||
|
|
||
| /*! \brief | ||
| * returns the index to the variable in the lookup table. | ||
| */ | ||
| inline unsigned int GetIndexOfVar(const std::string& nameVar) const { | ||
| int index = find(names_var.begin(), names_var.end(), nameVar) - names_var.begin(); | ||
| if (index == int(names_var.size())) { | ||
| index = -1; | ||
| std::string error_msg = "Variable '"; | ||
| error_msg.append(nameVar); | ||
| error_msg.append("' is not in the lookup table."); | ||
| SU2_MPI::Error(error_msg, CURRENT_FUNCTION); | ||
| } | ||
| return index; | ||
| } | ||
|
|
||
| /*! | ||
| * \brief Get the pointer to the column data of the table (density, temperature, source terms, ...). | ||
| * \returns pointer to the column data. | ||
| */ | ||
| inline const su2double* GetDataP(const std::string& name_var) const { | ||
| return table_data[GetIndexOfVar(name_var)]; | ||
| } | ||
|
|
||
| /*! | ||
| * \brief find the table limits, i.e. the minimum and maximum values of the 2 independent. | ||
| * controlling variables (progress variable and enthalpy). We put the values in the variables. | ||
| * limits_table_prog[2] and limit_table_enth[2]. | ||
| * \param[in] name_prog - the string name for the first controlling variable. | ||
| * \param[in] name_enth - the string name of the second controlling variable. | ||
| */ | ||
| void FindTableLimits(const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief construct a list of all the edges and a list of the pair of elements left and right of the edge. | ||
| */ | ||
| void IdentifyUniqueEdges(); | ||
|
|
||
| /*! | ||
| * \brief read the lookup table from file and store the data. | ||
| * \param[in] file_name_lut - the filename of the lookup table. | ||
| */ | ||
| void LoadTableRaw(const std::string& file_name_lut); | ||
|
|
||
| /*! | ||
| * \brief compute vector of all (inverse) interpolation coefficients "interp_mat_inv_prog_enth" of all triangles. | ||
| * \param[in] name_prog - the string name of the first controlling variable (progress variable). | ||
| * \param[in] name_enth - the string name of the second controlling variable (enthalpy). | ||
| */ | ||
| void ComputeInterpCoeffs(const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief compute the inverse matrix for interpolation. | ||
| * \param[in] vec_x - pointer to first coordinate (progress variable). | ||
| * \param[in] vec_y - pointer to second coordinate (enthalpy). | ||
| * \param[in] point_ids - single triangle data. | ||
| * \param[out] interp_mat_inv - inverse matrix for interpolation. | ||
| */ | ||
| void GetInterpMatInv(const su2double* vec_x, const su2double* vec_y, std::array<unsigned long,3>& point_ids, | ||
| su2activematrix& interp_mat_inv); | ||
|
|
||
| /*! | ||
| * \brief compute the interpolation coefficients for the triangular interpolation. | ||
| * \param[in] val_x - value of first coordinate (progress variable). | ||
| * \param[in] val_y - value of second coordinate (enthalpy). | ||
| * \param[in] interp_mat_inv - inverse matrix for interpolation. | ||
| * \param[out] interp_coeffs - interpolation coefficients. | ||
| */ | ||
| void GetInterpCoeffs(su2double val_x, su2double val_y, su2activematrix& interp_mat_inv, | ||
| std::array<su2double,3>& interp_coeffs); | ||
|
|
||
| /*! | ||
| * \brief compute interpolated value of a point P in the triangle. | ||
| * \param[in] val_samples - pointer to the variable data. | ||
| * \param[in] val_triangle - ID to the triangle. | ||
| * \param[in] val_interp_coeffs - interpolation coefficients using the point data in P. | ||
| * \returns resulting value of the interpolation. | ||
| */ | ||
| su2double Interpolate(const su2double* val_samples, std::array<unsigned long,3>& val_triangle, | ||
| std::array<su2double,3>& val_interp_coeffs); | ||
|
|
||
| /*! | ||
| * \brief find the point on the hull (boundary of the table) that is closest to the point P(val_prog,val_enth). | ||
| * \param[in] val_x - first coordinate of point P(val_x,val_y) to check. | ||
| * \param[in] val_y - second coordinate of point P(val_x,val_y) to check. | ||
| * \param[in] name_prog - string name of the first controlling variable. | ||
| * \param[in] name_enth - string name of the second controlling variable. | ||
| * \returns point id of the nearest neighbor on the hull. | ||
| */ | ||
| unsigned long FindNearestNeighborOnHull(su2double val_prog, su2double val_enth, const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief determine if a point P(val_x,val_y) is inside the triangle val_id_triangle. | ||
| * \param[in] val_x - first coordinate of point P(val_x,val_y) to check. | ||
| * \param[in] val_y - second coordinate of point P(val_x,val_y) to check. | ||
| * \param[in] val_id_triangle - ID of the triangle to check. | ||
| * \param[in] name_prog - string name of the first controlling variable. | ||
| * \param[in] name_enth - string name of the second controlling variable. | ||
| * \returns true if the point is in the triangle, false if it is outside. | ||
| */ | ||
| bool IsInTriangle(su2double val_x, su2double val_y, unsigned long val_id_triangle, const std::string& name_prog, | ||
| const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief compute the area of a triangle given the 3 points of the triangle. | ||
| * \param[in] x1 - the coordinates of the points P1(x1,y1), P2(x2,y2) and P3(x3,y3). | ||
| * \param[in] y1 - the coordinates of the points P1(x1,y1), P2(x2,y2) and P3(x3,y3). | ||
| * \param[in] x2 - the coordinates of the points P1(x1,y1), P2(x2,y2) and P3(x3,y3). | ||
| * \param[in] y2 - the coordinates of the points P1(x1,y1), P2(x2,y2) and P3(x3,y3). | ||
| * \param[in] x3 - the coordinates of the points P1(x1,y1), P2(x2,y2) and P3(x3,y3). | ||
| * \param[in] y3 - the coordinates of the points P1(x1,y1), P2(x2,y2) and P3(x3,y3). | ||
| * \returns the absolute value of the area of the triangle. | ||
| */ | ||
| inline su2double TriArea(su2double x1, su2double y1, su2double x2, su2double y2, su2double x3, su2double y3) { | ||
| return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) * 0.5); | ||
| } | ||
|
|
||
| public: | ||
| CLookUpTable(const std::string& file_name_lut, const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
|
|
||
| /*! | ||
| * \brief print information to screen. | ||
| */ | ||
| void PrintTableInfo(); | ||
|
|
||
| /*! | ||
| * \brief lookup 1 value of the single variable "val_name_var" using controlling variable values(val_prog,val_enth) | ||
| * whose controlling variable names are "name_prog" and "name_enth". | ||
| * \param[in] val_name_var - string name of the variable to look up. | ||
| * \param[out] val_var - the stored value of the variable to look up. | ||
| * \param[in] val_prog - value of controlling variable 1 (progress variable). | ||
| * \param[in] val_enth - value of controlling variable 2 (enthalpy). | ||
| * \param[in] name_prog - string name of controlling variable 1 (progress variable). | ||
| * \param[in] name_enth - string name of controlling variable 2 (enthalpy). | ||
| * \returns 1 if the lookup and subsequent interpolation was a success, 0 if not. | ||
| */ | ||
| unsigned long LookUp_ProgEnth(const std::string& val_name_var, su2double* val_var, su2double val_prog, su2double val_enth, | ||
| const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief lookup 1 value for each of the variables in "val_name_var" using controlling variable values(val_prog,val_enth) | ||
| * whose controlling variable names are "name_prog" and "name_enth". | ||
| * \param[in] val_names_var - vector of string names of the variables to look up. | ||
| * \param[out] val_vars - pointer to the vector of stored values of the variables to look up. | ||
| * \param[in] val_prog - value of controlling variable 1 (progress variable). | ||
| * \param[in] val_enth - value of controlling variable 2 (enthalpy). | ||
| * \param[in] name_prog - string name of controlling variable 1 (progress variable). | ||
| * \param[in] name_enth - string name of controlling variable 2 (enthalpy). | ||
| * \returns 1 if the lookup and subsequent interpolation was a success, 0 if not. | ||
| */ | ||
| unsigned long LookUp_ProgEnth(const std::vector<std::string>& val_names_var, std::vector<su2double*>& val_vars, su2double val_prog, | ||
| su2double val_enth, const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief lookup the value of the variable "val_name_var" using controlling variable values(val_prog,val_enth) | ||
| * whose controlling variable names are "name_prog" and "name_enth". | ||
| * \param[in] val_name_var - string name of the variable to look up. | ||
| * \param[out] val_var - the stored value of the variable to look up. | ||
| * \param[in] val_prog - value of controlling variable 1 (progress variable). | ||
| * \param[in] val_enth - value of controlling variable 2 (enthalpy). | ||
| * \param[in] name_prog - string name of controlling variable 1 (progress variable). | ||
| * \param[in] name_enth - string name of controlling variable 2 (enthalpy). | ||
| * \returns 1 if the lookup and subsequent interpolation was a success, 0 if not. | ||
| */ | ||
| unsigned long LookUp_ProgEnth(const std::vector<std::string>& val_names_var, std::vector<su2double>& val_vars, su2double val_prog, | ||
| su2double val_enth, const std::string& name_prog, const std::string& name_enth); | ||
|
|
||
| /*! | ||
| * \brief determine the minimum and maximum value of the enthalpy (controlling variable 2). | ||
| * \returns pair of minimum and maximum value of controlling variable 2. | ||
| */ | ||
| inline std::pair<su2double, su2double> GetTableLimitsEnth() const { | ||
| return std::make_pair(limits_table_enth[0], limits_table_enth[1]); | ||
| } | ||
|
|
||
| /*! | ||
| * \brief determine the minimum and maximum value of the progress variable (controlling variable 1). | ||
| * \returns pair of minimum and maximum value of controlling variable 1. | ||
| */ | ||
| inline std::pair<su2double, su2double> GetTableLimitsProg() const { | ||
| return std::make_pair(limits_table_prog[0], limits_table_prog[1]); | ||
| } | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.