ImpactX
|
#include <openPMD.H>
Public Types | |
using | PType = typename ImpactXParticleContainer::ParticleType |
using | PinnedContainer = typename ImpactXParticleContainer::ContainerLike< amrex::PinnedArenaAllocator > |
Public Member Functions | |
BeamMonitor (std::string series_name, std::string backend="default", std::string encoding="g") | |
BeamMonitor (BeamMonitor const &other)=default | |
BeamMonitor (BeamMonitor &&other)=default | |
BeamMonitor & | operator= (BeamMonitor const &other)=default |
BeamMonitor & | operator= (BeamMonitor &&other)=default |
void | prepare (PinnedContainer &pc, RefPart const &ref_part, int step) |
void | operator() (ImpactXParticleContainer &pc, int step) |
void | operator() (PinnedContainer::ParIterType &pti, RefPart const &ref_part) |
std::string | series_name () const |
void | finalize () |
![]() | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() ([[maybe_unused]] RefPart &AMREX_RESTRICT refpart) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | nslice () const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | ds () const |
Static Public Attributes | |
static constexpr auto | name = "BeamMonitor" |
static std::map< std::string, std::any > | m_unique_series = {} |
Private Attributes | |
std::string | m_series_name |
std::string | m_OpenPMDFileType |
... More... | |
std::any | m_series |
... More... | |
int | m_step = 0 |
openPMD::Series; ... More... | |
int | m_file_min_digits = 6 |
... More... | |
std::vector< uint64_t > | m_offset |
minimum number of digits to iteration number in file name More... | |
This element writes the particle beam out to openPMD data.
This class behaves like a singleton if constructed with the same series name as an existing instance.
using impactx::diagnostics::BeamMonitor::PinnedContainer = typename ImpactXParticleContainer::ContainerLike<amrex::PinnedArenaAllocator> |
impactx::diagnostics::BeamMonitor::BeamMonitor | ( | std::string | series_name, |
std::string | backend = "default" , |
||
std::string | encoding = "g" |
||
) |
This element writes the particle beam out to openPMD data.
Elements with the same series name are identical.
|
default |
|
default |
void impactx::diagnostics::BeamMonitor::finalize | ( | ) |
Close and deallocate all data series and backends.
void impactx::diagnostics::BeamMonitor::operator() | ( | ImpactXParticleContainer & | pc, |
int | step | ||
) |
Dump all particles.
Particles are relative to the reference particle.
[in,out] | pc | particle container to push |
[in] | step | global step for diagnostics |
void impactx::diagnostics::BeamMonitor::operator() | ( | PinnedContainer::ParIterType & | pti, |
RefPart const & | ref_part | ||
) |
|
default |
|
default |
void impactx::diagnostics::BeamMonitor::prepare | ( | PinnedContainer & | pc, |
RefPart const & | ref_part, | ||
int | step | ||
) |
Prepare entering the element before starting push logic.
[in] | pc | particle container |
[in] | ref_part | reference particle |
[in] | step | global step for diagnostics |
|
inline |
Get the name of the series
Elements with the same series name are identical.
|
private |
...
|
private |
minimum number of digits to iteration number in file name
This rank's offset in the MPI-global particle array, by level
This MUST be updated by prepare() before the next step's output.
|
private |
...
|
private |
...
|
private |
|
private |
openPMD::Series; ...
|
inlinestatic |
track all m_series_name instances
Ensure m_series is the same for the same name.
|
staticconstexpr |