aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.H')
-rw-r--r--Source/Particles/WarpXParticleContainer.H36
1 files changed, 33 insertions, 3 deletions
diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H
index cde77dc74..1f3551c7b 100644
--- a/Source/Particles/WarpXParticleContainer.H
+++ b/Source/Particles/WarpXParticleContainer.H
@@ -206,9 +206,39 @@ public:
const amrex::MultiFab& By,
const amrex::MultiFab& Bz) = 0;
- void DepositCharge(amrex::Vector<std::unique_ptr<amrex::MultiFab> >& rho,
- bool local = false, bool reset = false,
- bool do_rz_volume_scaling = false );
+ /**
+ * \brief Deposit current density.
+ *
+ * \param[in,out] J vector of current densities (one three-dimensional array of pointers
+ * to MultiFabs per mesh refinement level)
+ * \param[in] dt: Time step for particle level (is used when temporarily
+ * modifying the particle positions, either within the
+ * Esirkepov or when `relative_t` is different than 0
+ * \param[in] relative_t: Time at which to deposit J, relative to the time
+ * of the current positions of the particles (expressed as
+ * a fraction of dt). When different than 0, the particle
+ * position will be temporarily modified to match the
+ * time of the deposition.
+ */
+ void DepositCurrent (amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > >& J,
+ const amrex::Real dt, const amrex::Real relative_t);
+
+ /**
+ * \brief Deposit charge density.
+ *
+ * \param[in,out] rho vector of charge densities (one pointer to MultiFab per mesh refinement level)
+ * \param[in] local if false, exchange the data in the guard cells after the deposition
+ * \param[in] reset if true, reset all values of rho to zero
+ * \param[in] do_rz_volume_scaling whether to scale the final density by some volume norm in RZ geometry
+ * \param[in] interpolate_across_levels whether to average down from the fine patch to the coarse patch
+ * \param[in] icomp component of the MultiFab where rho is deposited (old, new)
+ */
+ void DepositCharge (amrex::Vector<std::unique_ptr<amrex::MultiFab> >& rho,
+ const bool local = false, const bool reset = false,
+ const bool do_rz_volume_scaling = false,
+ const bool interpolate_across_levels = true,
+ const int icomp = 0);
+
std::unique_ptr<amrex::MultiFab> GetChargeDensity(int lev, bool local = false);
virtual void DepositCharge (WarpXParIter& pti,