Skip to content

Commit

Permalink
Fixes to match changes from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Oct 14, 2023
1 parent 4c10fe7 commit c5b8ea1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
1 change: 1 addition & 0 deletions Source/BoundaryConditions/WarpX_PEC.H
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ using namespace amrex;
GuardCell = true;
// tangential components are inverted across PEC boundary
if (is_tangent_to_PEC) sign *= -1._rt;
#if (defined WARPX_DIM_RZ)
if (icomp == 0 && idim == 0 && iside == 1) {
// Add radial scale so that drEr/dr = 0.
// This only works for the first guard cell and with
Expand Down
28 changes: 14 additions & 14 deletions Source/Evolve/WarpXEvolveImplicitPicard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ WarpX::EvolveImplicitPicardInit (const int lev)
// Strange, the WarpX::DistributionMap(0) is not consistent with Ex_fp.DistributionMap()???

// Note that the *_fp will be the n+theta and n+1 time level
AllocInitMultiFabFromModel(Efield_n[lev][0], *Efield_fp[0][0], "Efield_n[0]");
AllocInitMultiFabFromModel(Efield_n[lev][1], *Efield_fp[0][1], "Efield_n[1]");
AllocInitMultiFabFromModel(Efield_n[lev][2], *Efield_fp[0][2], "Efield_n[2]");
AllocInitMultiFabFromModel(Bfield_n[lev][0], *Bfield_fp[0][0], "Bfield_n[0]");
AllocInitMultiFabFromModel(Bfield_n[lev][1], *Bfield_fp[0][1], "Bfield_n[1]");
AllocInitMultiFabFromModel(Bfield_n[lev][2], *Bfield_fp[0][2], "Bfield_n[2]");

AllocInitMultiFabFromModel(Efield_save[lev][0], *Efield_fp[0][0], "Efield_save[0]");
AllocInitMultiFabFromModel(Efield_save[lev][1], *Efield_fp[0][1], "Efield_save[1]");
AllocInitMultiFabFromModel(Efield_save[lev][2], *Efield_fp[0][2], "Efield_save[2]");
AllocInitMultiFabFromModel(Bfield_save[lev][0], *Bfield_fp[0][0], "Bfield_save[0]");
AllocInitMultiFabFromModel(Bfield_save[lev][1], *Bfield_fp[0][1], "Bfield_save[1]");
AllocInitMultiFabFromModel(Bfield_save[lev][2], *Bfield_fp[0][2], "Bfield_save[2]");
AllocInitMultiFabFromModel(Efield_n[lev][0], *Efield_fp[0][0], lev, "Efield_n[0]");
AllocInitMultiFabFromModel(Efield_n[lev][1], *Efield_fp[0][1], lev, "Efield_n[1]");
AllocInitMultiFabFromModel(Efield_n[lev][2], *Efield_fp[0][2], lev, "Efield_n[2]");
AllocInitMultiFabFromModel(Bfield_n[lev][0], *Bfield_fp[0][0], lev, "Bfield_n[0]");
AllocInitMultiFabFromModel(Bfield_n[lev][1], *Bfield_fp[0][1], lev, "Bfield_n[1]");
AllocInitMultiFabFromModel(Bfield_n[lev][2], *Bfield_fp[0][2], lev, "Bfield_n[2]");

AllocInitMultiFabFromModel(Efield_save[lev][0], *Efield_fp[0][0], lev, "Efield_save[0]");
AllocInitMultiFabFromModel(Efield_save[lev][1], *Efield_fp[0][1], lev, "Efield_save[1]");
AllocInitMultiFabFromModel(Efield_save[lev][2], *Efield_fp[0][2], lev, "Efield_save[2]");
AllocInitMultiFabFromModel(Bfield_save[lev][0], *Bfield_fp[0][0], lev, "Bfield_save[0]");
AllocInitMultiFabFromModel(Bfield_save[lev][1], *Bfield_fp[0][1], lev, "Bfield_save[1]");
AllocInitMultiFabFromModel(Bfield_save[lev][2], *Bfield_fp[0][2], lev, "Bfield_save[2]");

}

Expand Down Expand Up @@ -125,7 +125,7 @@ WarpX::EvolveImplicitPicard (int numsteps)
WARPX_PROFILE("WarpX::EvolveImplicitPicard::step");
Real evolve_time_beg_step = amrex::second();

CheckSignals();
SignalHandling::CheckSignals();

multi_diags->NewIteration();

Expand Down
2 changes: 2 additions & 0 deletions Source/Particles/Deposition/CurrentDeposition.H
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void doDepositionShapeNKernel(const amrex::ParticleReal xp,
const amrex::Dim3 lo,
const int n_rz_azimuthal_modes)
{
using namespace amrex::literals;
#if !defined(WARPX_DIM_RZ)
amrex::ignore_unused(n_rz_azimuthal_modes);
#endif
Expand Down Expand Up @@ -446,6 +447,7 @@ void doDepositionShapeNImplicit(const GetParticlePosition& GetPosition,
amrex::Real* cost,
const long load_balance_costs_update_algo)
{
using namespace amrex::literals;
#if !defined(WARPX_DIM_RZ)
amrex::ignore_unused(n_rz_azimuthal_modes);
#endif
Expand Down
1 change: 1 addition & 0 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ public:
static void AllocInitMultiFabFromModel (
std::unique_ptr<amrex::MultiFab>& mf,
amrex::MultiFab& mf_model,
int level,
const std::string& name,
std::optional<const amrex::Real> initial_value = {});

Expand Down
6 changes: 4 additions & 2 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3273,14 +3273,16 @@ void
WarpX::AllocInitMultiFabFromModel (
std::unique_ptr<amrex::MultiFab>& mf,
amrex::MultiFab& mf_model,
const int level,
const std::string& name,
std::optional<const amrex::Real> initial_value)
{
const auto tag = amrex::MFInfo().SetTag(name);
const auto name_with_suffix = TagWithLevelSuffix(name, level);
const auto tag = amrex::MFInfo().SetTag(name_with_suffix);
mf = std::make_unique<amrex::MultiFab>(mf_model.boxArray(), mf_model.DistributionMap(),
mf_model.nComp(), mf_model.nGrowVect(), tag);
if (initial_value) {
mf->setVal(*initial_value);
}
WarpX::AddToMultiFabMap(name, mf);
multifab_map[name_with_suffix] = mf.get();
}

0 comments on commit c5b8ea1

Please sign in to comment.