20 #ifndef OPM_HYPRE_ERROR_HANDLING_HPP 21 #define OPM_HYPRE_ERROR_HANDLING_HPP 24 #include <HYPRE_parcsr_ls.h> 25 #include <_hypre_utilities.h> 40 : std::runtime_error(msg)
57 HYPRE_Int err,
const std::string& expression,
const std::string& file,
const std::string&
function,
int line)
59 return fmt::format(
"Hypre error in expression: {}\nError code: {}\nLocation: {}:{} in function {}",
81 HYPRE_Int rc,
const std::string& expression,
const std::string& file,
const std::string&
function,
int line)
96 #define OPM_HYPRE_SAFE_CALL(expr) ::Opm::gpuistl::hypreSafeCall((expr), #expr, __FILE__, __func__, __LINE__) 101 #ifndef HYPRE_SAFE_CALL 102 #define HYPRE_SAFE_CALL(expr) OPM_HYPRE_SAFE_CALL(expr) 107 #endif // OPM_HYPRE_ERROR_HANDLING_HPP std::string getHypreErrorMessage(HYPRE_Int err, const std::string &expression, const std::string &file, const std::string &function, int line)
Get a descriptive error message for a Hypre error code.
Definition: HypreErrorHandling.hpp:56
Exception class for Hypre errors.
Definition: HypreErrorHandling.hpp:36
void hypreSafeCall(HYPRE_Int rc, const std::string &expression, const std::string &file, const std::string &function, int line)
Safe call wrapper for Hypre functions.
Definition: HypreErrorHandling.hpp:80
A small, fixed‑dimension MiniVector class backed by std::array that can be used in both host and CUD...
Definition: AmgxInterface.hpp:37