| 87 | } |
| 88 | |
| 89 | BoutReal stringToReal(const std::string& s) { |
| 90 | std::stringstream ss(s); |
| 91 | BoutReal val; |
| 92 | if (!(ss >> val)) { |
| 93 | throw BoutException("Could not convert string '{:s}' to BoutReal\n", s); |
| 94 | } |
| 95 | return val; |
| 96 | } |
| 97 | |
| 98 | int stringToInt(const std::string& s) { |
| 99 | std::stringstream ss(s); |