class
LuaParserControl file lua-parser for Inciter.
Contents
This class is used to interface with sol2, for the purpose of parsing the control file for the computational shock hydrodynamics tool, Inciter.
Constructors, destructors, conversion operators
-
LuaParser(const tk::
Print& print, const ctr:: CmdLine& cmdline, ctr::InputDeck& inputdeck) explicit - Constructor.
Public functions
- void storeInputDeck(const sol::table& lua_ideck, ctr::InputDeck& gideck)
- Store lua inputdeck in custom struct.
-
void checkStoreMatProp(const sol::table table,
const std::string key,
std::size_t vecsize,
std::vector<tk::
real>& storage) - Check and store material property into inpudeck storage.
-
void addOutVar(const std::string& varname,
const std::string& alias,
std::vector<char>& depv,
std::size_t nmat,
std::size_t nspec,
inciter::
ctr:: PDEType pde, tk:: Centering c, std::vector<inciter:: ctr:: OutVar>& foutvar) - Check and store field output variables.
Function documentation
inciter:: LuaParser:: LuaParser(const tk:: Print& print,
const ctr:: CmdLine& cmdline,
ctr::InputDeck& inputdeck) explicit
Constructor.
Parameters | |
---|---|
cmdline in | Command line stack |
inputdeck in/out | Input deck stack where data is stored during parsing |
void inciter:: LuaParser:: storeInputDeck(const sol::table& lua_ideck,
ctr::InputDeck& gideck)
Store lua inputdeck in custom struct.
Parameters | |
---|---|
lua_ideck in | Lua inputdeck parsed by sol2 |
gideck in/out | Inciter's inputdeck storage |
void inciter:: LuaParser:: checkStoreMatProp(const sol::table table,
const std::string key,
std::size_t vecsize,
std::vector<tk:: real>& storage)
Check and store material property into inpudeck storage.
Parameters | |
---|---|
table in | Sol-table which contains said property |
key in | Key for said property in Sol-table |
vecsize in | Number of said property in Sol-table (based on number of materials that are of the same eos type |
storage in/out | Storage space in inputdeck where said property is to be stored |
void inciter:: LuaParser:: addOutVar(const std::string& varname,
const std::string& alias,
std::vector<char>& depv,
std::size_t nmat,
std::size_t nspec,
inciter:: ctr:: PDEType pde,
tk:: Centering c,
std::vector<inciter:: ctr:: OutVar>& foutvar)
Check and store field output variables.
Parameters | |
---|---|
varname in | Name of variable requested |
alias in | User specified alias for output |
depv in | List of depvars |
nmat in | Number of materials configured |
nspec in | Number of species configured |
pde in | Type of PDE configured |
c in | Variable centering requested |
foutvar in/out | Input deck storage where output vars are stored |