Hipace
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Diagnostic Class Reference

This class holds data for all diagnostics. More...

#include <Diagnostic.H>

Public Member Functions

 Diagnostic (int nlev)
 Constructor. More...
 
void Initialize (const int lev, bool do_laser)
 Determine which data to output. More...
 
amrex::Vector< std::string > & getBeamNames ()
 return names of the beams to output More...
 
amrex::Vector< FieldDiagnosticData > & getFieldData ()
 return data for all field diagnostics More...
 
bool hasAnyFieldOutput (int output_step, int max_step, amrex::Real output_time, amrex::Real max_time) const
 determines if any field diagnostic has any output on in this time step More...
 
bool hasBeamOutput (int output_step, int max_step, amrex::Real output_time, amrex::Real max_time) const
 determines if any beam diagnostic has any output on in this time step More...
 
bool hasAnyOutput (int output_step, int max_step, amrex::Real output_time, amrex::Real max_time) const
 determines if any field or beam diagnostic has any output on in this time step More...
 
bool needsRho () const
 determines if rho is requested as a diagnostic More...
 
bool needsRhoIndividual () const
 determines if rho for every individual plasma is requested as a diagnostic More...
 
void TrimIOBox (int slice_dir, amrex::Box &domain_3d, amrex::RealBox &rbox_3d)
 calculate box which possibly was trimmed in case of slice IO More...
 
void ResizeFDiagFAB (const amrex::Box a_domain, const int lev, amrex::Geometry const &geom, int output_step, int max_step, amrex::Real output_time, amrex::Real max_time)
 resizes the FArrayBox of the diagnostics to the currently calculated box More...
 

Static Public Member Functions

static bool hasFieldOutput (const FieldDiagnosticData &fd, int output_step, int max_step, amrex::Real output_time, amrex::Real max_time)
 determines if a single field diagnostic has any output on in this time step More...
 

Private Attributes

amrex::Vector< std::string > m_output_beam_names
 
int m_beam_output_period = 0
 
amrex::Vector< FieldDiagnosticDatam_field_data
 
bool m_initialized = false
 

Detailed Description

This class holds data for all diagnostics.

Constructor & Destructor Documentation

◆ Diagnostic()

Diagnostic::Diagnostic ( int  nlev)
explicit

Constructor.

Member Function Documentation

◆ getBeamNames()

amrex::Vector<std::string>& Diagnostic::getBeamNames ( )
inline

return names of the beams to output

◆ getFieldData()

amrex::Vector<FieldDiagnosticData>& Diagnostic::getFieldData ( )
inline

return data for all field diagnostics

◆ hasAnyFieldOutput()

bool Diagnostic::hasAnyFieldOutput ( int  output_step,
int  max_step,
amrex::Real  output_time,
amrex::Real  max_time 
) const
inline

determines if any field diagnostic has any output on in this time step

Parameters
[in]output_stepcurrent step index
[in]max_steplast step index
[in]output_timephysical time of current step
[in]max_timephysical time of last step

◆ hasAnyOutput()

bool Diagnostic::hasAnyOutput ( int  output_step,
int  max_step,
amrex::Real  output_time,
amrex::Real  max_time 
) const
inline

determines if any field or beam diagnostic has any output on in this time step

Parameters
[in]output_stepcurrent step index
[in]max_steplast step index
[in]output_timephysical time of current step
[in]max_timephysical time of last step

◆ hasBeamOutput()

bool Diagnostic::hasBeamOutput ( int  output_step,
int  max_step,
amrex::Real  output_time,
amrex::Real  max_time 
) const
inline

determines if any beam diagnostic has any output on in this time step

Parameters
[in]output_stepcurrent step index
[in]max_steplast step index
[in]output_timephysical time of current step
[in]max_timephysical time of last step

◆ hasFieldOutput()

static bool Diagnostic::hasFieldOutput ( const FieldDiagnosticData fd,
int  output_step,
int  max_step,
amrex::Real  output_time,
amrex::Real  max_time 
)
inlinestatic

determines if a single field diagnostic has any output on in this time step

Parameters
[in]fdfield diagnostic
[in]output_stepcurrent step index
[in]max_steplast step index
[in]output_timephysical time of current step
[in]max_timephysical time of last step

◆ Initialize()

void Diagnostic::Initialize ( const int  lev,
bool  do_laser 
)

Determine which data to output.

◆ needsRho()

bool Diagnostic::needsRho ( ) const

determines if rho is requested as a diagnostic

◆ needsRhoIndividual()

bool Diagnostic::needsRhoIndividual ( ) const

determines if rho for every individual plasma is requested as a diagnostic

◆ ResizeFDiagFAB()

void Diagnostic::ResizeFDiagFAB ( const amrex::Box  a_domain,
const int  lev,
amrex::Geometry const &  geom,
int  output_step,
int  max_step,
amrex::Real  output_time,
amrex::Real  max_time 
)

resizes the FArrayBox of the diagnostics to the currently calculated box

Parameters
[in]a_domainbox to which the Geometry of the diagnostics will be resized to
[in]levMR level
[in]geomgeometry of the full simulation domain
[in]output_stepcurrent step index
[in]max_steplast step index
[in]output_timephysical time of current step
[in]max_timephysical time of last step

◆ TrimIOBox()

void Diagnostic::TrimIOBox ( int  slice_dir,
amrex::Box domain_3d,
amrex::RealBox rbox_3d 
)

calculate box which possibly was trimmed in case of slice IO

Parameters
[in]slice_dirslicing direction
[in,out]domain_3ddomain box to be possibly trimmed to a slice box
[in,out]rbox_3dreal box to be possibly trimmed to a slice box

Member Data Documentation

◆ m_beam_output_period

int Diagnostic::m_beam_output_period = 0
private

Number of iterations between consecutive output dumps. Default is 0, meaning no output

◆ m_field_data

amrex::Vector<FieldDiagnosticData> Diagnostic::m_field_data
private

individual field diag data

◆ m_initialized

bool Diagnostic::m_initialized = false
private

if this object is fully initialized

◆ m_output_beam_names

amrex::Vector<std::string> Diagnostic::m_output_beam_names
private

Component names to Write to output file


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