HypreErrorHandling.hpp File Reference
#include <HYPRE.h>
#include <HYPRE_parcsr_ls.h>
#include <_hypre_utilities.h>
#include <fmt/core.h>
#include <stdexcept>
#include <string>
Include dependency graph for HypreErrorHandling.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Opm::gpuistl::HypreError
 Exception class for Hypre errors. More...
 

Namespaces

namespace  Opm
 
namespace  Opm::gpuistl
 

Macros

#define OPM_HYPRE_SAFE_CALL(expr)   ::Opm::gpuistl::hypreSafeCall((expr), #expr, __FILE__, __func__, __LINE__)
 Macro to wrap Hypre function calls with error checking. More...
 
#define HYPRE_SAFE_CALL(expr)   OPM_HYPRE_SAFE_CALL(expr)
 Short form macro for Hypre function calls (for backward compatibility) More...
 

Functions

std::string Opm::gpuistl::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. More...
 
void Opm::gpuistl::hypreSafeCall (HYPRE_Int rc, const std::string &expression, const std::string &file, const std::string &function, int line)
 Safe call wrapper for Hypre functions. More...
 

Macro Definition Documentation

◆ HYPRE_SAFE_CALL

#define HYPRE_SAFE_CALL (   expr)    OPM_HYPRE_SAFE_CALL(expr)

Short form macro for Hypre function calls (for backward compatibility)

◆ OPM_HYPRE_SAFE_CALL

#define OPM_HYPRE_SAFE_CALL (   expr)    ::Opm::gpuistl::hypreSafeCall((expr), #expr, __FILE__, __func__, __LINE__)

Macro to wrap Hypre function calls with error checking.

Example usage:

OPM_HYPRE_SAFE_CALL(HYPRE_BoomerAMGCreate(&solver));
#define OPM_HYPRE_SAFE_CALL(expr)
Macro to wrap Hypre function calls with error checking.
Definition: HypreErrorHandling.hpp:96