Skip to content

Commit

Permalink
Add comment "Unused dimensions are considered nodal"
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Sep 13, 2024
1 parent d86bd62 commit c235464
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Parallelization/WarpXComm_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void warpx_interp (int j, int k, int l,
const int rl = (AMREX_SPACEDIM > 2) ? rr[2] : 1;

// Staggering (0: cell-centered; 1: nodal)
// Unused dimensions are considered nodal.
const int sj = arr_stag[0];
const int sk = (AMREX_SPACEDIM > 1) ? arr_stag[1] : 1;
const int sl = (AMREX_SPACEDIM > 2) ? arr_stag[2] : 1;
Expand Down Expand Up @@ -137,11 +138,13 @@ void warpx_interp (int j, int k, int l,
const int rl = (AMREX_SPACEDIM > 2) ? rr[2] : 1;

// Staggering of fine array (0: cell-centered; 1: nodal)
// Unused dimensions are considered nodal.
const int sj_fp = arr_fine_stag[0];
const int sk_fp = (AMREX_SPACEDIM > 1) ? arr_fine_stag[1] : 1;
const int sl_fp = (AMREX_SPACEDIM > 2) ? arr_fine_stag[2] : 1;

// Staggering of coarse array (0: cell-centered; 1: nodal)
// Unused dimensions are considered nodal.
const int sj_cp = arr_coarse_stag[0];
const int sk_cp = (AMREX_SPACEDIM > 1) ? arr_coarse_stag[1] : 1;
const int sl_cp = (AMREX_SPACEDIM > 2) ? arr_coarse_stag[2] : 1;
Expand Down Expand Up @@ -269,6 +272,7 @@ void warpx_interp (int j, int k, int l,
// - (x,y,z) in 3D

// Staggering of fine array (0: cell-centered; 1: nodal)
// Unused dimensions are considered nodal.
const int sj_fp = arr_fine_stag[0];
const int sk_fp = (AMREX_SPACEDIM > 1) ? arr_fine_stag[1] : 1;
const int sl_fp = (AMREX_SPACEDIM > 2) ? arr_fine_stag[2] : 1;
Expand Down Expand Up @@ -357,6 +361,7 @@ void warpx_interp (const int j,
const int shift = (dst_nodal) ? 0 : 1;

// Staggering (s = 0 if cell-centered, s = 1 if nodal)
// Unused dimensions are considered nodal.
const int sj = (dst_nodal) ? src_stag[0] : dst_stag[0];
const int sk = (AMREX_SPACEDIM > 1) ? ((dst_nodal) ? src_stag[1] : dst_stag[1]) : 1;
const int sl = (AMREX_SPACEDIM > 2) ? ((dst_nodal) ? src_stag[2] : dst_stag[2]) : 1;
Expand Down

0 comments on commit c235464

Please sign in to comment.