Functor to calculate per-cell averages of particle properties.
More...
#include <ParticleReductionFunctor.H>
|
| | ParticleReductionFunctor (const amrex::MultiFab *const mf_src, const int lev, const amrex::IntVect crse_ratio, const std::string fn_str, const int ispec, const bool do_average, const bool do_filter, const std::string filter_str, const int ncomp=1) |
| |
| virtual void | operator() (amrex::MultiFab &mf_dst, const int dcomp, const int) const override |
| | Compute the average of the function m_map_fn over each grid cell. More...
|
| |
| | ComputeDiagFunctor (int ncomp, amrex::IntVect crse_ratio) |
| |
| virtual | ~ComputeDiagFunctor ()=default |
| |
| int | nComp () const |
| |
| virtual void | PrepareFunctorData (int i_buffer, bool z_slice_in_domain, amrex::Real current_z_boost, amrex::Box buffer_box, const int k_index_zlab, const int max_box_size, const int snapshot_full) |
| | Prepare data required to process fields in the operator() Note that this function has parameters that are specific to back-transformed diagnostics, that are unused for regular diagnostics. More...
|
| |
| virtual void | InitData () |
| |
Functor to calculate per-cell averages of particle properties.
◆ ParticleReductionFunctor()
| ParticleReductionFunctor::ParticleReductionFunctor |
( |
const amrex::MultiFab *const |
mf_src, |
|
|
const int |
lev, |
|
|
const amrex::IntVect |
crse_ratio, |
|
|
const std::string |
fn_str, |
|
|
const int |
ispec, |
|
|
const bool |
do_average, |
|
|
const bool |
do_filter, |
|
|
const std::string |
filter_str, |
|
|
const int |
ncomp = 1 |
|
) |
| |
Constructor.
- Parameters
-
| [in] | mf_src | source multifab. Must be nullptr as no source MF is needed to compute the number of particles per cell, banane. |
| [in] | lev | level of multifab. |
| [in] | crse_ratio | for interpolating field values from simulation MultiFabs to the output diagnostic MultiFab mf_dst. |
| [in] | fn_str | parser string that describes the function to apply to particles and then average over each cell |
| [in] | ispec | index of the species over which to calculate the average |
| [in] | do_average | Whether to do an average or a sum of the function |
| [in] | do_filter | Whether to apply a filter function to particles before averaging |
| [in] | filter_str | Parser string for filter function to apply before averaging |
| [in] | ncomp | Number of component of mf_src to cell-center in dst multifab. |
◆ operator()()
| void ParticleReductionFunctor::operator() |
( |
amrex::MultiFab & |
mf_dst, |
|
|
const int |
dcomp, |
|
|
const int |
|
|
) |
| const |
|
overridevirtual |
Compute the average of the function m_map_fn over each grid cell.
- Parameters
-
| [out] | mf_dst | output MultiFab where the result is written |
| [in] | dcomp | first component of mf_dst in which cell-centered data is stored |
Implements ComputeDiagFunctor.
◆ m_do_average
| bool const ParticleReductionFunctor::m_do_average |
|
private |
Whether to calculate the average of the data
◆ m_do_filter
| bool const ParticleReductionFunctor::m_do_filter |
|
private |
◆ m_filter_fn
◆ m_filter_fn_parser
| std::unique_ptr<amrex::Parser> ParticleReductionFunctor::m_filter_fn_parser |
|
private |
Parser function to filter particles before pass to map. Arguments: x, y, z, ux, uy, uz
◆ m_ispec
| int const ParticleReductionFunctor::m_ispec |
|
private |
index of species to average over
◆ m_lev
| int const ParticleReductionFunctor::m_lev |
|
private |
level on which mf_src is defined
◆ m_map_fn
◆ m_map_fn_parser
| std::unique_ptr<amrex::Parser> ParticleReductionFunctor::m_map_fn_parser |
|
private |
Parser function to be averaged by the functor. Arguments: x, y, z, ux, uy, uz
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/artemis-em/checkouts/latest/Source/Diagnostics/ComputeDiagFunctors/ParticleReductionFunctor.H
- /home/docs/checkouts/readthedocs.org/user_builds/artemis-em/checkouts/latest/Source/Diagnostics/ComputeDiagFunctors/ParticleReductionFunctor.cpp