WarpX
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
FieldProbe Class Reference

#include <FieldProbe.H>

Inheritance diagram for FieldProbe:
ReducedDiags

Public Member Functions

 FieldProbe (const std::string &rd_name)
 
void InitData () final
 
void LoadBalance () final
 
void ComputeDiags (int step) final
 
- Public Member Functions inherited from ReducedDiags
 ReducedDiags (const std::string &rd_name)
 
virtual ~ReducedDiags ()=default
 
 ReducedDiags (const ReducedDiags &)=default
 
ReducedDiagsoperator= (const ReducedDiags &)=default
 
 ReducedDiags (ReducedDiags &&)=default
 
ReducedDiagsoperator= (ReducedDiags &&)=default
 
void BackwardCompatibility () const
 

Static Public Attributes

static const int noutputs = 11
 noutputs is 11 for particle id + (x, y, z, Ex, Ey, Ez, Bx, By, Bz, S) More...
 

Private Member Functions

void WriteToFile (int step) const override
 
bool ProbeInDomain () const
 
void normalize (amrex::Real &AMREX_RESTRICT x, amrex::Real &AMREX_RESTRICT y, amrex::Real &AMREX_RESTRICT z)
 

Private Attributes

amrex::Real x_probe = 0.
 
amrex::Real y_probe = 0.
 
amrex::Real x1_probe = 0.
 
amrex::Real y1_probe = 0.
 
amrex::Real target_normal_x = 0.
 
amrex::Real target_normal_y = 1.
 
amrex::Real target_normal_z = 0.
 
amrex::Real target_up_x = 0.
 
amrex::Real target_up_y = 0.
 
amrex::Real target_up_z = 1.
 
amrex::Real z_probe
 
amrex::Real z1_probe
 
amrex::Real detector_radius
 
long m_valid_particles {0}
 counts number of particles for all MPI ranks More...
 
int m_last_compute_step = 0
 remember the last time More...
 
DetectorGeometry m_probe_geometry = DetectorGeometry::Point
 determines geometry of detector point distribution More...
 
int m_resolution = 0
 determines number of particles places for non-point geometries More...
 
amrex::Vector< amrex::Real > m_data
 Empty vector for to which data is pushed. More...
 
amrex::Vector< amrex::Real > m_data_out
 Empty array to be used by IOProcessor node to store and output data. More...
 
FieldProbeParticleContainer m_probe
 this is the particle container in which probe particles are stored More...
 
bool m_field_probe_integrate = false
 if true, integrate values over time instead of probing instantaneous values More...
 
int interp_order = 1
 particle shape used for field gather More...
 
bool do_moving_window_FP = false
 Judges whether to follow a moving window. More...
 

Additional Inherited Members

- Public Attributes inherited from ReducedDiags
std::string m_path = "./diags/reducedfiles/"
 output path (default) More...
 
std::string m_extension = "txt"
 output extension (default) More...
 
std::string m_rd_name
 diags name More...
 
utils::parser::IntervalsParser m_intervals
 output intervals More...
 
bool m_write_header = false
 check if header should be written More...
 
std::string m_sep = " "
 separator in the output file More...
 
int m_precision = 14
 precision for data in the output file More...
 
std::vector< amrex::Real > m_data
 output data More...
 

Detailed Description

This class mainly contains a function that computes the value of each component of the EM field at a given point

Constructor & Destructor Documentation

◆ FieldProbe()

FieldProbe::FieldProbe ( const std::string &  rd_name)

constructor

Parameters
[in]rd_namereduced diags names

Member Function Documentation

◆ ComputeDiags()

void FieldProbe::ComputeDiags ( int  step)
finalvirtual

This function computes the value of Ex, Ey, Ez, Bx, By, Bz and at a given point

Parameters
[in]stepcurrent time step

Implements ReducedDiags.

◆ InitData()

void FieldProbe::InitData ( )
finalvirtual

This function assins test/data particles to constructed environemnt

Reimplemented from ReducedDiags.

◆ LoadBalance()

void FieldProbe::LoadBalance ( )
finalvirtual

Redistribute parallel data structures during load balance

Reimplemented from ReducedDiags.

◆ normalize()

void FieldProbe::normalize ( amrex::Real &AMREX_RESTRICT  x,
amrex::Real &AMREX_RESTRICT  y,
amrex::Real &AMREX_RESTRICT  z 
)
inlineprivate

Simple utility function to normalize the components of a "vector"

◆ ProbeInDomain()

bool FieldProbe::ProbeInDomain ( ) const
private

Check if the probe is in the simulation domain boundary

◆ WriteToFile()

void FieldProbe::WriteToFile ( int  step) const
overrideprivatevirtual

Built-in function in ReducedDiags to write out test data

Reimplemented from ReducedDiags.

Member Data Documentation

◆ detector_radius

amrex::Real FieldProbe::detector_radius
private

◆ do_moving_window_FP

bool FieldProbe::do_moving_window_FP = false
private

Judges whether to follow a moving window.

◆ interp_order

int FieldProbe::interp_order = 1
private

particle shape used for field gather

◆ m_data

amrex::Vector<amrex::Real> FieldProbe::m_data
private

Empty vector for to which data is pushed.

◆ m_data_out

amrex::Vector<amrex::Real> FieldProbe::m_data_out
private

Empty array to be used by IOProcessor node to store and output data.

◆ m_field_probe_integrate

bool FieldProbe::m_field_probe_integrate = false
private

if true, integrate values over time instead of probing instantaneous values

◆ m_last_compute_step

int FieldProbe::m_last_compute_step = 0
private

remember the last time

See also
ComputeDiags was called to count the number of steps in between (for non-integrated detectors)

◆ m_probe

FieldProbeParticleContainer FieldProbe::m_probe
private

this is the particle container in which probe particles are stored

◆ m_probe_geometry

DetectorGeometry FieldProbe::m_probe_geometry = DetectorGeometry::Point
private

determines geometry of detector point distribution

◆ m_resolution

int FieldProbe::m_resolution = 0
private

determines number of particles places for non-point geometries

◆ m_valid_particles

long FieldProbe::m_valid_particles {0}
private

counts number of particles for all MPI ranks

◆ noutputs

const int FieldProbe::noutputs = 11
static

noutputs is 11 for particle id + (x, y, z, Ex, Ey, Ez, Bx, By, Bz, S)

◆ target_normal_x

amrex::Real FieldProbe::target_normal_x = 0.
private

◆ target_normal_y

amrex::Real FieldProbe::target_normal_y = 1.
private

◆ target_normal_z

amrex::Real FieldProbe::target_normal_z = 0.
private

◆ target_up_x

amrex::Real FieldProbe::target_up_x = 0.
private

◆ target_up_y

amrex::Real FieldProbe::target_up_y = 0.
private

◆ target_up_z

amrex::Real FieldProbe::target_up_z = 1.
private

◆ x1_probe

amrex::Real FieldProbe::x1_probe = 0.
private

◆ x_probe

amrex::Real FieldProbe::x_probe = 0.
private

◆ y1_probe

amrex::Real FieldProbe::y1_probe = 0.
private

◆ y_probe

amrex::Real FieldProbe::y_probe = 0.
private

◆ z1_probe

amrex::Real FieldProbe::z1_probe
private

◆ z_probe

amrex::Real FieldProbe::z_probe
private

The documentation for this class was generated from the following files: