|
WarpX
|
#include <AMReX_Extension.H>#include <AMReX_GpuQualifiers.H>#include <AMReX_Parser.H>#include <AMReX_REAL.H>#include <AMReX_Utility.H>#include <AMReX_Vector.H>#include <AMReX_BaseFwd.H>#include <cstddef>#include <cstdint>#include <string>#include <vector>Go to the source code of this file.
Namespaces | |
| WarpXUtilIO | |
| WarpXUtilAlgo | |
| WarpXUtilMsg | |
| WarpXUtilStr | |
Functions | |
| void | ParseGeometryInput () |
| void | ReadBoostedFrameParameters (amrex::Real &gamma_boost, amrex::Real &beta_boost, amrex::Vector< int > &boost_direction) |
| void | ConvertLabParamsToBoost () |
| void | ReadBCParams () |
| 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 (const 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... | |
| int | safeCastToInt (amrex::Real x, const std::string &real_name) |
| Do a safe cast of a real to an int This ensures that the float value is within the range of ints and if not, raises an exception. More... | |
| amrex::Parser | makeParser (std::string const &parse_function, amrex::Vector< std::string > const &varnames) |
| Initialize an amrex::Parser object from a string containing a math expression. More... | |
| amrex::Real | parseStringtoReal (std::string str) |
| int | parseStringtoInt (std::string str, std::string name) |
| template<int N> | |
| amrex::ParserExecutor< N > | compileParser (amrex::Parser const *parser) |
| int | queryWithParser (const amrex::ParmParse &a_pp, char const *const str, amrex::Real &val) |
| Similar to amrex::ParmParse::query, but also supports math expressions for the value. More... | |
| int | queryArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< amrex::Real > &val, const int start_ix, const int num_val) |
| int | queryWithParser (const amrex::ParmParse &a_pp, char const *const str, int &val) |
| int | queryArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< int > &val, const int start_ix, const int num_val) |
| void | getWithParser (const amrex::ParmParse &a_pp, char const *const str, amrex::Real &val) |
| Similar to amrex::ParmParse::get, but also supports math expressions for the value. More... | |
| void | getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< amrex::Real > &val) |
| void | getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< amrex::Real > &val, const int start_ix, const int num_val) |
| void | getWithParser (const amrex::ParmParse &a_pp, char const *const str, int &val) |
| void | getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< int > &val) |
| void | getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< int > &val, const int start_ix, const int num_val) |
| 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... | |
| 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.
| amrex::ParserExecutor<N> compileParser | ( | amrex::Parser const * | parser | ) |
| void ConvertLabParamsToBoost | ( | ) |
| void getArrWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| std::vector< amrex::Real > & | val | ||
| ) |
| void getArrWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| std::vector< amrex::Real > & | val, | ||
| const int | start_ix, | ||
| const int | num_val | ||
| ) |
| void getArrWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| std::vector< int > & | val | ||
| ) |
| void getArrWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| std::vector< int > & | val, | ||
| const int | start_ix, | ||
| const int | num_val | ||
| ) |
| void getWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| amrex::Real & | val | ||
| ) |
Similar to amrex::ParmParse::get, but also supports math expressions for the value.
amrex::ParmParse::get reads a name and a value from the input file. This function does the same, and applies the Parser to the value, so the user has the choice to specify a value or a math expression (including user-defined constants). Works for amrex::Real numbers and integers.
| [in] | a_pp | amrex::ParmParse object |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored |
| [in] | start_ix | start index in the list of inputs values (optional with arrays) |
| [in] | num_val | number of input values to use (optional with arrays) |
| void getWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| int & | val | ||
| ) |
| amrex::Parser makeParser | ( | std::string const & | parse_function, |
| amrex::Vector< std::string > const & | varnames | ||
| ) |
Initialize an amrex::Parser object from a string containing a math expression.
| parse_function | String to read to initialize the parser. |
| varnames | A list of predefined independent variables |
| void NullifyMF | ( | amrex::MultiFab & | mf, |
| int | lev, | ||
| amrex::Real | zmin, | ||
| amrex::Real | zmax | ||
| ) |
| void ParseGeometryInput | ( | ) |
| int parseStringtoInt | ( | std::string | str, |
| std::string | name | ||
| ) |
Parse a string and return an int
In case the string cannot be interpreted as Real, this function ... <throws an exception? aborts with error message?>
| str | The string to be parsed |
| name | For integers, the name, to be used in error messages |
| amrex::Real parseStringtoReal | ( | std::string | str | ) |
Parse a string and return as a real
In case the string cannot be interpreted as Real, this function ... <throws an exception? aborts with error message?>
| str | The string to be parsed |
| int queryArrWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| std::vector< amrex::Real > & | val, | ||
| const int | start_ix, | ||
| const int | num_val | ||
| ) |
| int queryArrWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| std::vector< int > & | val, | ||
| const int | start_ix, | ||
| const int | num_val | ||
| ) |
| int queryWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| amrex::Real & | val | ||
| ) |
Similar to amrex::ParmParse::query, but also supports math expressions for the value.
amrex::ParmParse::query reads a name and a value from the input file. This function does the same, and applies the amrex::Parser to the value, so the user has the choice to specify a value or a math expression (including user-defined constants). Works for amrex::Real numbers and integers.
| [in] | a_pp | amrex::ParmParse object |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored, either a scalar or vector |
| [in] | start_ix | start index in the list of inputs values (optional with arrays) |
| [in] | num_val | number of input values to use (optional with arrays) |
| int queryWithParser | ( | const amrex::ParmParse & | a_pp, |
| char const *const | str, | ||
| int & | val | ||
| ) |
| void ReadBCParams | ( | ) |
Reads the user-defined field and particle boundary condition parameters
| void ReadBoostedFrameParameters | ( | amrex::Real & | gamma_boost, |
| amrex::Real & | beta_boost, | ||
| amrex::Vector< int > & | boost_direction | ||
| ) |
| int safeCastToInt | ( | amrex::Real | x, |
| const std::string & | real_name | ||
| ) |
Do a safe cast of a real to an int This ensures that the float value is within the range of ints and if not, raises an exception.
| x | Real value to cast |
| real_name | String, the name of the variable being casted to use in the error message |
| void Store_parserString | ( | const 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.
| ParmParse | pp used to read the query_string pp.<function>=string |
| parmparse_string | String used to initialize ParmParse |
| query_string | ParmParse.query will look for this string |
| stored_string | variable in which the string to parse is stored |
1.8.13