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

Class to read, modify, and write plotfile header when back-transformed diag format is selected as plotfile. This class enables multiple BTD buffers to be interweaved and stitched into a single plotfile with a single Header. More...

#include <BTD_Plotfile_Header_Impl.H>

Public Member Functions

 BTDPlotfileHeaderImpl (std::string const &Headerfile_path)
 
std::string fileVersion () const noexcept
 
int ncomp () const noexcept
 
const amrex::Vector< std::string > & varnames () const noexcept
 
int spaceDim () const noexcept
 
amrex::Real time () const noexcept
 
int finestLevel () const noexcept
 
amrex::Real problo (int dim) const noexcept
 
amrex::Real probhi (int dim) const noexcept
 
amrex::Box probDomain () const noexcept
 
int timestep () const noexcept
 
int numFabs () const noexcept
 
amrex::Array< amrex::Real, AMREX_SPACEDIM > FabLo (int iFab) const noexcept
 
amrex::Array< amrex::Real, AMREX_SPACEDIM > FabHi (int iFab) const noexcept
 
std::string CellPath () const noexcept
 
void ReadHeaderData ()
 
void WriteHeader ()
 
void set_time (amrex::Real new_time)
 
void set_timestep (int new_timestep)
 
void set_problo (int dim, amrex::Real lo)
 
void set_probhi (int dim, amrex::Real hi)
 
void set_probDomain (amrex::Box domainBox)
 
void IncrementNumFabs ()
 
void ResizeFabLo ()
 
void ResizeFabHi ()
 
void AppendNewFabLo (amrex::Array< amrex::Real, AMREX_SPACEDIM > newFabLo)
 
void AppendNewFabHi (amrex::Array< amrex::Real, AMREX_SPACEDIM > newFabHi)
 

Private Attributes

std::string m_Header_path
 
std::string m_file_version
 
int m_nComp
 
amrex::Vector< std::string > m_varnames
 
int m_spacedim
 
amrex::Real m_time
 
int m_finest_level
 
int m_nlevel
 
amrex::Array< amrex::Real, AMREX_SPACEDIM > m_prob_lo {{AMREX_D_DECL(0.,0.,0.)}}
 
amrex::Array< amrex::Real, AMREX_SPACEDIM > m_prob_hi {{AMREX_D_DECL(1.,1.,1.)}}
 
amrex::Array< amrex::Real, AMREX_SPACEDIM > m_cell_size {{AMREX_D_DECL(1.,1.,1.)}}
 
amrex::Box m_prob_domain
 
int m_timestep
 
int m_coordsys
 
int m_bwidth
 
int m_cur_level
 
int m_numFabs
 
amrex::Vector< amrex::Array< amrex::Real, AMREX_SPACEDIM > > m_glo
 
amrex::Vector< amrex::Array< amrex::Real, AMREX_SPACEDIM > > m_ghi
 
std::string m_CellPath
 

Detailed Description

Class to read, modify, and write plotfile header when back-transformed diag format is selected as plotfile. This class enables multiple BTD buffers to be interweaved and stitched into a single plotfile with a single Header.

Constructor & Destructor Documentation

◆ BTDPlotfileHeaderImpl()

BTDPlotfileHeaderImpl::BTDPlotfileHeaderImpl ( std::string const &  Headerfile_path)

Constructor.

Parameters
[in]Headerfile_pathstring containing path of Headerfile

Member Function Documentation

◆ AppendNewFabHi()

void BTDPlotfileHeaderImpl::AppendNewFabHi ( amrex::Array< amrex::Real, AMREX_SPACEDIM >  newFabHi)

Append array of upper-corner physical coordinates corresponding to a new fab to the existing list of coordinates, m_ghi.

Parameters
[in]newFabHicontains physical coordinates of the newly appended fab-data to the plotfile.

◆ AppendNewFabLo()

void BTDPlotfileHeaderImpl::AppendNewFabLo ( amrex::Array< amrex::Real, AMREX_SPACEDIM >  newFabLo)

Append array of lower-corner physical coordinates corresponding to a new fab to the existing list of coordinates, m_glo.

