Skip to content

Commit

Permalink
impose Dirichlet bcs everwhere we can (#1979)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Nov 23, 2024
1 parent e12bec0 commit 17bb541
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Source/BoundaryConditions/ERF_BoundaryConditions_cons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ void ERFPhysBCFunct_cons::impose_lateral_cons_bcs (const Array4<Real>& dest_arr,
{
Box bx_xlo(bx); bx_xlo.setBig (0,dom_lo.x-1);
Box bx_xhi(bx); bx_xhi.setSmall(0,dom_hi.x+1);

//
// If we are setting Dirichlet values, set them in all ghost cells on an inflow face
// "bx" is already grown in the x- and y-directions so here we just grow it in z
//
bx_xlo.grow(2,ng[2]);
bx_xhi.grow(2,ng[2]);
ParallelFor(
bx_xlo, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n)
{
Expand Down Expand Up @@ -109,6 +114,12 @@ void ERFPhysBCFunct_cons::impose_lateral_cons_bcs (const Array4<Real>& dest_arr,
{
Box bx_ylo(bx); bx_ylo.setBig (1,dom_lo.y-1);
Box bx_yhi(bx); bx_yhi.setSmall(1,dom_hi.y+1);
//
// If we are setting Dirichlet values, set them in all ghost cells on an inflow face
// "bx" is already grown in the x- and y-directions so here we just grow it in z
//
bx_ylo.grow(2,ng[2]);
bx_yhi.grow(2,ng[2]);

ParallelFor(
bx_ylo, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n)
Expand Down

0 comments on commit 17bb541

Please sign in to comment.