Skip to content

Commit 16e27a2

Browse files
committed
Clang format.
1 parent f12232f commit 16e27a2

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Common/include/basic_types/ad_structure.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@ FORCEINLINE void SetIndex(Identifier& index, const su2double& data) { index = da
493493
// This method does not perform locking either.
494494
// It should be safeguarded by calls to AD::BeginUseAdjoints() and AD::EndUseAdjoints().
495495
FORCEINLINE void SetDerivative(Identifier index, const double val) {
496-
if (!AD::getTape().isIdentifierActive(index)) // Allow multiple threads to "set the derivative" of passive variables without causing data races.
497-
return;
496+
// Allow multiple threads to "set the derivative" of passive variables without causing data races.
497+
if (!AD::getTape().isIdentifierActive(index)) return;
498498

499499
AD::getTape().setGradient(index, val, codi::AdjointsManagement::Manual);
500500
}

Common/include/geometry/dual_grid/CPoint.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ class CPoint {
113113
su2activevector MaxLength; /*!< \brief The maximum cell-center to cell-center length. */
114114
su2activevector RoughnessHeight; /*!< \brief Roughness of the nearest wall. */
115115

116-
su2matrix<AD::Identifier> AD_InputIndex; /*!< \brief Indices of Coord variables in the adjoint vector. */
117-
su2matrix<AD::Identifier> AD_OutputIndex; /*!< \brief Indices of Coord variables in the adjoint vector after having been updated. */
116+
su2matrix<AD::Identifier>
117+
AD_InputIndex; /*!< \brief Indices of Coord variables in the adjoint vector before solver iteration. */
118+
su2matrix<AD::Identifier>
119+
AD_OutputIndex; /*!< \brief Indices of Coord variables in the adjoint vector after solver iteration. */
118120

119121
/*!
120122
* \brief Allocate fields required by the minimal constructor.

Common/include/parallelization/vectorization.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Array : public CVecExpr<Array<Scalar_t, N>, Scalar_t> {
9494
static constexpr bool StoreAsRef = true;
9595

9696
private:
97-
alignas(Size * 32) Scalar x_[N];
97+
alignas(Size * 32) Scalar x_[N];
9898

9999
public:
100100
#define ARRAY_BOILERPLATE \

SU2_CFD/include/variables/CVariable.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class CVariable {
9292

9393
MatrixType Solution_BGS_k; /*!< \brief Old solution container for BGS iterations. */
9494

95-
su2matrix<AD::Identifier> AD_InputIndex; /*!< \brief Indices of Solution variables in the adjoint vector. */
96-
su2matrix<AD::Identifier> AD_OutputIndex; /*!< \brief Indices of Solution variables in the adjoint vector after having been updated. */
95+
su2matrix<AD::Identifier> AD_InputIndex; /*!< \brief Indices of Solution variables in the adjoint vector before solver iteration. */
96+
su2matrix<AD::Identifier> AD_OutputIndex; /*!< \brief Indices of Solution variables in the adjoint vector after solver iteration. */
9797

9898
VectorType SolutionExtra; /*!< \brief Stores adjoint solution for extra solution variables.
9999
Currently only streamwise periodic pressure-drop for massflow prescribed flows. */

0 commit comments

Comments
 (0)