Skip to content

Commit

Permalink
proper fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarruscag committed Sep 11, 2022
1 parent 5f0e319 commit c841509
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common/doc/docmain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
*/

/*!
* \defgroup Navier_Stokes_Equations Solving the Navier-Stokes' equations
* \defgroup Navier_Stokes_Equations Solving the Navier-Stokes equations
* \brief Group of classes which define the system of Navier-Stokes equations in
* three formulations: direct, adjoint, and linearized.
*/
Expand Down
1 change: 1 addition & 0 deletions SU2_CFD/include/numerics_simd/CNumericsSIMD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ using SparseMatrixType = CSysMatrix<su2mixedfloat>;

/*!
* \class CNumericsSIMD
* \ingroup ConvDiscr
* \brief Base class to define the interface.
* \note See CNumericsEmptyDecorator.
*/
Expand Down
6 changes: 3 additions & 3 deletions SU2_CFD/include/numerics_simd/flow/convection/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ FORCEINLINE CPair<ReconVarType> reconstructPrimitives(Int iEdge, Int iPoint, Int
break;
}
/*--- Detect a non-physical reconstruction based on negative pressure or density. ---*/
const Double neg_p_or_rho = max(min(V.i.pressure(), V.j.pressure()) < 0.0,
min(V.i.density(), V.j.density()) < 0.0);
const Double neg_p_or_rho = VecExpr::max(VecExpr::min(V.i.pressure(), V.j.pressure()) < 0.0,
VecExpr::min(V.i.density(), V.j.density()) < 0.0);
/*--- Test the sign of the Roe-averaged speed of sound. ---*/
const Double R = sqrt(V.j.density() / V.i.density());
/*--- Delay dividing by R+1 until comparing enthalpy and velocity magnitude. ---*/
Expand All @@ -147,7 +147,7 @@ FORCEINLINE CPair<ReconVarType> reconstructPrimitives(Int iEdge, Int iPoint, Int
const Double neg_sound_speed = enthalpy * (R+1) < 0.5 * v_squared;

/*--- Revert to first order if the state is non-physical. ---*/
Double bad_recon = max(neg_p_or_rho, neg_sound_speed);
Double bad_recon = VecExpr::max(neg_p_or_rho, neg_sound_speed);
/*--- Handle SIMD dimensions 1 by 1. ---*/
for (size_t k = 0; k < Double::Size; ++k) {
bad_recon[k] = solution.UpdateNonPhysicalEdgeCounter(iEdge[k], bad_recon[k]);
Expand Down

0 comments on commit c841509

Please sign in to comment.