Files
MeanField_SERiF/tests/sandbox/finite_sandbox.cpp
Emily Boudreaux d1f59d6d70 feat(mean_field): added dimensions, discritization, and start of eos
The full rewrite of mean_field into something maintainable is progressing. dimensions is mostly done, discritization (domain, blocks, and fields) is done, and eos is progressing quickly
2026-09-15 10:42:00 -04:00

26 lines
659 B
C++

#include "serif/utils/misc/finite.hpp"
#include <limits>
enum class [[maybe_unused]] TestErrorCode {
NotFinite
};
namespace {
class test_exception : public std::runtime_error {
public:
test_exception(TestErrorCode error_code, const std::string& message)
: std::runtime_error(message), m_error_code(error_code) {}
TestErrorCode error_code() const noexcept {
return m_error_code;
}
private:
TestErrorCode m_error_code;
};
}
int main() {
double a = std::numeric_limits<double>::infinity();
serif::utils::misc::validate_finite<test_exception>(a, TestErrorCode::NotFinite);
}