Skip to content

Commit

Permalink
Merge 'develop' branch into 'feature_pysu2_fsi_adjoint'
Browse files Browse the repository at this point in the history
  • Loading branch information
patelha57 committed Jan 18, 2024
2 parents 62f2969 + 2c9fbb6 commit 60f3328
Show file tree
Hide file tree
Showing 50 changed files with 7,892 additions and 1,710 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
203 changes: 102 additions & 101 deletions Common/include/CConfig.hpp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Common/include/basic_types/ad_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ FORCEINLINE void SetIndex(int& index, const su2double& data) { index = data.getI

// WARNING: For performance reasons, this method does not perform bounds checking.
// When using it, please ensure sufficient adjoint vector size by a call to AD::ResizeAdjoints().
// This method does not perform locking either.
// It should be safeguarded by calls to AD::BeginUseAdjoints() and AD::EndUseAdjoints().
FORCEINLINE void SetDerivative(int index, const double val) {
if (index == 0) // Allow multiple threads to "set the derivative" of passive variables without causing data races.
return;
Expand All @@ -406,6 +408,8 @@ FORCEINLINE void SetDerivative(int index, const double val) {
// WARNING: For performance reasons, this method does not perform bounds checking.
// If called after tape evaluations, the adjoints should exist.
// Otherwise, please ensure sufficient adjoint vector size by a call to AD::ResizeAdjoints().
// This method does not perform locking either.
// It should be safeguarded by calls to AD::BeginUseAdjoints() and AD::EndUseAdjoints().
FORCEINLINE double GetDerivative(int index) {
return AD::getTape().getGradient(index, codi::AdjointsManagement::Manual);
}
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 @@ -1720,10 +1720,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
4 changes: 3 additions & 1 deletion Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,8 @@ enum ACTDISK_TYPE {
DRAG_MINUS_THRUST = 4, /*!< \brief User specifies the D-T. */
MASSFLOW = 5, /*!< \brief User specifies the massflow. */
POWER = 6, /*!< \brief User specifies the power. */
VARIABLE_LOAD = 7 /*!< \brief User specifies the load distribution. */
VARIABLE_LOAD = 7, /*!< \brief User specifies the load distribution. */
BLADE_ELEMENT = 8 /*!< \brief User specifies to use Blade element method. */
};
static const MapType<std::string, ACTDISK_TYPE> ActDisk_Map = {
MakePair("VARIABLES_JUMP", VARIABLES_JUMP)
Expand All @@ -1867,6 +1868,7 @@ static const MapType<std::string, ACTDISK_TYPE> ActDisk_Map = {
MakePair("MASSFLOW", MASSFLOW)
MakePair("POWER", POWER)
MakePair("VARIABLE_LOAD", VARIABLE_LOAD)
MakePair("BLADE_ELEMENT", BLADE_ELEMENT)
};

/*!
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 60f3328

Please sign in to comment.