Skip to content

Commit

Permalink
add runtime check if particles are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Jan 18, 2024
1 parent 8dcc8f7 commit baf77f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/simulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,12 @@ template <typename problem_t> void AMRSimulation<problem_t>::calculateGpotAllLev
rhs[lev].setVal(0);
}

// deposit particles using amrex::ParticleToMesh
amrex::ParticleToMesh(*CICParticles, amrex::GetVecOfPtrs(rhs), 0, finest_level, quokka::CICDeposition{Gconst_, quokka::ParticleMassIdx, 0, 1});
#ifdef AMREX_PARTICLES
if (do_cic_particles != 0) {
// deposit particles using amrex::ParticleToMesh
amrex::ParticleToMesh(*CICParticles, amrex::GetVecOfPtrs(rhs), 0, finest_level, quokka::CICDeposition{Gconst_, quokka::ParticleMassIdx, 0, 1});
}
#endif

// add fluid density
for (int lev = 0; lev <= finest_level; ++lev) {
Expand Down

0 comments on commit baf77f2

Please sign in to comment.