diff --git a/Source/Hydro/Godunov/PLM_eb.H b/Source/Hydro/Godunov/PLM_eb.H index 225389d..86b2020 100644 --- a/Source/Hydro/Godunov/PLM_eb.H +++ b/Source/Hydro/Godunov/PLM_eb.H @@ -274,7 +274,7 @@ hydro_plm_d_eb ( qp(iv, n) = 0.0; } - if (area(iv) > 0.0) + if (area(ivp) > 0.0) { const amrex::Real spzero = vel_ad >= 0 ? vel_ad * dtdx : 1.0; const amrex::Real acmpleft = 0.5 * (1.0 - spzero) * slope[n]; diff --git a/Source/Hydro/Hydro_utils_eb_K.H b/Source/Hydro/Hydro_utils_eb_K.H index 047d506..e910234 100644 --- a/Source/Hydro/Hydro_utils_eb_K.H +++ b/Source/Hydro/Hydro_utils_eb_K.H @@ -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()) { @@ -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) ); } @@ -166,10 +166,10 @@ 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] - +(q2(i,j,k+1, GDPRES) + q2(i,j,k, GDPRES)) * - (q2(i,j,k+1, GDW ) - q2(i,j,k, GDW )) * dxinv[2]); + +(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()) { @@ -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) );