Skip to content

Commit f19af6d

Browse files
committed
Now fix the reg tests for real
1 parent 98c89d0 commit f19af6d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

SU2_CFD/include/variables/CAdjEulerVariable.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ class CAdjEulerVariable : public CVariable {
102102
for (unsigned long iVar = 0; iVar < nVar; iVar++) IntBoundary_Jump(iPoint,iVar) = val_IntBoundary_Jump[iVar];
103103
}
104104

105+
/*!
106+
* \brief Set the velocity vector from the old solution.
107+
* \param[in] val_velocity - Pointer to the velocity.
108+
*/
109+
inline void SetVelocity_Old(unsigned long iPoint, const su2double *val_velocity) final {
110+
for (unsigned long iDim = 0; iDim < nDim; iDim++)
111+
Solution_Old(iPoint,iDim+1) = val_velocity[iDim]*Solution(iPoint,0);
112+
}
113+
105114
/*!
106115
* \brief Set the momentum part of the truncation error to zero.
107116
* \param[in] iPoint - Point index.
@@ -110,6 +119,15 @@ class CAdjEulerVariable : public CVariable {
110119
for (unsigned long iDim = 0; iDim < nDim; iDim++) Res_TruncError(iPoint,iDim+1) = 0.0;
111120
}
112121

122+
/*!
123+
* \brief Specify a vector to set the velocity components of the solution. Multiplied by density for compressible cases.
124+
* \param[in] iPoint - Point index.
125+
* \param[in] val_vector - Pointer to the vector.
126+
*/
127+
inline void SetVelSolutionVector(unsigned long iPoint, const su2double *val_vector) final {
128+
for (unsigned long iDim = 0; iDim < nDim; iDim++) Solution(iPoint, iDim+1) = GetDensity(iPoint) * val_vector[iDim];
129+
}
130+
113131
/*!
114132
* \brief Get the value of the force projection vector.
115133
* \return Pointer to the force projection vector.

0 commit comments

Comments
 (0)