17 if (!std::isfinite(tmp)) {
18 if (std::isnan(tmp)) {
28 void checkFinite(
const std::string& name,
double* values,
size_t N)
30 for (
size_t i = 0; i < N; i++) {
31 if (!std::isfinite(values[i])) {
32 std::string message = name +
" contains non-finite elements:\n\n";
33 for (
size_t j = 0; j < N; j++) {
34 if (!std::isfinite(values[j])) {
35 message += fmt::format(
"{}[{}] = {}\n", name, j, values[j]);
void checkFinite(const double tmp)
Check to see that a number is finite (not NaN, +Inf or -Inf)
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
Base class for exceptions thrown by Cantera classes.
Contains declarations for string manipulation functions within Cantera.
Namespace for the Cantera kernel.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...