Skip to content

Commit

Permalink
set K to 0 before qdsmc particle container DepositK(...) is called
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoacc95 committed Nov 25, 2024
1 parent 48be64c commit 3afa998
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Source/Fluids/QdsmcParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,6 @@ QdsmcParticleContainer::PushX (int lev, amrex::Real dt)


// Generalize this function to --> DepositScalar
// does this fill the guard cells ?
// do I need to add those cells between boxes after the particle iterator?
void
QdsmcParticleContainer::DepositK(int lev, amrex::MultiFab &Kfield)
{
Expand All @@ -361,14 +359,13 @@ QdsmcParticleContainer::DepositK(int lev, amrex::MultiFab &Kfield)
const amrex::Geometry &geom = warpx.Geom(lev);
const amrex::Periodicity &period = geom.periodicity();

// We need to set the K multifab to 0 before depositing K values from qdsmc particles
Kfield.setVal(0._rt);

for (iterator pti(*this, lev); pti.isValid(); ++pti)
{
auto const np = pti.numParticles();

// making box cell centered
//amrex::Box box = pti.tilebox();
//box.grow(Kfield.nGrowVect());

amrex::Box box = pti.tilebox();
const amrex::XDim3 xyzmin = warpx.LowerCorner(box, lev, 0._rt);

Expand Down

0 comments on commit 3afa998

Please sign in to comment.