Parameters
[in]newFabLocontains physical coordinates of the newly appended fab-data to the plotfile.

◆ CellPath()

std::string BTDPlotfileHeaderImpl::CellPath ( ) const
inlinenoexcept

Returns path to location of multifabs

◆ FabHi()

amrex::Array<amrex::Real, AMREX_SPACEDIM> BTDPlotfileHeaderImpl::FabHi ( int  iFab) const
inlinenoexcept

Returns physical co-ordinates of the lower-corner for the i-th Fab.

Parameters
[in]iFabid of the ith Fab in the list of Multifabs
Returns
Array of lower-corner physical co-ordinates corresponding to the ith Fab

◆ FabLo()

amrex::Array<amrex::Real, AMREX_SPACEDIM> BTDPlotfileHeaderImpl::FabLo ( int  iFab) const
inlinenoexcept

Returns physical co-ordinates of the lower-corner for the i-th Fab.

Parameters
[in]iFabid of the ith Fab in the list of Multifabs
Returns
Array of lower-corner physical co-ordinates corresponding to the ith Fab

◆ fileVersion()

std::string BTDPlotfileHeaderImpl::fileVersion ( ) const
inlinenoexcept

Returns the Header file version for plotfile

◆ finestLevel()

int BTDPlotfileHeaderImpl::finestLevel ( ) const
inlinenoexcept

Returns finest level output in the Headerfile

◆ IncrementNumFabs()

void BTDPlotfileHeaderImpl::IncrementNumFabs ( )
inline

Increments the number of fabs stored in the plotfile by one.

◆ ncomp()

int BTDPlotfileHeaderImpl::ncomp ( ) const
inlinenoexcept

Returns the number of components written in the Headerfile

◆ numFabs()

int BTDPlotfileHeaderImpl::numFabs ( ) const
inlinenoexcept

◆ probDomain()

amrex::Box BTDPlotfileHeaderImpl::probDomain ( ) const
inlinenoexcept

Returns the bounding box of the domain spanned in the plotfile

◆ probhi()

amrex::Real BTDPlotfileHeaderImpl::probhi ( int  dim) const
inlinenoexcept

Returns the physical co-ordinates of the upper corner in dimension, idim, that corresponds the to the respective plotfile data.

◆ problo()

amrex::Real BTDPlotfileHeaderImpl::problo ( int  dim) const
inlinenoexcept

Returns the physical co-ordinates of the lower corner in dimension, idim, that corresponds the to the respective plotfile data

◆ ReadHeaderData()

void BTDPlotfileHeaderImpl::ReadHeaderData ( )

Reads the Header file data for BTD

◆ ResizeFabHi()

void BTDPlotfileHeaderImpl::ResizeFabHi ( )
inline

◆ ResizeFabLo()

void BTDPlotfileHeaderImpl::ResizeFabLo ( )
inline

◆ set_probDomain()

void BTDPlotfileHeaderImpl::set_probDomain ( amrex::Box  domainBox)
inline

Set the Domain box spanning the plotfile data in the modified plotfile and Header.

Parameters
[in]domainBoxspanning the domain corresponding to the plotfile.

◆ set_probhi()

void BTDPlotfileHeaderImpl::set_probhi ( int  dim,
amrex::Real  hi 
)
inline

Set the ith-dimension physical co-ordinate of the upper corner.

Parameters
[in]dimdimension modified.
[in]hiupper-corner physical coordinate to be stored in dimension, dim.

◆ set_problo()

void BTDPlotfileHeaderImpl::set_problo ( int  dim,
amrex::Real  lo 
)
inline

Set the ith-dimension physical co-ordinate of the lower corner.

Parameters
[in]dimdimension modified.
[in]lolower-corner physical coordinate to be stored in dimension, dim.

◆ set_time()

void BTDPlotfileHeaderImpl::set_time ( amrex::Real  new_time)
inline

Sets the physical simulation time, m_time, in the Header file to a new_time.

Parameters
[in]new_timecurrent time in the boosted-frame read from Header plotfile

