Skip to content

Commit

Permalink
Fix typos in FaceDivFree interior interpolation.
Browse files Browse the repository at this point in the history
The problem was masked in test in amrex/Tests/DivFreePatch because
all three components were the same.
  • Loading branch information
cgilet committed Jul 25, 2024
1 parent d9dec56 commit 8612196
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Src/AmrCore/AMReX_Interp_3D_C.H
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 8612196

Please sign in to comment.