MFEM v4.7.0
Finite element discretization library
|
A simple singleton class for hypre's global settings, that 1) calls HYPRE_Init() and sets some GPU-relevant options at construction and 2) calls HYPRE_Finalize() at destruction. More...
#include <hypre.hpp>
Static Public Member Functions | |
static void | Init () |
Initialize hypre by calling HYPRE_Init() and set default options. After calling Hypre::Init(), hypre will be finalized automatically at program exit. | |
static void | InitDevice () |
Configure HYPRE's compute and memory policy. | |
static void | Finalize () |
Finalize hypre (called automatically at program exit if Hypre::Init() has been called). | |
Static Public Attributes | |
static bool | configure_runtime_policy_from_mfem = true |
Use MFEM's device policy to configure HYPRE's device policy, true by default. This variable is used by InitDevice(). | |
A simple singleton class for hypre's global settings, that 1) calls HYPRE_Init() and sets some GPU-relevant options at construction and 2) calls HYPRE_Finalize() at destruction.
|
static |
Finalize hypre (called automatically at program exit if Hypre::Init() has been called).
Multiple calls to Hypre::Finalize() have no effect. This function can be called manually to more precisely control when hypre is finalized.
|
inlinestatic |
Initialize hypre by calling HYPRE_Init() and set default options. After calling Hypre::Init(), hypre will be finalized automatically at program exit.
Calling HYPRE_Finalize() manually is not compatible with this class.
|
static |
Configure HYPRE's compute and memory policy.
By default HYPRE will be configured with the same policy as MFEM unless Hypre::configure_runtime_policy_from_mfem
is false, in which case HYPRE's default will be used; if HYPRE is built for the GPU and the aforementioned variable is false then HYPRE will use the GPU even if MFEM is not.
This function is no-op if HYPRE is built without GPU support or the HYPRE version is less than 2.31.0.
This function is NOT called by Init(). Instead it is called by Device::Configure() (when MFEM_USE_MPI=YES) after the MFEM device configuration is complete.
|
static |
Use MFEM's device policy to configure HYPRE's device policy, true by default. This variable is used by InitDevice().
This value is not used if HYPRE is build without GPU support or the HYPRE version is less than 2.31.0.