WarpX
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FullDiagnostics Class Referencefinal

#include <FullDiagnostics.H>

Inheritance diagram for FullDiagnostics:
Diagnostics

Public Member Functions

 FullDiagnostics (int i, std::string name)
 
- Public Member Functions inherited from Diagnostics
 Diagnostics (int i, std::string name)
 
virtual ~Diagnostics ()
 
void ComputeAndPack ()
 
void InitData ()
 
void NewIteration ()
 
void FilterComputePackFlush (int step, bool force_flush=false)
 

Private Member Functions

void ReadParameters ()
 
void Flush (int i_buffer) override
 
void FlushRaw ()
 
bool DoComputeAndPack (int step, bool force_flush=false) override
 
bool DoDump (int step, int i_buffer, bool force_flush=false) override
 
void AddRZModesToOutputNames (const std::string &field, int ncomp)
 
void AddRZModesToDiags (int lev)
 
void InitializeFieldBufferData (int i_buffer, int lev) override
 
void InitializeFieldFunctors (int lev) override
 
void InitializeParticleBuffer () override
 
void PrepareFieldDataForOutput () override
 
void MovingWindowAndGalileanDomainShift () override
 

Private Attributes

IntervalsParser m_intervals
 
bool m_plot_raw_fields = false
 
bool m_plot_raw_fields_guards = false
 
bool m_plot_raw_rho = false
 
bool m_plot_raw_F = false
 
bool m_dump_rz_modes = false
 

Additional Inherited Members

- Protected Member Functions inherited from Diagnostics
bool BaseReadParameters ()
 
void InitBaseData ()
 
virtual void DerivedInitData ()
 
- Protected Attributes inherited from Diagnostics
std::string m_diag_name
 
std::string m_file_prefix
 
int m_diag_index
 
amrex::Vector< std::string > m_varnames
 
std::string m_format = "plotfile"
 
int m_already_done = false
 
FlushFormatm_flush_format
 
amrex::Vector< amrex::Vector< amrex::MultiFab > > m_mf_output
 
amrex::Vector< amrex::Vector< amrex::Geometry > > m_geom_output
 
int nlev
 
int nmax_lev
 
int nlev_output
 
std::vector< std::string > m_species_names
 
amrex::Vector< ParticleDiagm_all_species
 
amrex::Vector< amrex::Vector< std::unique_ptr< ComputeDiagFunctor > > > m_all_field_functors
 
amrex::IntVect m_crse_ratio = amrex::IntVect(1)
 
amrex::Vector< amrex::Real > m_lo
 
amrex::Vector< amrex::Real > m_hi
 
int m_num_buffers
 
amrex::Vector< int > m_rho_per_species_index
 

Constructor & Destructor Documentation

◆ FullDiagnostics()

FullDiagnostics::FullDiagnostics ( int  i,
std::string  name 
)

Member Function Documentation

◆ AddRZModesToDiags()

void FullDiagnostics::AddRZModesToDiags ( int  lev)
private

Append m_all_field_functors[lev] with all modes of all components of E B and j and add name to varnames.

Parameters
[in]levlevel on which source multifabs are defined.

◆ AddRZModesToOutputNames()

void FullDiagnostics::AddRZModesToOutputNames ( const std::string &  field,
int  ncomp 
)
private

Append varnames with names for all modes of a field

Parameters
[in]fieldfield name (includes component, e.g., Er)
[in]ncompnumber of components (modes, real and imag)

◆ DoComputeAndPack()

bool FullDiagnostics::DoComputeAndPack ( int  step,
bool  force_flush = false 
)
overrideprivatevirtual

whether to compute and pack cell-centered data in m_mf_output

Parameters
[in]stepcurrent time step
[in]force_flushif true, return true for any step since output must be computed in this case
Returns
bool, whether to flush

Implements Diagnostics.

◆ DoDump()

bool FullDiagnostics::DoDump ( int  step,
int  i_buffer,
bool  force_flush = false 
)
overrideprivatevirtual

whether to flush at this time step

Parameters
[in]stepcurrent time step
[in]force_flushif true, return true for any step
Returns
bool, whether to flush

Implements Diagnostics.

◆ Flush()

void FullDiagnostics::Flush ( int  i_buffer)
overrideprivatevirtual

Flush m_mf_output and particles to file for the i^th buffer

Implements Diagnostics.

◆ FlushRaw()

void FullDiagnostics::FlushRaw ( )
private

Flush raw data

◆ InitializeFieldBufferData()

void FullDiagnostics::InitializeFieldBufferData ( int  i_buffer,
int  lev 
)
overrideprivatevirtual

Define the cell-centered multifab m_mf_output depending on user-defined lo and hi and coarsening ratio. This MultiFab may have a different BoxArray and DistributionMap than field MultiFabs in the simulation.

Parameters
[in]levlevel on which source multifabs are defined

Implements Diagnostics.

◆ InitializeFieldFunctors()

void FullDiagnostics::InitializeFieldFunctors ( int  lev)
overrideprivatevirtual

Initialize functors that store pointers to the fields requested by the user.

Parameters
[in]levlevel on which the vector of unique_ptrs to field functors is initialized.

Implements Diagnostics.

◆ InitializeParticleBuffer()

void FullDiagnostics::InitializeParticleBuffer ( )
overrideprivatevirtual

This function initialized particle buffers (not implemented in diagnostics, yet)

Implements Diagnostics.

◆ MovingWindowAndGalileanDomainShift()

void FullDiagnostics::MovingWindowAndGalileanDomainShift ( )
overrideprivatevirtual

Update the physical extent of the diagnostic domain for moving window and galilean shift simulations

Reimplemented from Diagnostics.

◆ PrepareFieldDataForOutput()

void FullDiagnostics::PrepareFieldDataForOutput ( )
overrideprivatevirtual

Prepare field data to be used for diagnostics

Reimplemented from Diagnostics.

◆ ReadParameters()

void FullDiagnostics::ReadParameters ( )
private

Read user-requested parameters for full diagnostics

Member Data Documentation

◆ m_dump_rz_modes

bool FullDiagnostics::m_dump_rz_modes = false
private

Whether to dump the RZ modes

◆ m_intervals

IntervalsParser FullDiagnostics::m_intervals
private

Determines timesteps at which full diagnostics are written to file

◆ m_plot_raw_F

bool FullDiagnostics::m_plot_raw_F = false
private

Whether to plot F (charge conservation error) in raw fields

◆ m_plot_raw_fields

bool FullDiagnostics::m_plot_raw_fields = false
private

Whether to plot raw (i.e., NOT cell-centered) fields

◆ m_plot_raw_fields_guards

bool FullDiagnostics::m_plot_raw_fields_guards = false
private

Whether to plot guard cells of raw fields

◆ m_plot_raw_rho

bool FullDiagnostics::m_plot_raw_rho = false
private

Whether to plot charge density rho in raw fields


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