From 8612196136f081a04b377215ec14e03548fa1805 Mon Sep 17 00:00:00 2001 From: cgilet Date: Thu, 25 Jul 2024 15:33:25 -0400 Subject: [PATCH] Fix typos in FaceDivFree interior interpolation. The problem was masked in test in amrex/Tests/DivFreePatch because all three components were the same. --- Src/AmrCore/AMReX_Interp_3D_C.H | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Src/AmrCore/AMReX_Interp_3D_C.H b/Src/AmrCore/AMReX_Interp_3D_C.H index b29ba4aca40..382962d11b2 100644 --- a/Src/AmrCore/AMReX_Interp_3D_C.H +++ b/Src/AmrCore/AMReX_Interp_3D_C.H @@ -294,13 +294,13 @@ facediv_int (int ci, int cj, int ck, int nf, + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w000+w012-w002-w010) + dy3/(8*dz*xspys)*(w100+w112-w102-w110); - fine[1](fi+1, fj+1, fk , nf) = Real(0.5)*(v001+v021) + fine[1](fi+1, fj+1, fk , nf) = Real(0.5)*(v100+v120) + dy*(2*dz*dz+dy*dy)/(8*dx*yspzs)*(u000+u210-u010-u200) + dy3/(8*dx*yspzs)*(u001+u211-u011-u201) + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w100+w112-w102-w110) + dy3/(8*dz*xspys)*(w000+w012-w002-w010); - fine[1](fi , fj+1, fk+1, nf) = Real(0.5)*(v100+v120) + fine[1](fi , fj+1, fk+1, nf) = Real(0.5)*(v001+v021) + dy*(2*dz*dz+dy*dy)/(8*dx*yspzs)*(u001+u211-u011-u201) + dy3/(8*dx*yspzs)*(u000+u210-u010-u200) + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w000+w012-w002-w010) @@ -319,17 +319,17 @@ facediv_int (int ci, int cj, int ck, int nf, + dz3/(8*dy*zspxs)*(v100+v121-v101-v120); fine[2](fi , fj+1, fk+1, nf) = Real(0.5)*(w010+w012) - + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u000+u201-u001-u200) - + dz3/(8*dx*yspzs)*(u010+u211-u011-u210) - + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v100+v121-v101-v120) - + dz3/(8*dy*zspxs)*(v000+v021-v001-v020); - - fine[2](fi+1, fj , fk+1, nf) = Real(0.5)*(w100+w102) + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u010+u211-u011-u210) + dz3/(8*dx*yspzs)*(u000+u201-u001-u200) + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v000+v021-v001-v020) + dz3/(8*dy*zspxs)*(v100+v121-v101-v120); + fine[2](fi+1, fj , fk+1, nf) = Real(0.5)*(w100+w102) + + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u000+u201-u001-u200) + + dz3/(8*dx*yspzs)*(u010+u211-u011-u210) + + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v100+v121-v101-v120) + + dz3/(8*dy*zspxs)*(v000+v021-v001-v020); + fine[2](fi+1, fj+1, fk+1, nf) = Real(0.5)*(w110+w112) + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u010+u211-u011-u210) + dz3/(8*dx*yspzs)*(u000+u201-u001-u200)