Skip to content

Commit

Permalink
Revert "Do not use any guard cells"
Browse files Browse the repository at this point in the history
This reverts commit 4fd4dc7.
  • Loading branch information
RemiLehe committed Jan 12, 2025
1 parent 4b8079f commit f45b257
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2304,19 +2304,19 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm
if (lev == maxLevel()) {
if (WarpX::electromagnetic_solver_id != ElectromagneticSolverAlgo::PSATD) {

AllocInitMultiFab(m_eb_update_E[lev][0], amrex::convert(ba, Ex_nodal_flag), dm, 0,
amrex::IntVect::TheZeroVector(), lev, "m_eb_update_E[x]");
AllocInitMultiFab(m_eb_update_E[lev][1], amrex::convert(ba, Ey_nodal_flag), dm, 0,
amrex::IntVect::TheZeroVector(), lev, "m_eb_update_E[y]");
AllocInitMultiFab(m_eb_update_E[lev][2], amrex::convert(ba, Ez_nodal_flag), dm, 0,
amrex::IntVect::TheZeroVector(), lev, "m_eb_update_E[z]");

AllocInitMultiFab(m_eb_update_B[lev][0], amrex::convert(ba, Bx_nodal_flag), dm, 0,
amrex::IntVect::TheZeroVector(), lev, "m_eb_update_B[x]");
AllocInitMultiFab(m_eb_update_B[lev][1], amrex::convert(ba, By_nodal_flag), dm, 0,
amrex::IntVect::TheZeroVector(), lev, "m_eb_update_B[y]");
AllocInitMultiFab(m_eb_update_B[lev][2], amrex::convert(ba, Bz_nodal_flag), dm, 0,
amrex::IntVect::TheZeroVector(), lev, "m_eb_update_B[z]");
AllocInitMultiFab(m_eb_update_E[lev][0], amrex::convert(ba, Ex_nodal_flag), dm, ncomps,
guard_cells.ng_FieldSolver, lev, "m_eb_update_E[x]");
AllocInitMultiFab(m_eb_update_E[lev][1], amrex::convert(ba, Ey_nodal_flag), dm, ncomps,
guard_cells.ng_FieldSolver, lev, "m_eb_update_E[y]");
AllocInitMultiFab(m_eb_update_E[lev][2], amrex::convert(ba, Ez_nodal_flag), dm, ncomps,
guard_cells.ng_FieldSolver, lev, "m_eb_update_E[z]");

AllocInitMultiFab(m_eb_update_B[lev][0], amrex::convert(ba, Bx_nodal_flag), dm, ncomps,
guard_cells.ng_FieldSolver, lev, "m_eb_update_B[x]");
AllocInitMultiFab(m_eb_update_B[lev][1], amrex::convert(ba, By_nodal_flag), dm, ncomps,
guard_cells.ng_FieldSolver, lev, "m_eb_update_B[y]");
AllocInitMultiFab(m_eb_update_B[lev][2], amrex::convert(ba, Bz_nodal_flag), dm, ncomps,
guard_cells.ng_FieldSolver, lev, "m_eb_update_B[z]");

// TODO: do not allocate these arrays anymore with the Yee solver
//! EB: Lengths of the mesh edges
Expand Down

0 comments on commit f45b257

Please sign in to comment.