-
Notifications
You must be signed in to change notification settings - Fork 202
/
Copy pathParticleDiag.H
47 lines (39 loc) · 1.62 KB
/
ParticleDiag.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef WARPX_PARTICLEDIAG_H_
#define WARPX_PARTICLEDIAG_H_
#include "ParticleDiag_fwd.H"
#include "Particles/WarpXParticleContainer_fwd.H"
#include "Particles/PinnedMemoryParticleContainer.H"
#include <AMReX_Parser.H>
#include <AMReX_REAL.H>
#include <AMReX_RealBox.H>
#include <AMReX_Vector.H>
#include <memory>
#include <string>
class ParticleDiag
{
public:
ParticleDiag(const std::string& diag_name, const std::string& name,
WarpXParticleContainer* pc, PinnedMemoryParticleContainer *pinned_pc = nullptr);
[[nodiscard]] WarpXParticleContainer* getParticleContainer() const { return m_pc; }
[[nodiscard]] PinnedMemoryParticleContainer* getPinnedParticleContainer() const { return m_pinned_pc; }
[[nodiscard]] std::string getSpeciesName() const { return m_name; }
amrex::Vector<int> m_plot_flags;
bool m_plot_phi = false; // Whether to output the potential phi on the particles
bool m_plot_EM = false; // Whether to output the E and B fields on the particles
bool m_plot_EM_flags[6] = {false, false, false, false, false, false}; // E and B fields
bool m_do_random_filter = false;
bool m_do_uniform_filter = false;
bool m_do_parser_filter = false;
bool m_do_geom_filter = false;
amrex::Real m_random_fraction = 1.0;
int m_uniform_stride = 1;
static constexpr int m_nvars = 7; // t, x, y, z, ux, uy, uz
std::unique_ptr<amrex::Parser> m_particle_filter_parser;
amrex::RealBox m_diag_domain;
private:
std::string m_diag_name;
std::string m_name;
WarpXParticleContainer* m_pc;
PinnedMemoryParticleContainer* m_pinned_pc;
};
#endif // WARPX_PARTICLEDIAG_H_