diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Initialization/WarpXInitData.cpp | 6 | ||||
-rw-r--r-- | Source/WarpX.H | 13 |
2 files changed, 14 insertions, 5 deletions
diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp index 7ee7e1902..0b4e747f5 100644 --- a/Source/Initialization/WarpXInitData.cpp +++ b/Source/Initialization/WarpXInitData.cpp @@ -403,9 +403,9 @@ WarpX::InitializeExternalFieldsOnGridUsingParser ( amrex::IntVect z_nodal_flag = mfz->ixType().toIntVect(); for ( MFIter mfi(*mfx, TilingIfNotGPU()); mfi.isValid(); ++mfi) { - const Box& tbx = mfi.growntilebox(x_nodal_flag); - const Box& tby = mfi.growntilebox(y_nodal_flag); - const Box& tbz = mfi.growntilebox(z_nodal_flag); + const amrex::Box& tbx = mfi.tilebox( x_nodal_flag, mfx->nGrowVect() ); + const amrex::Box& tby = mfi.tilebox( y_nodal_flag, mfy->nGrowVect() ); + const amrex::Box& tbz = mfi.tilebox( z_nodal_flag, mfz->nGrowVect() ); auto const& mfxfab = mfx->array(mfi); auto const& mfyfab = mfy->array(mfi); diff --git a/Source/WarpX.H b/Source/WarpX.H index e080767b7..2737f83b9 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -476,8 +476,17 @@ public: * This function initializes the E and B fields on each level * using the parser and the user-defined function for the external fields. * The subroutine will parse the x_/y_z_external_grid_function and - * then, the B or E multifab is initialized based on the (x,y,z) position - * on the staggered yee-grid or cell-centered grid. + * then, the field multifab is initialized based on the (x,y,z) position + * on the staggered yee-grid or cell-centered grid, in the interior cells + * and guard cells. + * + * \param[in] mfx, x-component of the field to be initialized + * \param[in] mfy, y-component of the field to be initialized + * \param[in] mfz, z-component of the field to be initialized + * \param[in] xfield_parser, parser function to initialize x-field + * \param[in] yfield_parser, parser function to initialize y-field + * \param[in] zfield_parser, parser function to initialize z-field + * \param[in] lev, level of the Multifabs that is initialized */ void InitializeExternalFieldsOnGridUsingParser ( amrex::MultiFab *mfx, amrex::MultiFab *mfy, amrex::MultiFab *mfz, |