WarpX
Functions
utils Namespace Reference

Functions

std::pair< int, int > warpx_mpi_init (int argc, char *argv[])
 
void warpx_check_mpi_thread_level (std::pair< int, int > const mpi_thread_levels)
 
std::vector< double > getRelativeCellPosition (amrex::MultiFab const &mf)
 

Function Documentation

◆ getRelativeCellPosition()

std::vector< double > utils::getRelativeCellPosition ( amrex::MultiFab const &  mf)

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]mfthe amrex::MultiFab to get relative cell positions for
Returns
relative position to the lower corner, scaled to cell size [0.0:1.0)

◆ warpx_check_mpi_thread_level()

void utils::warpx_check_mpi_thread_level ( std::pair< int, int > const  mpi_thread_levels)

Check if the requested MPI thread level is valid

Prints warnings and notes otherwise.

Parameters
mpi_thread_levelspair(required, provided) of MPI thread level from MPI_Init_thread

◆ warpx_mpi_init()

std::pair< int, int > utils::warpx_mpi_init ( int  argc,
char *  argv[] 
)

Initialize MPI

Returns
pair(required, provided) of MPI thread level from MPI_Init_thread