2025-11-12 16:54:12 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <exception>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace gridfire::exceptions {
|
|
|
|
|
class SolverError : public std::exception {
|
|
|
|
|
public:
|
|
|
|
|
SolverError(std::string msg) : m_msg(std::move(msg)) {}
|
|
|
|
|
|
|
|
|
|
[[nodiscard]] const char* what() const noexcept override {
|
|
|
|
|
return m_msg.c_str();
|
|
|
|
|
}
|
|
|
|
|
private:
|
|
|
|
|
std::string m_msg;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CVODESolverFailureError final : public SolverError {
|
|
|
|
|
using SolverError::SolverError;
|
|
|
|
|
};
|
2025-11-14 10:51:40 -05:00
|
|
|
|
|
|
|
|
class SingularJacobianError final : public SolverError {
|
|
|
|
|
using SolverError::SolverError;
|
|
|
|
|
};
|
2025-11-14 18:49:29 -05:00
|
|
|
|
|
|
|
|
class IllConditionedJacobianError final : public SolverError {
|
|
|
|
|
using SolverError::SolverError;
|
|
|
|
|
};
|
2025-11-12 16:54:12 -05:00
|
|
|
}
|