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

#include <BoundaryScrapingDiagnostics.H>

Inheritance diagram for BoundaryScrapingDiagnostics:
Diagnostics

Public Member Functions

 BoundaryScrapingDiagnostics (int i, const std::string &name)
 
- Public Member Functions inherited from Diagnostics
 Diagnostics (int i, std::string name)
 
virtual ~Diagnostics ()
 
 Diagnostics (Diagnostics const &)=delete
 
Diagnosticsoperator= (Diagnostics const &)=delete
 
 Diagnostics (Diagnostics &&)=default
 
Diagnosticsoperator= (Diagnostics &&)=default
 
void ComputeAndPack ()
 
void InitData ()
 
void InitDataBeforeRestart ()
 
void InitDataAfterRestart ()
 
virtual void InitializeFieldFunctorsRZopenPMD ([[maybe_unused]] int lev)
 
virtual void InitializeParticleFunctors ()
 
void NewIteration ()
 
void FilterComputePackFlush (int step, bool force_flush=false)
 
bool DoDumpLastTimestep () const
 
int getnumbuffers () const
 
virtual amrex::Real gettlab ([[maybe_unused]] int i_buffer)
 
virtual void settlab ([[maybe_unused]] int i_buffer, [[maybe_unused]] amrex::Real tlab)
 
virtual int get_buffer_k_index_hi ([[maybe_unused]] int i_buffer)
 
virtual void set_buffer_k_index_hi ([[maybe_unused]] int i_buffer, [[maybe_unused]] int kindex)
 
virtual amrex::Real get_snapshot_domain_lo ([[maybe_unused]] int i_buffer, [[maybe_unused]] int idim)
 
virtual amrex::Real get_snapshot_domain_hi ([[maybe_unused]] int i_buffer, [[maybe_unused]] int idim)
 
void setSnapshotDomainLo (int i_buffer, int idim, amrex::Real domain_lab_lo)
 
void setSnapshotDomainHi (int i_buffer, int idim, amrex::Real domain_lab_hi)
 
virtual int get_flush_counter ([[maybe_unused]] int i_buffer)
 
virtual void set_flush_counter ([[maybe_unused]] int i_buffer, [[maybe_unused]] int flush_counter)
 
virtual int get_last_valid_Zslice ([[maybe_unused]] int i_buffer)
 
virtual void set_last_valid_Zslice ([[maybe_unused]] int i_buffer, [[maybe_unused]] int last_valid_Zslice)
 
virtual int get_snapshot_full_flag ([[maybe_unused]] int i_buffer)
 
virtual void set_snapshot_full ([[maybe_unused]] int i_buffer, [[maybe_unused]] int snapshot_full)
 

Private Member Functions

void ReadParameters ()
 
void Flush (int i_buffer, bool) override
 Flush data to file. More...
 
bool DoDump (int step, int i_buffer, bool force_flush=false) override
 Return whether to dump data to file at this time step. (i.e. whether to call Flush) More...
 
bool DoComputeAndPack (int step, bool force_flush=false) override
 
void InitializeBufferData (int i_buffer, int lev, bool restart=false) override
 
void InitializeFieldFunctors (int lev) override
 
void InitializeParticleBuffer () override
 

Private Attributes

utils::parser::IntervalsParser m_intervals
 

Additional Inherited Members

- Protected Member Functions inherited from Diagnostics
bool BaseReadParameters ()
 
void InitBaseData ()
 
virtual void DerivedInitData ()
 
virtual void PrepareBufferData ()
 
virtual void UpdateBufferData ()
 
virtual void PrepareFieldDataForOutput ()
 
virtual void PrepareParticleDataForOutput ()
 
virtual void MovingWindowAndGalileanDomainShift (int step)
 
- Protected Attributes inherited from Diagnostics
std::string m_diag_name
 
std::string m_file_prefix
 
int m_file_min_digits = 6
 
int m_diag_index
 
amrex::Vector< std::string > m_varnames
 
amrex::Vector< std::string > m_varnames_fields
 
amrex::Vector< std::string > m_pfield_varnames
 
std::vector< std::string > m_pfield_species
 
std::vector< bool > m_pfield_do_average
 
std::vector< intm_pfield_species_index
 
std::vector< std::string > m_pfield_strings
 
std::vector< bool > m_pfield_dofilter
 
std::vector< std::string > m_pfield_filter_strings
 
bool m_dump_last_timestep = true
 
std::string m_format = "plotfile"
 
int m_already_done = false
 
std::unique_ptr< 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_output_species_names
 
std::vector< std::string > m_all_species_names
 
amrex::Vector< amrex::Vector< ParticleDiag > > m_output_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< intm_rho_per_species_index
 
amrex::Vector< amrex::Vector< std::unique_ptr< PinnedMemoryParticleContainer > > > m_particles_buffer
 
amrex::Vector< std::unique_ptr< ComputeParticleDiagFunctor > > m_all_particle_functors
 
amrex::Vector< amrex::Vector< int > > m_totalParticles_in_buffer
 
amrex::Vector< amrex::RealBoxm_snapshot_domain_lab
 

Detailed Description

collect the particles that are absorbed at the embedded boundary, throughout the simulation

Constructor & Destructor Documentation

◆ BoundaryScrapingDiagnostics()

BoundaryScrapingDiagnostics::BoundaryScrapingDiagnostics ( int  i,
const std::string &  name 
)

Constructor

Parameters
iindex of diagnostics in MultiDiagnostics::alldiags
namediagnostics name in the inputs file

Member Function Documentation

◆ DoComputeAndPack()

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

Return whether to pack field data in output buffers at this time step

This is not used for BoundaryScrapingDiagnostics: no field to output

Implements Diagnostics.

◆ DoDump()

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

Return whether to dump data to file at this time step. (i.e. whether to call Flush)

Parameters
[in]stepcurrent time step
[in]i_bufferindex of the boundary buffer used (e.g. upper/lower boundary, EB boundary)
[in]force_flushif true, return true for any step

Implements Diagnostics.

◆ Flush()

void BoundaryScrapingDiagnostics::Flush ( int  i_buffer,
bool   
)
overrideprivatevirtual

Flush data to file.

Implements Diagnostics.

◆ InitializeBufferData()

void BoundaryScrapingDiagnostics::InitializeBufferData ( int  i_buffer,
int  lev,
bool  restart = false 
)
overrideprivatevirtual

Initialize buffers that contain field data

This is not used for BoundaryScrapingDiagnostics: no field to output

Implements Diagnostics.

◆ InitializeFieldFunctors()

void BoundaryScrapingDiagnostics::InitializeFieldFunctors ( int  lev)
overrideprivatevirtual

Initialize functors that point to the fields requested by the user.

This is not used for BoundaryScrapingDiagnostics: no field to output

Implements Diagnostics.

◆ InitializeParticleBuffer()

void BoundaryScrapingDiagnostics::InitializeParticleBuffer ( )
overrideprivatevirtual

Initialize the diagnostics by pointing to the ParticleBoundaryBuffer that correspond to the species requested by the user.

Implements Diagnostics.

◆ ReadParameters()

void BoundaryScrapingDiagnostics::ReadParameters ( )
private

Read relevant parameters for BoundaryScraping

Member Data Documentation

◆ m_intervals

utils::parser::IntervalsParser BoundaryScrapingDiagnostics::m_intervals
private

Determines timesteps at which the particles are written out


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