Hipace
Functions
utils Namespace Reference

Functions

std::vector< double > getRelativeCellPosition (amrex::Box const &box)
 
std::vector< std::uint64_t > getReversedVec (const amrex::IntVect &v)
 Convert an IntVect to a std::vector<std::uint64_t> and reverse the order of the elements (used for compatibility with the openPMD API) More...
 
std::vector< double > getReversedVec (const amrex::Real *v)
 Convert Real* pointer to a std::vector<double>, and reverse the order of the elements (used for compatibility with the openPMD API) More...
 
bool doDiagnostics (int output_period, int output_step, int max_step, amrex::Real output_time, amrex::Real max_time)
 returns whether output should be writen to file More...
 

Function Documentation

◆ doDiagnostics()

bool utils::doDiagnostics ( int  output_period,
int  output_step,
int  max_step,
amrex::Real  output_time,
amrex::Real  max_time 
)

returns whether output should be writen to file

Parameters
[in]output_periodperiod of the output
[in]output_stepcurrent step
[in]max_stepmaximum step of simulation
[in]output_timephysical time of the current step
[in]max_timemaximum simulation time

◆ getRelativeCellPosition()

std::vector< double > utils::getRelativeCellPosition ( amrex::Box const &  box)

Get the Relative Cell Position of Values in an MultiFab

Translate the IndexType of a given MultiFab into a position relative to the lower corner of a cell.

Parameters
[in]boxthe amrex::Box to get relative cell positions for
Returns
relative position to the lower corner, scaled to cell size [0.0:1.0)

◆ getReversedVec() [1/2]

std::vector< std::uint64_t > utils::getReversedVec ( const amrex::IntVect v)

Convert an IntVect to a std::vector<std::uint64_t> and reverse the order of the elements (used for compatibility with the openPMD API)

◆ getReversedVec() [2/2]

std::vector< double > utils::getReversedVec ( const amrex::Real *  v)

Convert Real* pointer to a std::vector<double>, and reverse the order of the elements (used for compatibility with the openPMD API)