Skip to content

Commit

Permalink
Merge pull request #2224 from su2code/develop
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
pcarruscag committed Feb 25, 2024
2 parents 6027069 + 8ef4b1b commit a80ef5e
Show file tree
Hide file tree
Showing 1,039 changed files with 11,771 additions and 4,303 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ BasedOnStyle: Google
PointerAlignment: Left
DerivePointerAlignment: false
ColumnLimit: 120
SortIncludes: Never
SortIncludes: false
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Packages (cpp)
if: ${{ matrix.language == 'cpp' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/require-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v3
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
Expand Down
3 changes: 3 additions & 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 Expand Up @@ -98,6 +99,7 @@ Kedar Naik
Kürşat Yurt
LaSerpe
Lennaert Tol
Liang Cheng
Lisa Kusch
Matteo Pini
Max Aehle
Expand Down Expand Up @@ -137,6 +139,7 @@ VivaanKhatri
Wally Maier
Y. Chandukrishna
Zan Xu
Zcaic
aaronyicongfu
aeroamit
anilvar
Expand Down
221 changes: 114 additions & 107 deletions Common/include/CConfig.hpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Common/include/adt/CADTBaseClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CADTBaseClass.hpp
* \brief Base class for storing an ADT in an arbitrary number of dimensions.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/adt/CADTComparePointClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CADTComparePointClass.hpp
* \brief subroutines for comparing two points in an alternating digital tree (ADT).
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
6 changes: 3 additions & 3 deletions Common/include/adt/CADTElemClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CADTElemClass.hpp
* \brief Class for storing an ADT of (linear) elements in an arbitrary number of dimensions.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand All @@ -36,7 +36,7 @@
* \ingroup ADT
* \brief Class for storing an ADT of (linear) elements in an arbitrary number of dimensions.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*/
class CADTElemClass : public CADTBaseClass {
private:
Expand Down
4 changes: 2 additions & 2 deletions Common/include/adt/CADTNodeClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CADTNodeClass.hpp
* \brief Class for storing the information needed in a node of an ADT.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/adt/CADTPointsOnlyClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CADTPointsOnlyClass.hpp
* \brief Class for storing an ADT of only points in an arbitrary number of dimensions.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
6 changes: 3 additions & 3 deletions Common/include/adt/CBBoxTargetClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* \brief Class for storing the information of a possible bounding box candidate
during a minimum distance search.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand All @@ -35,7 +35,7 @@
* \brief Class for storing the information of a possible bounding box candidate
during a minimum distance search.
* \author E. van der Weide
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*/
struct CBBoxTargetClass {
unsigned long boundingBoxID; /*!< \brief Corresponding bounding box ID. */
Expand Down
28 changes: 26 additions & 2 deletions Common/include/basic_types/ad_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file ad_structure.hpp
* \brief Main routines for the algorithmic differentiation (AD) structure.
* \author T. Albring, J. Blühdorn
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down Expand Up @@ -78,6 +78,19 @@ inline void RegisterOutput(su2double& data) {}
*/
inline void ResizeAdjoints() {}

/*!
* \brief Declare that the adjoints are being used, to protect against resizing.
*
* Should be used together with AD::EndUseAdjoints() to protect AD::SetDerivative() and AD::GetDerivative() calls,
* multiple at once if possible.
*/
inline void BeginUseAdjoints() {}

/*!
* \brief Declare that the adjoints are no longer being used.
*/
inline void EndUseAdjoints() {}

/*!
* \brief Sets the adjoint value at index to val
* \param[in] index - Position in the adjoint vector.
Expand Down Expand Up @@ -344,6 +357,9 @@ FORCEINLINE void ComputeAdjoint() {
opdi::logic->prepareEvaluate();
#endif
AD::getTape().evaluate();
#if defined(HAVE_OPDI)
opdi::logic->postEvaluate();
#endif
}

FORCEINLINE void ComputeAdjoint(unsigned short enter, unsigned short leave) {
Expand Down Expand Up @@ -375,10 +391,16 @@ FORCEINLINE void Reset() {

FORCEINLINE void ResizeAdjoints() { AD::getTape().resizeAdjointVector(); }

FORCEINLINE void BeginUseAdjoints() { AD::getTape().beginUseAdjointVector(); }

FORCEINLINE void EndUseAdjoints() { AD::getTape().endUseAdjointVector(); }

FORCEINLINE void SetIndex(int& index, const su2double& data) { index = data.getIdentifier(); }

// 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 @@ -389,6 +411,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
4 changes: 2 additions & 2 deletions Common/include/basic_types/datatype_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file datatype_structure.hpp
* \brief Headers for generalized datatypes, defines an interface for AD types.
* \author T. Albring
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/code_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file code_config.hpp
* \brief Header file for collecting common macros, definitions and type configurations.
* \author T. Albring, P. Gomes, J. Blühdorn
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/containers/C2DContainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file C2DContainer.hpp
* \brief A templated vector/matrix object.
* \author P. Gomes
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/containers/CFastFindAndEraseQueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* \brief A queue-type container (push back, pop front), but with
* fast deletion of arbitrary items (possibly in the middle).
* \author P. Gomes
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/containers/CFileReaderLUT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CFileReaderLUT.hpp
* \brief reading lookup table for tabulated fluid properties
* \author D. Mayer, T. Economon
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/containers/CLookUpTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CLookupTable.hpp
* \brief tabulation of fluid properties
* \author D. Mayer, T. Economon
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
4 changes: 2 additions & 2 deletions Common/include/containers/CPyWrapperMatrixView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CPyWrapperMatrixView.hpp
* \brief Simple matrix views to use with the python wrapper.
* \author P. Gomes
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down
6 changes: 3 additions & 3 deletions Common/include/containers/CTrapezoidalMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* \file CTrapezoidalMap.hpp
* \brief Implementation of the trapezoidal map for tabulation and lookup of fluid properties
* \author D. Mayer, T. Economon
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2023, SU2 Contributors (cf. AUTHORS.md)
* Copyright 2012-2024, 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
Expand Down Expand Up @@ -38,7 +38,7 @@
* \ingroup LookUpInterp
* \brief Construction of trapezoidal map for tabulated lookup
* \author: D. Mayer, T. Economon
* \version 8.0.0 "Harrier"
* \version 8.0.1 "Harrier"
*/
class CTrapezoidalMap {
protected:
Expand Down
Loading

0 comments on commit a80ef5e

Please sign in to comment.