WarpX
Namespaces | Functions
WarpXUtil.H File Reference
#include "Parser/WarpXParser.H"
#include <AMReX_REAL.H>
#include <AMReX_Vector.H>
#include <AMReX_MultiFab.H>
#include <AMReX_ParmParse.H>
#include <AMReX_Utility.H>
#include <cstdint>
#include <string>

Go to the source code of this file.

Namespaces

 WarpXUtilIO
 
 WarpXUtilAlgo
 
 WarpXUtilMsg
 
 WarpXUtilStr
 

Functions

void ReadBoostedFrameParameters (amrex::Real &gamma_boost, amrex::Real &beta_boost, amrex::Vector< int > &boost_direction)
 
void ConvertLabParamsToBoost ()
 
void CheckGriddingForRZSpectral ()
 Ensures that the blocks are setup correctly for the RZ spectral solver. More...
 
void NullifyMF (amrex::MultiFab &mf, int lev, amrex::Real zmin, amrex::Real zmax)
 
void Store_parserString (amrex::ParmParse &pp, std::string query_string, std::string &stored_string)
 Parse a string (typically a mathematical expression) from the input file and store it into a variable. More...
 
bool WarpXUtilIO::WriteBinaryDataOnFile (std::string filename, const amrex::Vector< char > &data)
 
constexpr uint64_t WarpXUtilIO::localIDtoGlobal (int const id, int const cpu)
 
template<typename T >
AMREX_GPU_DEVICE AMREX_FORCE_INLINE const T * WarpXUtilAlgo::upper_bound (const T *first, const T *last, const T &val)
 Returns a pointer to the first element in the range [first, last) that is greater than val. More...
 
template<typename T >
AMREX_GPU_DEVICE AMREX_FORCE_INLINE T WarpXUtilAlgo::linear_interp (T x0, T x1, T f0, T f1, T x)
 Performs a linear interpolation. More...
 
template<typename T >
AMREX_GPU_DEVICE AMREX_FORCE_INLINE T WarpXUtilAlgo::bilinear_interp (T x0, T x1, T y0, T y1, T f00, T f01, T f10, T f11, T x, T y)
 Performs a bilinear interpolation. More...
 
template<typename T >
AMREX_GPU_DEVICE AMREX_FORCE_INLINE T WarpXUtilAlgo::trilinear_interp (T x0, T x1, T y0, T y1, T z0, T z1, T f000, T f001, T f010, T f011, T f100, T f101, T f110, T f111, T x, T y, T z)
 Performs a trilinear interpolation. More...
 
WarpXParser makeParser (std::string const &parse_function, std::vector< std::string > const &varnames)
 Initialize a WarpXParser object from a string containing a math expression. More...
 
void WarpXUtilMsg::AlwaysAssert (bool is_expression_true, const std::string &msg)
 If is_expression_true is false, this function prints msg and calls amrex::abort() More...
 
bool WarpXUtilStr::is_in (const std::vector< std::string > &vect, const std::string &elem)
 
bool WarpXUtilStr::is_in (const std::vector< std::string > &vect, const std::vector< std::string > &elems)
 
template<typename Container >
auto WarpXUtilStr::split (std::string const &instr, std::string const &separator, bool const trim=false, std::string const &trim_space=" \)
 Splits a string using a string separator. This is somewhat similar to amrex::Tokenize. The main difference is that, if the separator ":" is used, amrex::Tokenize will split ":3::2" into ["3","2"] while this functio will split ":3::2" into ["","3","","2"]. This function can also perform a trimming to remove whitespaces (or any other arbitrary string) from the split string. More...
 

Function Documentation

◆ CheckGriddingForRZSpectral()

void CheckGriddingForRZSpectral ( )

Ensures that the blocks are setup correctly for the RZ spectral solver.

Ensures that the blocks are setup correctly for the RZ spectral solver.

◆ ConvertLabParamsToBoost()

void ConvertLabParamsToBoost ( )

◆ makeParser()

WarpXParser makeParser ( std::string const &  parse_function,
std::vector< std::string > const &  varnames 
)

Initialize a WarpXParser object from a string containing a math expression.

Parameters
parse_functionString to read to initialize the parser.

◆ NullifyMF()

void NullifyMF ( amrex::MultiFab &  mf,
int  lev,
amrex::Real  zmin,
amrex::Real  zmax 
)

◆ ReadBoostedFrameParameters()

void ReadBoostedFrameParameters ( amrex::Real &  gamma_boost,
amrex::Real &  beta_boost,
amrex::Vector< int > &  boost_direction 
)

◆ Store_parserString()

void Store_parserString ( amrex::ParmParse &  pp,
std::string  query_string,
std::string &  stored_string 
)

Parse a string (typically a mathematical expression) from the input file and store it into a variable.

Parameters
ParmParsepp used to read the query_string pp.<function>=string
parmparse_stringString used to initialize ParmParse
query_stringParmParse.query will look for this string
stored_stringvariable in which the string to parse is stored