Skip to content

Commit

Permalink
Fix sign on ueint pdivu
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Jan 3, 2024
1 parent c816b03 commit 366c24c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Hydro/Hydro_utils_eb_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ eb_pdivu (int i, int j, int k,
(q1(i + 1, j, k, GDU ) - q1(i, j, k, GDU )) *dxinv[0]
+(q2(i, j + 1, k, GDPRES) + q2(i, j, k, GDPRES)) *
(q2(i, j + 1, k, GDV ) - q2(i, j, k, GDV )) * dxinv[1]);
divu(i,j,k,UEINT) += pdivu;
divu(i,j,k,UEINT) -= pdivu;
}
else if (!flag(i,j,k).isCovered())
{
Expand Down Expand Up @@ -153,7 +153,7 @@ eb_pdivu (int i, int j, int k,
fyp = amrex::Real(0.0);
}

divu(i,j,k,UEINT) += (1.0/vfrc(i,j,k)) * q(i,j,k,QPRES)*
divu(i,j,k,UEINT) -= (1.0/vfrc(i,j,k)) * q(i,j,k,QPRES)*
( dxinv[0] * (apx(i+1,j,k)*fxp-apx(i,j,k)*fxm)
+ dxinv[1] * (apy(i,j+1,k)*fyp-apy(i,j,k)*fym) );
}
Expand All @@ -169,7 +169,7 @@ eb_pdivu (int i, int j, int k,
+(q3(i,j,k+1, GDPRES) + q3(i,j,k, GDPRES)) *
(q3(i,j,k+1, GDW ) - q3(i,j,k, GDW )) * dxinv[2]);

divu(i,j,k,UEINT) += pdivu;
divu(i,j,k,UEINT) -= pdivu;
}
else if (!flag(i,j,k).isCovered())
{
Expand Down Expand Up @@ -271,7 +271,7 @@ eb_pdivu (int i, int j, int k,
fzp = amrex::Real(0.0);
}

divu(i,j,k,UEINT) += (1.0/vfrc(i,j,k)) * q(i,j,k,QPRES)*
divu(i,j,k,UEINT) -= (1.0/vfrc(i,j,k)) * q(i,j,k,QPRES)*
( dxinv[0] * (apx(i+1,j,k)*fxp-apx(i,j,k)*fxm)
+ dxinv[1] * (apy(i,j+1,k)*fyp-apy(i,j,k)*fym)
+ dxinv[2] * (apz(i,j,k+1)*fzp-apz(i,j,k)*fzm) );
Expand Down

0 comments on commit 366c24c

Please sign in to comment.