◆ set_timestep()

void BTDPlotfileHeaderImpl::set_timestep ( int  new_timestep)
inline

Sets the timestep, m_timestep, in the Header file to a new_timestep

Parameters
[in]new_timestepcurrent timestep in the boosted-frame (read from the Header file of the newly flushed buffer)

◆ spaceDim()

int BTDPlotfileHeaderImpl::spaceDim ( ) const
inlinenoexcept

Returns the number of dimensions in the Headerfile

◆ time()

amrex::Real BTDPlotfileHeaderImpl::time ( ) const
inlinenoexcept

Returns the physical time in the simulation in the boosted-frame

◆ timestep()

int BTDPlotfileHeaderImpl::timestep ( ) const
inlinenoexcept

Returns timestep at which the plotfile was written

◆ varnames()

const amrex::Vector<std::string>& BTDPlotfileHeaderImpl::varnames ( ) const
inlinenoexcept

Returns the names of components in the Headerfile

◆ WriteHeader()

void BTDPlotfileHeaderImpl::WriteHeader ( )

Writes Header file data for BTD

Member Data Documentation

◆ m_bwidth

int BTDPlotfileHeaderImpl::m_bwidth
private

◆ m_cell_size

amrex::Array<amrex::Real, AMREX_SPACEDIM> BTDPlotfileHeaderImpl::m_cell_size {{AMREX_D_DECL(1.,1.,1.)}}
private

Cell size

◆ m_CellPath

std::string BTDPlotfileHeaderImpl::m_CellPath
private

◆ m_coordsys

int BTDPlotfileHeaderImpl::m_coordsys
private

◆ m_cur_level

int BTDPlotfileHeaderImpl::m_cur_level
private

◆ m_file_version

std::string BTDPlotfileHeaderImpl::m_file_version
private

String containing file version of the plotfile.

◆ m_finest_level

int BTDPlotfileHeaderImpl::m_finest_level
private

◆ m_ghi

amrex::Vector<amrex::Array<amrex::Real, AMREX_SPACEDIM> > BTDPlotfileHeaderImpl::m_ghi
private

Upper corner physical coordinates of each fab in the plotfile.

◆ m_glo

amrex::Vector<amrex::Array<amrex::Real, AMREX_SPACEDIM> > BTDPlotfileHeaderImpl::m_glo
private

Lower corner physical coordinates of each fab in the plotfile.

◆ m_Header_path

std::string BTDPlotfileHeaderImpl::m_Header_path
private

string containing path of the Header file.

◆ m_nComp

int BTDPlotfileHeaderImpl::m_nComp
private

Number of components in the plotfile.

◆ m_nlevel

int BTDPlotfileHeaderImpl::m_nlevel
private

◆ m_numFabs

int BTDPlotfileHeaderImpl::m_numFabs
private

Number of Fabs in the plotfile.

◆ m_prob_domain

amrex::Box BTDPlotfileHeaderImpl::m_prob_domain
private

Box covering the span of the physical domain in the plotfile

◆ m_prob_hi

amrex::Array<amrex::Real, AMREX_SPACEDIM> BTDPlotfileHeaderImpl::m_prob_hi {{AMREX_D_DECL(1.,1.,1.)}}
private

Upper corner physical coordinates of the domain spanned in the plotfile

◆ m_prob_lo

amrex::Array<amrex::Real, AMREX_SPACEDIM> BTDPlotfileHeaderImpl::m_prob_lo {{AMREX_D_DECL(0.,0.,0.)}}
private

Lower cornder physical coordinates of the domain spanned in the plotfile

◆ m_spacedim

int BTDPlotfileHeaderImpl::m_spacedim
private

Number of dimensions stored in the plotfile, should be same as AMREX_SPACEDIM

◆ m_time

amrex::Real BTDPlotfileHeaderImpl::m_time
private

Physical time

◆ m_timestep

int BTDPlotfileHeaderImpl::m_timestep
private

◆ m_varnames

amrex::Vector<std::string> BTDPlotfileHeaderImpl::m_varnames
private

Names of components stored in the plotfile.


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