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 (std::string rd_name)
 
void InitData () override final
 
void LoadBalance () override final
 
void ComputeDiags (int step) override final
 
- Public Member Functions inherited from ReducedDiags
 ReducedDiags (std::string rd_name)
 
virtual ~ReducedDiags ()=default
 
void BackwardCompatibility ()
 

Static Public Attributes

static constexpr int noutputs = FieldProbePIdx::nattribs + 3
 noutputs is 10 (x, y, z, Ex, Ey, Ez, Bx, By, Bz, S) More...
 

Private Member Functions

virtual void WriteToFile (int step) const override
 
bool ProbeInDomain () const
 

Private Attributes

amrex::Real x_probe
 
amrex::Real y_probe
 
amrex::Real z_probe
 
amrex::Real x1_probe
 
amrex::Real y1_probe
 
amrex::Real z1_probe
 
amrex::Real target_normal_x
 
amrex::Real target_normal_y
 
amrex::Real target_normal_z
 
amrex::Real target_up_x
 
amrex::Real target_up_y
 
amrex::Real target_up_z
 
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 raw_fields = false
 Judges whether to gather raw fields or interpolated data. 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...
 
int m_IsNotRestart = 1
 check if it is a restart run More...
 
std::string m_sep = " "
 separator 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 ( std::string  rd_name)

constructor

Parameters
[in]rd_namereduced diags names

Member Function Documentation

◆ ComputeDiags()

void FieldProbe::ComputeDiags ( int  step)
finaloverridevirtual

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 ( )
finaloverridevirtual

This function assins test/data particles to constructed environemnt

Reimplemented from ReducedDiags.

◆ LoadBalance()

void FieldProbe::LoadBalance ( )
finaloverridevirtual

Redistribute parallel data structures during load balance

Reimplemented from ReducedDiags.

◆ 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

constexpr int FieldProbe::noutputs = FieldProbePIdx::nattribs + 3
static

noutputs is 10 (x, y, z, Ex, Ey, Ez, Bx, By, Bz, S)

◆ raw_fields

bool FieldProbe::raw_fields = false
private

Judges whether to gather raw fields or interpolated data.

◆ target_normal_x

amrex::Real FieldProbe::target_normal_x
private

◆ target_normal_y

amrex::Real FieldProbe::target_normal_y
private

◆ target_normal_z

amrex::Real FieldProbe::target_normal_z
private

◆ target_up_x

amrex::Real FieldProbe::target_up_x
private

◆ target_up_y

amrex::Real FieldProbe::target_up_y
private

◆ target_up_z

amrex::Real FieldProbe::target_up_z
private

◆ x1_probe

amrex::Real FieldProbe::x1_probe
private

◆ x_probe

amrex::Real FieldProbe::x_probe
private

◆ y1_probe

amrex::Real FieldProbe::y1_probe
private

◆ y_probe

amrex::Real FieldProbe::y_probe
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: