Skip to content

Commit 7b2dc5b

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature_libROM
2 parents 69387e7 + 6704f5c commit 7b2dc5b

23 files changed

Lines changed: 624 additions & 1462 deletions

Common/include/CConfig.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,8 @@ class CConfig {
11191119

11201120
unsigned long edgeColorGroupSize; /*!< \brief Size of the edge groups colored for OpenMP parallelization of edge loops. */
11211121

1122-
unsigned short Kind_InletInterpolationFunction; /*!brief type of spanwise interpolation function to use for the inlet face. */
1123-
unsigned short Kind_Inlet_InterpolationType; /*!brief type of spanwise interpolation data to use for the inlet face. */
1122+
INLET_SPANWISE_INTERP Kind_InletInterpolationFunction; /*!brief type of spanwise interpolation function to use for the inlet face. */
1123+
INLET_INTERP_TYPE Kind_Inlet_InterpolationType; /*!brief type of spanwise interpolation data to use for the inlet face. */
11241124
bool PrintInlet_InterpolatedData; /*!brief option for printing the interpolated data file. */
11251125

11261126
/*--- libROM configure options ---*/
@@ -8742,12 +8742,12 @@ class CConfig {
87428742
/*!
87438743
* \brief Get the kind of inlet face interpolation function to use.
87448744
*/
8745-
inline unsigned short GetKindInletInterpolationFunction(void) const { return Kind_InletInterpolationFunction; }
8745+
inline INLET_SPANWISE_INTERP GetKindInletInterpolationFunction(void) const { return Kind_InletInterpolationFunction; }
87468746

87478747
/*!
87488748
* \brief Get the kind of inlet face interpolation data type.
87498749
*/
8750-
inline unsigned short GetKindInletInterpolationType (void) const { return Kind_Inlet_InterpolationType; }
8750+
inline INLET_INTERP_TYPE GetKindInletInterpolationType (void) const { return Kind_Inlet_InterpolationType; }
87518751

87528752
/*!
87538753
* \brief Get whether to print inlet interpolated data or not.

Common/include/geometry/CGeometry.hpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,26 +1198,6 @@ class CGeometry {
11981198
*/
11991199
inline vector<vector<unsigned long> > GetPlanarPoints() const {return Plane_points;}
12001200

1201-
/*!
1202-
* \brief Given arrays x[1..n] and y[1..n] containing a tabulated function, i.e., yi = f(xi), with
1203-
x1 < x2 < . . . < xN , and given values yp1 and ypn for the first derivative of the interpolating
1204-
function at points 1 and n, respectively, this routine returns an array y2[1..n] that contains
1205-
the second derivatives of the interpolating function at the tabulated points xi. If yp1 and/or
1206-
ypn are equal to 1 × 1030 or larger, the routine is signaled to set the corresponding boundary
1207-
condition for a natural spline, with zero second derivative on that boundary.
1208-
Numerical Recipes: The Art of Scientific Computing, Third Edition in C++.
1209-
*/
1210-
void SetSpline(vector<su2double> &x, vector<su2double> &y, unsigned long n, su2double yp1, su2double ypn, vector<su2double> &y2);
1211-
1212-
/*!
1213-
* \brief Given the arrays xa[1..n] and ya[1..n], which tabulate a function (with the xai’s in order),
1214-
and given the array y2a[1..n], which is the output from spline above, and given a value of
1215-
x, this routine returns a cubic-spline interpolated value y.
1216-
Numerical Recipes: The Art of Scientific Computing, Third Edition in C++.
1217-
* \return The interpolated value of for x.
1218-
*/
1219-
su2double GetSpline(vector<su2double> &xa, vector<su2double> &ya, vector<su2double> &y2a, unsigned long n, su2double x);
1220-
12211201
/*!
12221202
* \brief Compute the intersection between a segment and a plane.
12231203
* \param[in] Segment_P0 - Definition of the particular problem.

Common/include/linear_algebra/blas_structure.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,31 @@ class CBlasStructure {
482482
}
483483
}
484484

485+
/*!
486+
* \brief Algorithm to solve a linear system with a tridiagonal matrix.
487+
* \param[in] lower - lower diagonal
488+
* \param[in] main - main diagonal
489+
* \param[in,out] upper - upper diagonal (modified on exit)
490+
* \param[in,out] rhs - right hand side on entry, solution on exit
491+
* \note Same size for all vectors. Use row index for lower and upper vector (e.g. lower[0] does not matter).
492+
*/
493+
template<class Vec, class Scalar = su2double>
494+
static void tdma(const Vec& lower, const Vec& main, Vec& upper, Vec& rhs) {
495+
const int N = main.size();
496+
497+
upper[0] /= main[0];
498+
rhs[0] /= main[0];
499+
500+
for (int i=1; i<N; i++) {
501+
const Scalar denom = 1.0 / (main[i]-lower[i]*upper[i-1]);
502+
upper[i] *= denom;
503+
rhs[i] = (rhs[i]-lower[i]*rhs[i-1])*denom;
504+
}
505+
506+
for (int i=N-2; i>=0; i--)
507+
rhs[i] -= upper[i]*rhs[i+1];
508+
}
509+
485510
private:
486511

487512
#if !(defined(HAVE_LIBXSMM) || defined(HAVE_BLAS) || defined(HAVE_MKL)) || (defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE))

0 commit comments

Comments
 (0)