Skip to content

Commit f771718

Browse files
authored
Merge branch 'develop' into patch-1
2 parents 5c71d90 + 16f3836 commit f771718

761 files changed

Lines changed: 16601 additions & 21526 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.

Common/doc/docmain.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file docmain.hpp
33
* \brief This file contains documentation for Doxygen and does not have any significance with respect to C++.
44
* \author F. Palacios
5-
* \version 7.0.5 "Blackbird"
5+
* \version 7.0.6 "Blackbird"
66
*
77
* The current SU2 release has been coordinated by the
88
* SU2 International Developers Society <www.su2devsociety.org>
@@ -33,7 +33,7 @@
3333
*/
3434

3535
/*!
36-
* \mainpage SU2 version 7.0.5 "Blackbird"
36+
* \mainpage SU2 version 7.0.6 "Blackbird"
3737
* SU2 suite is an open-source collection of C++ based software tools
3838
* to perform PDE analysis and PDE constrained optimization problems. The toolset is designed with
3939
* computational fluid dynamics and aerodynamic shape optimization in mind, but is extensible to

Common/include/CConfig.hpp

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* \brief All the information about the definition of the physical problem.
44
* The subroutines and functions are in the <i>CConfig.cpp</i> file.
55
* \author F. Palacios, T. Economon, B. Tracey
6-
* \version 7.0.5 "Blackbird"
6+
* \version 7.0.6 "Blackbird"
77
*
88
* SU2 Project Website: https://su2code.github.io
99
*
@@ -227,6 +227,7 @@ class CConfig {
227227
bool Inlet_From_File; /*!< \brief True if the inlet profile is to be loaded from a file. */
228228
string Inlet_Filename; /*!< \brief Filename specifying an inlet profile. */
229229
su2double Inlet_Matching_Tol; /*!< \brief Tolerance used when matching a point to a point from the inlet file. */
230+
string ActDisk_FileName; /*!< \brief Filename specifying an actuator disk. */
230231

