6 #include <athena/parameter_input.hpp>
9 #include <application/exceptions.hpp>
12 #include <configure.hpp>
15 ParameterInput* pin) {
16 char buf[80], cstr[1024], *
p;
19 for (
int n = 1; n <= NVAPOR; ++n) {
20 snprintf(buf,
sizeof(buf),
"%s%d", name, n);
21 std::string str = pin->GetString(
"thermodynamics", buf);
22 std::snprintf(cstr,
sizeof(cstr),
"%s", str.c_str());
23 p = std::strtok(cstr,
" ,");
25 while ((
p != NULL) && (m++ < len)) {
26 var[n + (m - 1) * NVAPOR] = std::stod(
p);
27 p = std::strtok(NULL,
" ,");
30 throw ValueError(
"read_thermo_property", name, len, m);
void read_thermo_property(Real var[], char const name[], int len, Real v0, ParameterInput *pin)