Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into new_turbo_outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkellyjak committed Jan 10, 2024
2 parents 70756d9 + 2c9fbb6 commit 244b51c
Show file tree
Hide file tree
Showing 38 changed files with 6,419 additions and 1,689 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Eduardo Molina
Edwin van der Weide
Ethan Alan Hereth
Florian Dittmann
Filip Hahs
Francesco Poli
Francisco D. Palacios
Gaurav Bansal
Expand Down
130 changes: 29 additions & 101 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ class CConfig {
nMarker_Damper, /*!< \brief Number of damper surface markers. */
nMarker_Load_Dir, /*!< \brief Number of load surface markers defined by magnitude and direction. */
nMarker_Disp_Dir, /*!< \brief Number of load surface markers defined by magnitude and direction. */
nMarker_Load_Sine, /*!< \brief Number of load surface markers defined by magnitude and direction. */
nMarker_FlowLoad, /*!< \brief Number of load surface markers. */
nMarker_Internal, /*!< \brief Number of internal flow markers. */
nMarker_All, /*!< \brief Total number of markers using the grid information. */
nMarker_Max, /*!< \brief Max number of number of markers using the grid information. */
Expand Down Expand Up @@ -268,7 +266,6 @@ class CConfig {
*Marker_Load_Dir, /*!< \brief Load markers defined in cartesian coordinates. */
*Marker_Disp_Dir, /*!< \brief Load markers defined in cartesian coordinates. */
*Marker_Load_Sine, /*!< \brief Sine-wave loaded markers defined in cartesian coordinates. */
*Marker_FlowLoad, /*!< \brief Flow Load markers. */
*Marker_Internal, /*!< \brief Internal flow markers. */
*Marker_All_TagBound; /*!< \brief Global index for markers using grid information. */

Expand Down Expand Up @@ -327,10 +324,6 @@ class CConfig {
su2double *Disp_Dir_Multiplier; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */
su2double **Load_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */
su2double **Disp_Dir; /*!< \brief Specified structural displacement direction (unit vector). */
su2double *Load_Sine_Amplitude; /*!< \brief Specified amplitude for a sine-wave load. */
su2double *Load_Sine_Frequency; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */
su2double **Load_Sine_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */
su2double *FlowLoad_Value; /*!< \brief Specified force for flow load boundaries. */
su2double *ActDiskInlet_MassFlow; /*!< \brief Specified inlet mass flow for actuator disk. */
su2double *ActDiskInlet_Temperature; /*!< \brief Specified inlet temperature for actuator disk. */
su2double *ActDiskInlet_TotalTemperature; /*!< \brief Specified inlet total temperature for actuator disk. */
Expand Down Expand Up @@ -520,8 +513,6 @@ class CConfig {
Kind_Deform_Linear_Solver_Prec, /*!< \brief Preconditioner of the linear solver. */
Kind_Linear_Solver, /*!< \brief Numerical solver for the implicit scheme. */
Kind_Linear_Solver_Prec, /*!< \brief Preconditioner of the linear solver. */
Kind_AdjTurb_Linear_Solver, /*!< \brief Numerical solver for the turbulent adjoint implicit scheme. */
Kind_AdjTurb_Linear_Prec, /*!< \brief Preconditioner of the turbulent adjoint linear solver. */
Kind_DiscAdj_Linear_Solver, /*!< \brief Linear solver for the discrete adjoint system. */
Kind_DiscAdj_Linear_Prec, /*!< \brief Preconditioner of the discrete adjoint linear solver. */
Kind_TimeNumScheme, /*!< \brief Global explicit or implicit time integration. */
Expand Down Expand Up @@ -634,9 +625,7 @@ class CConfig {
su2double Roe_Kappa; /*!< \brief Relaxation of the Roe scheme. */
su2double Relaxation_Factor_Adjoint; /*!< \brief Relaxation coefficient for variable updates of adjoint solvers. */
su2double Relaxation_Factor_CHT; /*!< \brief Relaxation coefficient for the update of conjugate heat variables. */
su2double AdjTurb_Linear_Error; /*!< \brief Min error of the turbulent adjoint linear solver for the implicit formulation. */
su2double EntropyFix_Coeff; /*!< \brief Entropy fix coefficient. */
unsigned short AdjTurb_Linear_Iter; /*!< \brief Min error of the turbulent adjoint linear solver for the implicit formulation. */
unsigned short nLocationStations, /*!< \brief Number of section cuts to make when outputting mesh and cp . */
nWingStations; /*!< \brief Number of section cuts to make when calculating internal volume. */
su2double Kappa_1st_AdjFlow, /*!< \brief Lax 1st order dissipation coefficient for adjoint flow equations (coarse multigrid levels). */
Expand Down Expand Up @@ -680,7 +669,6 @@ class CConfig {
su2double Total_CM; /*!< \brief Specify a Total CM instead of AoA (external flow only). */
su2double Total_CD; /*!< \brief Specify a target CD instead of AoA (external flow only). */
su2double dCL_dAlpha; /*!< \brief value of dCl/dAlpha. */
su2double dCM_diH; /*!< \brief value of dCM/dHi. */
unsigned long Iter_Fixed_CM; /*!< \brief Iterations to re-evaluate the angle of attack (external flow only). */
unsigned long Iter_Fixed_NetThrust; /*!< \brief Iterations to re-evaluate the angle of attack (external flow only). */
unsigned long Iter_dCL_dAlpha; /*!< \brief Number of iterations to evaluate dCL_dAlpha. */
Expand Down Expand Up @@ -942,8 +930,6 @@ class CConfig {
bool RampAndRelease; /*!< \brief option for ramp load and release */
bool Sine_Load; /*!< \brief option for sine load */
su2double Thermal_Diffusivity; /*!< \brief Thermal diffusivity used in the heat solver. */
su2double Cyclic_Pitch, /*!< \brief Cyclic pitch for rotorcraft simulations. */
Collective_Pitch; /*!< \brief Collective pitch for rotorcraft simulations. */
su2double Mach_Motion; /*!< \brief Mach number based on mesh velocity and freestream quantities. */

su2double Motion_Origin[3] = {0.0}, /*!< \brief Mesh motion origin. */
Expand Down Expand Up @@ -1125,7 +1111,6 @@ class CConfig {
distortion[2], /*!< \brief SU2_GEO section locations array for the COption class. */
ea_lim[3], /*!< \brief equivalent area limit array for the COption class. */
grid_fix[6], /*!< \brief fixed grid (non-deforming region) array for the COption class. */
htp_axis[2], /*!< \brief HTP axis for the COption class. */
ffd_axis[3], /*!< \brief FFD axis for the COption class. */
inc_crit[3], /*!< \brief incremental criteria array for the COption class. */
extrarelfac[2], /*!< \brief extra relaxation factor for Giles BC in the COption class. */
Expand Down Expand Up @@ -1190,6 +1175,7 @@ class CConfig {
string caseName; /*!< \brief Name of the current case */

unsigned long edgeColorGroupSize; /*!< \brief Size of the edge groups colored for OpenMP parallelization of edge loops. */
bool edgeColoringRelaxDiscAdj; /*!< \brief Allow fallback to smaller edge color group sizes and use more colors for the discrete adjoint. */

INLET_SPANWISE_INTERP Kind_InletInterpolationFunction; /*!brief type of spanwise interpolation function to use for the inlet face. */
INLET_INTERP_TYPE Kind_Inlet_InterpolationType; /*!brief type of spanwise interpolation data to use for the inlet face. */
Expand Down Expand Up @@ -4297,18 +4283,6 @@ class CConfig {
*/
su2double GetSemiSpan(void) const { return SemiSpan; }

/*!
* \brief Get the kind of solver for the implicit solver.
* \return Numerical solver for implicit formulation (solving the linear system).
*/
unsigned short GetKind_AdjTurb_Linear_Solver(void) const { return Kind_AdjTurb_Linear_Solver; }

/*!
* \brief Get the kind of preconditioner for the implicit solver.
* \return Numerical preconditioner for implicit formulation (solving the linear system).
*/
unsigned short GetKind_AdjTurb_Linear_Prec(void) const { return Kind_AdjTurb_Linear_Prec; }

/*!
* \brief Get the kind of solver for the implicit solver.
* \return Numerical solver for implicit formulation (solving the linear system).
Expand All @@ -4327,30 +4301,12 @@ class CConfig {
*/
unsigned short GetKind_Deform_Linear_Solver_Prec(void) const { return Kind_Deform_Linear_Solver_Prec; }

/*!
* \brief Set the kind of preconditioner for the implicit solver.
* \return Numerical preconditioner for implicit formulation (solving the linear system).
*/
void SetKind_AdjTurb_Linear_Prec(unsigned short val_kind_prec) { Kind_AdjTurb_Linear_Prec = val_kind_prec; }

/*!
* \brief Get min error of the linear solver for the implicit formulation.
* \return Min error of the linear solver for the implicit formulation.
*/
su2double GetAdjTurb_Linear_Error(void) const { return AdjTurb_Linear_Error; }

/*!
* \brief Get the entropy fix.
* \return Vaule of the entropy fix.
*/
su2double GetEntropyFix_Coeff(void) const { return EntropyFix_Coeff; }

/*!
* \brief Get max number of iterations of the linear solver for the implicit formulation.
* \return Max number of iterations of the linear solver for the implicit formulation.
*/
unsigned short GetAdjTurb_Linear_Iter(void) const { return AdjTurb_Linear_Iter; }

/*!
* \brief Get CFL reduction factor for adjoint turbulence model.
* \return CFL reduction factor.
Expand Down Expand Up @@ -5957,6 +5913,15 @@ class CConfig {
*/
su2double GetMarkerTranslationRate(unsigned short iMarkerMoving, unsigned short iDim) const { return MarkerTranslation_Rate[3*iMarkerMoving + iDim];}

/*!
* \brief Set the translation rate of the marker.
* \param[in] iDim - spatial component
* \param[in] val - translational velocity
*/
void SetMarkerTranslationRate(unsigned short iMarkerMoving, unsigned short iDim, su2double val) {
MarkerTranslation_Rate[3 * iMarkerMoving + iDim] = val;
}

/*!
* \brief Get the rotation rate of the mesh.
* \param[in] iDim - spatial component
Expand All @@ -5980,6 +5945,16 @@ class CConfig {
*/
su2double GetMarkerRotationRate(unsigned short iMarkerMoving, unsigned short iDim) const { return MarkerRotation_Rate[3*iMarkerMoving + iDim];}

/*!
* \brief Set the rotation rate of the marker.
* \param[in] iMarkerMoving - Index of the moving marker (as specified in Marker_Moving)
* \param[in] iDim - spatial component
* \param[in] val - Rotational velocity
*/
void SetMarkerRotationRate(unsigned short iMarkerMoving, unsigned short iDim, su2double val) {
MarkerRotation_Rate[3 * iMarkerMoving + iDim] = val;
}

/*!
* \brief Get the pitching rate of the mesh.
* \param[in] iDim - spatial component
Expand Down Expand Up @@ -6505,8 +6480,8 @@ class CConfig {
su2double GetWeightCd(void) const { return WeightCd; }

/*!
* \brief Value of the weight of the CD, CL, CM optimization.
* \return Value of the weight of the CD, CL, CM optimization.
* \brief Value of the damping factor for the Thrust BC (actuator disk).
* \return Value of the damping factor.
*/
void SetdNetThrust_dBCThrust(su2double val_dnetthrust_dbcthrust);

Expand Down Expand Up @@ -6570,12 +6545,6 @@ class CConfig {
*/
void SetdCL_dAlpha(su2double val_dcl_dalpha) { dCL_dAlpha = val_dcl_dalpha; }

/*!
* \brief Value of the weight of the CD, CL, CM optimization.
* \return Value of the weight of the CD, CL, CM optimization.
*/
void SetdCM_diH(su2double val_dcm_dhi) { dCM_diH = val_dcm_dhi; }

/*!
* \brief Value of the weight of the CD, CL, CM optimization.
* \return Value of the weight of the CD, CL, CM optimization.
Expand Down Expand Up @@ -8364,46 +8333,6 @@ class CConfig {
*/
const su2double* GetDisp_Dir(const string& val_index) const;

/*!
* \brief Get the amplitude of the sine-wave at a load boundary defined in cartesian coordinates.
* \param[in] val_index - Index corresponding to the load boundary.
* \return The load value.
*/
su2double GetLoad_Sine_Amplitude(const string& val_index) const;

/*!
* \brief Get the frequency of the sine-wave at a load boundary in cartesian coordinates.
* \param[in] val_index - Index corresponding to the load boundary.
* \return The load frequency.
*/
su2double GetLoad_Sine_Frequency(const string& val_index) const;

/*!
* \brief Get the force direction at a sine-wave loaded boundary in cartesian coordinates.
* \param[in] val_index - Index corresponding to the load boundary.
* \return The load direction.
*/
const su2double* GetLoad_Sine_Dir(const string& val_index) const;

/*!
* \brief Get the force value at an load boundary.
* \param[in] val_index - Index corresponding to the load boundary.
* \return The load value.
*/
su2double GetFlowLoad_Value(const string& val_index) const;

/*!
* \brief Cyclic pitch amplitude for rotor blades.
* \return The specified cyclic pitch amplitude.
*/
su2double GetCyclic_Pitch(void) const { return Cyclic_Pitch; }

/*!
* \brief Collective pitch setting for rotor blades.
* \return The specified collective pitch setting.
*/
su2double GetCollective_Pitch(void) const { return Collective_Pitch; }

/*!
* \brief Get name of the arbitrary mesh motion input file.
* \return File name of the arbitrary mesh motion input file.
Expand Down Expand Up @@ -8706,21 +8635,15 @@ class CConfig {
*/
unsigned long GetIter_dCL_dAlpha(void) const { return Iter_dCL_dAlpha; }

/*!
* \brief Get the value of the damping coefficient for fixed CL mode.
* \return Damping coefficient for fixed CL mode.
*/
su2double GetdCM_diH(void) const { return dCM_diH; }

/*!
* \brief Get the value of iterations to re-evaluate the angle of attack.
* \return Number of iterations.
*/
unsigned long GetIter_Fixed_NetThrust(void) const { return Iter_Fixed_NetThrust; }

/*!
* \brief Get the value of the damping coefficient for fixed CL mode.
* \return Damping coefficient for fixed CL mode.
* \brief Get the value of NetThrust_dBCThrust.
* \return Value NetThrust_dBCThrust.
*/
su2double GetdNetThrust_dBCThrust(void) const { return dNetThrust_dBCThrust; }

Expand Down Expand Up @@ -9740,6 +9663,11 @@ class CConfig {
*/
unsigned long GetEdgeColoringGroupSize(void) const { return edgeColorGroupSize; }

/*!
* \brief Check if the discrete adjoint is allowed to relax the coloring, that is, allow smaller edge color group sizes and allow more colors.
*/
bool GetEdgeColoringRelaxDiscAdj() const { return edgeColoringRelaxDiscAdj; }

/*!
* \brief Get the ParMETIS load balancing tolerance.
*/
Expand Down
6 changes: 5 additions & 1 deletion Common/include/geometry/CGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,10 +1729,14 @@ class CGeometry {
/*!
* \brief Get the edge coloring.
* \note This method computes the coloring if that has not been done yet.
* \note Can be instructed to determine and use the maximum edge color group size between 1 and
* CGeometry::edgeColorGroupSize that yields a coloring that is at least as efficient as #COLORING_EFF_THRESH.
* \param[out] efficiency - optional output of the coloring efficiency.
* \param[in] maximizeEdgeColorGroupSize - use the maximum edge color group size that gives an efficient coloring.
* \return Reference to the coloring.
*/
const CCompressedSparsePatternUL& GetEdgeColoring(su2double* efficiency = nullptr);
const CCompressedSparsePatternUL& GetEdgeColoring(su2double* efficiency = nullptr,
bool maximizeEdgeColorGroupSize = false);

/*!
* \brief Force the natural (sequential) edge coloring.
Expand Down
7 changes: 0 additions & 7 deletions Common/include/grid_movement/CSurfaceMovement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ class CSurfaceMovement : public CGridMovement {
void SetBoundary_Flutter3D(CGeometry* geometry, CConfig* config, CFreeFormDefBox** FFDBox, unsigned long iter,
unsigned short iZone);

/*!
* \brief Set the collective pitch for a blade surface movement.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
*/
void SetCollective_Pitch(CGeometry* geometry, CConfig* config);

/*!
* \brief Set any surface deformationsbased on an input file.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down
2 changes: 1 addition & 1 deletion Common/include/option_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ class COptionDVParam : public COptionBase {
default: {
string newstring;
newstring.append(this->name);
newstring.append(": undefined design variable type found in configuration file.");
newstring.append(": undefined design variable type found in configuration file. ");
return newstring;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Common/include/toolboxes/graph_toolbox.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ T createNaturalColoring(Index_t numInnerIndexes) {
* \param[out] indexColor - Optional, vector with colors given to the outer indices.
* \return Coloring in the same type of the input pattern.
*/
template <typename Color_t = char, size_t MaxColors = 64, size_t MaxMB = 128, class T>
template <typename Color_t = unsigned char, size_t MaxColors = 255, size_t MaxMB = 128, class T>
T colorSparsePattern(const T& pattern, size_t groupSize = 1, bool balanceColors = false,
std::vector<Color_t>* indexColor = nullptr) {
static_assert(std::is_integral<Color_t>::value, "");
Expand Down
Loading

0 comments on commit 244b51c

Please sign in to comment.