231232
string *Marker_Euler, /*!< \brief Euler wall markers. */
232233
*Marker_FarField, /*!< \brief Far field markers. */
@@ -395,8 +396,6 @@ class CConfig {
395396
unsigned long OuterIter; /*!< \brief Current Outer iterations for multizone problems. */
396397
unsigned long InnerIter; /*!< \brief Current inner iterations for multizone problems. */
397398
unsigned long TimeIter; /*!< \brief Current time iterations for multizone problems. */
398-
unsigned long Unst_nIntIter; /*!< \brief Number of internal iterations (Dual time Method). */
399-
unsigned long Dyn_nIntIter; /*!< \brief Number of internal iterations (Newton-Raphson Method for nonlinear structural analysis). */
400399
long Unst_RestartIter; /*!< \brief Iteration number to restart an unsteady simulation (Dual time Method). */
401400
long Unst_AdjointIter; /*!< \brief Iteration number to begin the reverse time integration in the direct solver for the unsteady adjoint. */
402401
long Iter_Avg_Objective; /*!< \brief Iteration the number of time steps to be averaged, counting from the back */
@@ -412,6 +411,8 @@ class CConfig {
412411
unsigned short nRKStep; /*!< \brief Number of steps of the explicit Runge-Kutta method. */
413412
su2double *RK_Alpha_Step; /*!< \brief Runge-Kutta beta coefficients. */
414413

414+
unsigned short nQuasiNewtonSamples; /*!< \brief Number of samples used in quasi-Newton solution methods. */
415+
415416
unsigned short nMGLevels; /*!< \brief Number of multigrid levels (coarse levels). */
416417
unsigned short nCFL; /*!< \brief Number of CFL, one for each multigrid level. */
417418
su2double
@@ -727,7 +728,6 @@ class CConfig {
727728
RefElemLength, /*!< \brief Reference element length for computing the slope limiting epsilon. */
728729
RefSharpEdges, /*!< \brief Reference coefficient for detecting sharp edges. */
729730
RefLength, /*!< \brief Reference length for moment computation. */
730-
*RefOriginMoment, /*!< \brief Origin for moment computation. */
731731
*RefOriginMoment_X, /*!< \brief X Origin for moment computation. */
732732
*RefOriginMoment_Y, /*!< \brief Y Origin for moment computation. */
733733
*RefOriginMoment_Z, /*!< \brief Z Origin for moment computation. */
@@ -783,8 +783,6 @@ class CConfig {
783783
unsigned short
784784
Console_Output_Verb, /*!< \brief Level of verbosity for console output */
785785
Kind_Average; /*!< \brief Particular average for the marker analyze. */
786-
unsigned short
787-
nPolyCoeffs; /*!< \brief Number of coefficients in temperature polynomial fits for fluid models. */
788786
su2double Gamma, /*!< \brief Ratio of specific heats of the gas. */
789787
Bulk_Modulus, /*!< \brief Value of the bulk modulus for incompressible flows. */
790788
Beta_Factor, /*!< \brief Value of the epsilon^2 multiplier for Beta for the incompressible preconditioner. */
@@ -818,14 +816,14 @@ class CConfig {
818816
Mu_Temperature_Ref, /*!< \brief Reference temperature for Sutherland model. */
819817
Mu_Temperature_RefND, /*!< \brief Non-dimensional reference temperature for Sutherland model. */
820818
Mu_S, /*!< \brief Reference S for Sutherland model. */
821-
Mu_SND, /*!< \brief Non-dimensional reference S for Sutherland model. */
822-
*CpPolyCoefficients, /*!< \brief Definition of the temperature polynomial coefficients for specific heat Cp. */
823-
*MuPolyCoefficients, /*!< \brief Definition of the temperature polynomial coefficients for viscosity. */
824-
*KtPolyCoefficients, /*!< \brief Definition of the temperature polynomial coefficients for thermal conductivity. */
825-
*CpPolyCoefficientsND, /*!< \brief Definition of the non-dimensional temperature polynomial coefficients for specific heat Cp. */
826-
*MuPolyCoefficientsND, /*!< \brief Definition of the non-dimensional temperature polynomial coefficients for viscosity. */
827-
*KtPolyCoefficientsND, /*!< \brief Definition of the non-dimensional temperature polynomial coefficients for thermal conductivity. */
828-
Thermal_Conductivity_Solid, /*!< \brief Thermal conductivity in solids. */
819+
Mu_SND; /*!< \brief Non-dimensional reference S for Sutherland model. */
820+
su2double* CpPolyCoefficients; /*!< \brief Definition of the temperature polynomial coefficients for specific heat Cp. */
821+
su2double* MuPolyCoefficients; /*!< \brief Definition of the temperature polynomial coefficients for viscosity. */
822+
su2double* KtPolyCoefficients; /*!< \brief Definition of the temperature polynomial coefficients for thermal conductivity. */
823+
array<su2double, N_POLY_COEFFS> CpPolyCoefficientsND{{0.0}}; /*!< \brief Definition of the non-dimensional temperature polynomial coefficients for specific heat Cp. */
824+
array<su2double, N_POLY_COEFFS> MuPolyCoefficientsND{{0.0}}; /*!< \brief Definition of the non-dimensional temperature polynomial coefficients for viscosity. */
825+
array<su2double, N_POLY_COEFFS> KtPolyCoefficientsND{{0.0}}; /*!< \brief Definition of the non-dimensional temperature polynomial coefficients for thermal conductivity. */
826+
su2double Thermal_Conductivity_Solid, /*!< \brief Thermal conductivity in solids. */
829827
Thermal_Diffusivity_Solid, /*!< \brief Thermal diffusivity in solids. */
830828
Temperature_Freestream_Solid, /*!< \brief Temperature in solids at freestream conditions. */
831829
Density_Solid, /*!< \brief Total density in solids. */
@@ -1018,9 +1016,9 @@ class CConfig {
10181016
su2double FinalRotation_Rate_Z; /*!< \brief Final rotation rate Z if Ramp rotating frame is activated. */
10191017
su2double FinalOutletPressure; /*!< \brief Final outlet pressure if Ramp outlet pressure is activated. */
10201018
su2double MonitorOutletPressure; /*!< \brief Monitor outlet pressure if Ramp outlet pressure is activated. */
1021-
su2double *default_cp_polycoeffs; /*!< \brief Array for specific heat polynomial coefficients. */
1022-
su2double *default_mu_polycoeffs; /*!< \brief Array for viscosity polynomial coefficients. */
1023-
su2double *default_kt_polycoeffs; /*!< \brief Array for thermal conductivity polynomial coefficients. */
1019+
array<su2double, N_POLY_COEFFS> default_cp_polycoeffs{{0.0}}; /*!< \brief Array for specific heat polynomial coefficients. */
1020+
array<su2double, N_POLY_COEFFS> default_mu_polycoeffs{{0.0}}; /*!< \brief Array for viscosity polynomial coefficients. */
1021+
array<su2double, N_POLY_COEFFS> default_kt_polycoeffs{{0.0}}; /*!< \brief Array for thermal conductivity polynomial coefficients. */
10241022
su2double *ExtraRelFacGiles; /*!< \brief coefficient for extra relaxation factor for Giles BC*/
10251023
bool Body_Force; /*!< \brief Flag to know if a body force is included in the formulation. */
10261024
su2double *Body_Force_Vector; /*!< \brief Values of the prescribed body force vector. */
@@ -1370,7 +1368,8 @@ class CConfig {
13701368
* \param[in] val_marker - the marker we are monitoring.
13711369
* \return Reference origin (in cartesians coordinates) for moment computation.
13721370
*/
1373-
su2double *GetRefOriginMoment(unsigned short val_marker) {
1371+
std::array<su2double,3> GetRefOriginMoment(unsigned short val_marker) const {
1372+
std::array<su2double,3> RefOriginMoment{{0.0}};
13741373
if(val_marker < nMarker_Monitoring) {
13751374
RefOriginMoment[0] = RefOriginMoment_X[val_marker];
13761375
RefOriginMoment[1] = RefOriginMoment_Y[val_marker];
@@ -2937,18 +2936,6 @@ class CConfig {
29372936
*/
29382937
void SetnMarker_All(unsigned short val_nmarker) { nMarker_All = val_nmarker; }
29392938

2940-
/*!
2941-
* \brief Get the number of internal iterations.
2942-
* \return Number of internal iterations.
2943-
*/
2944-
unsigned long GetUnst_nIntIter(void) const { return Unst_nIntIter; }
2945-
2946-
/*!
2947-
* \brief Get the number of internal iterations for the Newton-Raphson Method in nonlinear structural applications.
2948-
* \return Number of internal iterations.
2949-
*/
2950-
unsigned long GetDyn_nIntIter(void) const { return Dyn_nIntIter; }
2951-
29522939
/*!
29532940
* \brief Get the starting direct iteration number for the unsteady adjoint (reverse time integration).
29542941
* \return Starting direct iteration number for the unsteady adjoint.
@@ -3818,7 +3805,7 @@ class CConfig {
38183805
* \brief Get the number of coefficients in the temperature polynomial models.
38193806
* \return The the number of coefficients in the temperature polynomial models.
38203807
*/
3821-
unsigned short GetnPolyCoeffs(void) const { return nPolyCoeffs; }
3808+
unsigned short GetnPolyCoeffs(void) const { return N_POLY_COEFFS; }
38223809

38233810
/*!
38243811
* \brief Get the temperature polynomial coefficient for specific heat Cp.
@@ -3852,7 +3839,7 @@ class CConfig {
38523839
* \brief Get the temperature polynomial coefficients for viscosity.
38533840
* \return Non-dimensional temperature polynomial coefficients for viscosity.
38543841
*/
3855-
su2double* GetMu_PolyCoeffND(void) { return MuPolyCoefficientsND; }
3842+
const su2double* GetMu_PolyCoeffND(void) const { return MuPolyCoefficientsND.data(); }
38563843

38573844
/*!
38583845
* \brief Get the temperature polynomial coefficient for thermal conductivity.
@@ -3872,7 +3859,7 @@ class CConfig {
38723859
* \brief Get the temperature polynomial coefficients for thermal conductivity.
38733860
* \return Non-dimensional temperature polynomial coefficients for thermal conductivity.
38743861
*/
3875-
su2double* GetKt_PolyCoeffND(void) { return KtPolyCoefficientsND; }
3862+
const su2double* GetKt_PolyCoeffND(void) const { return KtPolyCoefficientsND.data(); }
38763863

38773864
/*!
38783865
* \brief Set the value of the non-dimensional constant viscosity.
@@ -4028,6 +4015,11 @@ class CConfig {
40284015
*/
40294016
su2double GetRelaxation_Factor_CHT(void) const { return Relaxation_Factor_CHT; }
40304017

4018+
/*!
4019+
* \brief Get the number of samples used in quasi-Newton methods.
4020+
*/
4021+
unsigned short GetnQuasiNewtonSamples(void) const { return nQuasiNewtonSamples; }
4022+
40314023
/*!
40324024
* \brief Get the relaxation coefficient of the linear solver for the implicit formulation.
40334025
* \return relaxation coefficient of the linear solver for the implicit formulation.
@@ -4711,6 +4703,12 @@ class CConfig {
47114703
*/
47124704
string GetInlet_FileName(void) const { return Inlet_Filename; }
47134705

4706+
/*!
4707+
* \brief Get name of the input file for the specified actuator disk.
4708+
* \return Name of the input file for the specified actuator disk.
4709+
*/
4710+
string GetActDisk_FileName(void) const { return ActDisk_FileName; }
4711+
47144712
/*!
47154713
* \brief Get the tolerance used for matching two points on a specified inlet
47164714
* \return Tolerance used for matching a point to a specified inlet
@@ -5383,20 +5381,14 @@ class CConfig {
53835381
*/
53845382
string GetVolume_FileName(void) const { return Volume_FileName; }
53855383

5386-
/*!
5387-
* \brief Get the name of the restart file for the heat variables.
5388-
* \return Name of the restart file for the flow variables.
5389-
*/
5390-
string GetRestart_HeatFileName(void);
5391-
53925384
/*!
53935385
* \brief Add any numbers necessary to the filename (iteration number, zone ID ...)
53945386
* \param[in] config - Definition of the particular problem.
53955387
* \param[in] filename - the base filename.
53965388
* \param[in] ext - the extension to be added.
53975389
* \return The new filename
53985390
*/
5399-
string GetFilename(string filename, string ext, unsigned long Iter);
5391+
string GetFilename(string filename, string ext, unsigned long Iter) const;
54005392

54015393
/*!
54025394
* \brief Append the zone index to the restart or the solution files.
@@ -5414,13 +5406,13 @@ class CConfig {
54145406
* \brief Append the instance index to the restart or the solution files.
54155407
* \return Name of the restart file for the flow variables.
54165408
*/
5417-
string GetMultiInstance_FileName(string val_filename, int val_iInst, string ext);
5409+
string GetMultiInstance_FileName(string val_filename, int val_iInst, string ext) const;
54185410

54195411
/*!
54205412
* \brief Append the instance index to the restart or the solution files.
54215413
* \return Name of the restart file for the flow variables.
54225414
*/
5423-
string GetMultiInstance_HistoryFileName(string val_filename, int val_iInst);
5415+
string GetMultiInstance_HistoryFileName(string val_filename, int val_iInst) const;
54245416

54255417
/*!
54265418
* \brief Get the name of the restart file for the flow variables.
@@ -5489,7 +5481,7 @@ class CConfig {
54895481
* \param[in] val_filename - String value of the base filename.
54905482
* \return Name of the file with the appropriate objective function extension.
54915483
*/
5492-
string GetObjFunc_Extension(string val_filename);
5484+
string GetObjFunc_Extension(string val_filename) const;
54935485

54945486
/*!
54955487
* \brief Get the criteria for structural residual (relative/absolute).
@@ -6339,17 +6331,17 @@ class CConfig {
63396331
/*!
63406332
* \brief Center of rotation for a rotational periodic boundary.
63416333
*/
6342-
su2double *GetPeriodicRotCenter(string val_marker);
6334+
const su2double *GetPeriodicRotCenter(string val_marker) const;
63436335

63446336
/*!
63456337
* \brief Angles of rotation for a rotational periodic boundary.
63466338
*/
6347-
su2double *GetPeriodicRotAngles(string val_marker);
6339+
const su2double *GetPeriodicRotAngles(string val_marker) const;
63486340

63496341
/*!
63506342
* \brief Translation vector for a rotational periodic boundary.
63516343
*/
6352-
su2double *GetPeriodicTranslation(string val_marker);
6344+
const su2double *GetPeriodicTranslation(string val_marker) const;
63536345

63546346
/*!
63556347
* \brief Get the rotationally periodic donor marker for boundary <i>val_marker</i>.
@@ -6561,7 +6553,7 @@ class CConfig {
65616553
* \param[in] val_index - Index corresponding to the inlet boundary.
65626554
* \return The flow direction vector.
65636555
*/
6564-
su2double* GetInlet_FlowDir(string val_index);
6556+
const su2double* GetInlet_FlowDir(string val_index) const;
65656557

65666558
/*!
65676559
* \brief Get the back pressure (static) at an outlet boundary.
@@ -8362,14 +8354,14 @@ class CConfig {
83628354
* \brief Start the timer for profiling subroutines.
83638355
* \param[in] val_start_time - the value of the start time.
83648356
*/
8365-
void GEMM_Tick(double *val_start_time);
8357+
void GEMM_Tick(double *val_start_time) const;
83668358

83678359
/*!
83688360
* \brief Stop the timer for the GEMM profiling and store results.
83698361
* \param[in] val_start_time - The value of the start time.
83708362
* \param[in] M, N, K - Matrix size of the GEMM call.
83718363
*/
8372-
void GEMM_Tock(double val_start_time, int M, int N, int K);
8364+
void GEMM_Tock(double val_start_time, int M, int N, int K) const;
83738365

83748366
/*!
83758367
* \brief Write a CSV file containing the results of the profiling.

Common/include/CMultiGridQueue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* \brief Header of the multigrid queue class for the FVM solver.
44
* The subroutines and functions are in the <i>CMultiGridQueue.cpp</i> file.
55
* \author F. Palacios
6-
* \version 7.0.5 "Blackbird"
6+
* \version 7.0.6 "Blackbird"
77
*
88
* SU2 Project Website: https://su2code.github.io
99
*

Common/include/adt_structure.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* alternating digital tree (ADT).
55
* The subroutines and functions are in the <i>adt_structure.cpp</i> file.
66
* \author E. van der Weide
7-
* \version 7.0.5 "Blackbird"
7+
* \version 7.0.6 "Blackbird"
88
*
99
* SU2 Project Website: https://su2code.github.io
1010
*
@@ -87,7 +87,7 @@ class CADTComparePointClass {
8787
* \brief Class for storing the information of a possible bounding box candidate
8888
during a minimum distance search.
8989
* \author E. van der Weide
90-
* \version 7.0.5 "Blackbird"
90+
* \version 7.0.6 "Blackbird"
9191
*/
9292
struct CBBoxTargetClass {
9393

@@ -265,7 +265,7 @@ class CADTPointsOnlyClass : public CADTBaseClass {
265265
* \class CADTElemClass
266266
* \brief Class for storing an ADT of (linear) elements in an arbitrary number of dimensions.
267267
* \author E. van der Weide
268-
* \version 7.0.5 "Blackbird"
268+
* \version 7.0.6 "Blackbird"
269269
*/
270270
class CADTElemClass : public CADTBaseClass {
271271
private:

Common/include/basic_types/ad_structure.hpp

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file ad_structure.hpp
33
* \brief Main routines for the algorithmic differentiation (AD) structure.
44
* \author T. Albring
5-
* \version 7.0.5 "Blackbird"
5+
* \version 7.0.6 "Blackbird"
66
*
77
* SU2 Project Website: https://su2code.github.io
88
*
@@ -249,6 +249,18 @@ namespace AD{
249249
*/
250250
inline void Push_TapePosition() {}
251251

252+
/*!
253+
* \brief Start a passive region, i.e. stop recording.
254+
* \return True is tape was active.
255+
*/
256+
inline bool BeginPassive() { return false; }
257+
258+
/*!
259+
* \brief End a passive region, i.e. start recording if we were recording before.
260+
* \param[in] wasActive - Whether we were recording before entering the passive region.
261+
*/
262+
inline void EndPassive(bool wasActive) {}
263+
252264
#else
253265
using CheckpointHandler = codi::DataStore;
254266

@@ -488,27 +500,19 @@ namespace AD{
488500

489501
FORCEINLINE void EndExtFunc() { delete FuncHelper; }
490502

491-
#endif // CODI_REVERSE_TYPE
503+
FORCEINLINE bool BeginPassive() {
504+
if(AD::globalTape.isActive()) {
505+
StopRecording();
506+
return true;
507+
}
508+
return false;
509+
}
492510

493-
} // namespace AD
511+
FORCEINLINE void EndPassive(bool wasActive) { if(wasActive) StartRecording(); }
494512

495-
/*--- Macro to begin and end sections with a passive tape ---*/
513+
#endif // CODI_REVERSE_TYPE
496514

497-
#ifdef CODI_REVERSE_TYPE
498-
#define AD_BEGIN_PASSIVE \
499-
if(AD::globalTape.isActive()) {\
500-
AD::globalTape.setPassive();\
501-
AD::Status = true; \
502-
}
503-
#define AD_END_PASSIVE \
504-
if(AD::Status) { \
505-
AD::globalTape.setActive(); \
506-
AD::Status = false; \
507-
}
508-
#else
509-
#define AD_BEGIN_PASSIVE
510-
#define AD_END_PASSIVE
511-
#endif
515+
} // namespace AD
512516

513517

514518
/*--- If we compile under OSX we have to overload some of the operators for

Common/include/basic_types/datatype_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* \file datatype_structure.hpp
33
* \brief Headers for generalized datatypes, defines an interface for AD types.
44
* \author T. Albring
5-
* \version 7.0.5 "Blackbird"
5+
* \version 7.0.6 "Blackbird"
66
*
77
* SU2 Project Website: https://su2code.github.io
88
*

0 commit comments

Comments
 (0)