|
WarpX
|
#include "WarpX.H"#include "WarpXAlgorithmSelection.H"#include "WarpXConst.H"#include "WarpXProfilerWrapper.H"#include "WarpXUtil.H"#include <AMReX.H>#include <AMReX_Array.H>#include <AMReX_Array4.H>#include <AMReX_BLassert.H>#include <AMReX_Box.H>#include <AMReX_Config.H>#include <AMReX_FArrayBox.H>#include <AMReX_FabArray.H>#include <AMReX_GpuControl.H>#include <AMReX_GpuLaunch.H>#include <AMReX_MFIter.H>#include <AMReX_MultiFab.H>#include <AMReX_ParmParse.H>#include <AMReX_Parser.H>#include <algorithm>#include <array>#include <cmath>#include <cstring>#include <fstream>#include <set>#include <string>#include <limits>Namespaces | |
| WarpXUtilIO | |
| WarpXUtilMsg | |
| WarpXUtilStr | |
Functions | |
| void | PreparseAMReXInputIntArray (amrex::ParmParse &a_pp, char const *const input_str, const bool replace) |
| void | ParseGeometryInput () |
| void | ReadBoostedFrameParameters (Real &gamma_boost, Real &beta_boost, Vector< int > &boost_direction) |
| void | ConvertLabParamsToBoost () |
| void | NullifyMF (amrex::MultiFab &mf, int lev, amrex::Real zmin, amrex::Real zmax) |
| bool | WarpXUtilIO::WriteBinaryDataOnFile (std::string filename, const amrex::Vector< char > &data) |
| 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... | |
| int | safeCastToInt (const 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... | |
| 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) |
| 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... | |
| 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... | |
| int | queryArrWithParser (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< 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) |
| int | queryWithParser (const amrex::ParmParse &a_pp, char const *const str, int &val) |
| void | getWithParser (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 | 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 | CheckGriddingForRZSpectral () |
| Ensures that the blocks are setup correctly for the RZ spectral solver When using the RZ spectral solver, the Hankel transform cannot be divided among multiple blocks. Each block must extend over the entire radial extent. The grid can be divided up along z, but the number of blocks must be >= the number of processors. More... | |
| void | ReadBCParams () |
| 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) |
| void CheckGriddingForRZSpectral | ( | ) |
Ensures that the blocks are setup correctly for the RZ spectral solver When using the RZ spectral solver, the Hankel transform cannot be divided among multiple blocks. Each block must extend over the entire radial extent. The grid can be divided up along z, but the number of blocks must be >= the number of processors.
Ensures that the blocks are setup correctly for the RZ spectral solver.
| 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 | ||
| ) |
| 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 |
| void PreparseAMReXInputIntArray | ( | amrex::ParmParse & | a_pp, |
| char const *const | input_str, | ||
| const bool | replace | ||
| ) |
| 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 | ( | Real & | gamma_boost, |
| Real & | beta_boost, | ||
| 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