GEOS
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
HypreUtils.hpp File Reference
#include "common/DataTypes.hpp"
#include "common/GEOS_RAJA_Interface.hpp"
#include "codingUtilities/Utilities.hpp"
#include "linearAlgebra/utilities/LinearSolverParameters.hpp"
#include <HYPRE_krylov.h>
#include <HYPRE_parcsr_ls.h>

Go to the source code of this file.

Classes

struct  geos::HyprePrecWrapper
 Container for hypre preconditioner function pointers. More...
 

Namespaces

 geos
 
 geos::hypre
 Contains some hypre-specific functions.
 

Macros

#define GEOS_HYPRE_DEVICE   GEOS_DEVICE
 Host-device marker for custom hypre kernels.
 
#define GEOS_HYPRE_HOST_DEVICE   GEOS_HOST_DEVICE
 Host-device marker for custom hypre kernels.
 
#define GEOS_HYPRE_CHECK_DEVICE_ERRORS(msg)   ::geos::hypre::checkDeviceErrors( msg, __FILE__, __LINE__ )
 Check for previous device errors and report with line information. More...
 

Typedefs

using geos::hypre::execPolicy = parallelDevicePolicy<>
 Execution policy for operations on hypre data.
 

Enumerations

enum class  geos::hypre::AMGCoarseningType : HYPRE_Int {
  geos::hypre::CLJP = 0 , geos::hypre::Ruge_Stueben = 3 , geos::hypre::Falgout = 6 , geos::hypre::CLJPDebug = 7 ,
  geos::hypre::PMIS = 8 , geos::hypre::PMISDebug = 9 , geos::hypre::HMIS = 10 , geos::hypre::CGC = 21 ,
  geos::hypre::CGC_E = 22
}
 This enum class specifies the AMG parallel coarsening algorithm. More...
 
enum class  geos::hypre::MGRInterpolationType : HYPRE_Int {
  geos::hypre::injection = 0 , geos::hypre::l1jacobi = 1 , geos::hypre::jacobi = 2 , geos::hypre::classicalModifiedInterpolation = 3 ,
  geos::hypre::approximateInverse = 4 , geos::hypre::blockJacobi = 12
}
 This enum class specifies the strategy for computing the level intepolation operator in MGR. More...
 
enum class  geos::hypre::MGRRestrictionType : HYPRE_Int {
  geos::hypre::injection = 0 , geos::hypre::jacobi = 2 , geos::hypre::approximateInverse = 3 , geos::hypre::blockJacobi = 12 ,
  geos::hypre::cprLike = 13 , geos::hypre::blockColLumped = 14
}
 This enum class specifies the strategy for computing the level restriction operator in MGR. More...
 
enum class  geos::hypre::MGRCoarseGridMethod : HYPRE_Int {
  geos::hypre::galerkin = 0 , geos::hypre::nonGalerkin = 1 , geos::hypre::cprLikeDiag = 2 , geos::hypre::cprLikeBlockDiag = 3 ,
  geos::hypre::approximateInverse = 4
}
 This enum class specifies the strategy for level coarse grid computation in MGR. More...
 
enum class  geos::hypre::MGRFRelaxationType : HYPRE_Int {
  geos::hypre::none = -1 , geos::hypre::singleVCycleSmoother = 1 , geos::hypre::amgVCycle = 2 , geos::hypre::forwardHybridGaussSeidel = 3 ,
  geos::hypre::backwardHybridGaussSeidel = 4 , geos::hypre::hybridSymmetricGaussSeidel = 6 , geos::hypre::jacobi = 7 , geos::hypre::l1hybridSymmetricGaussSeidel = 8 ,
  geos::hypre::gsElim = 9 , geos::hypre::l1forwardGaussSeidel = 13 , geos::hypre::l1backwardGaussSeidel = 14 , geos::hypre::l1jacobi = 18 ,
  geos::hypre::gsElimWPivoting = 99 , geos::hypre::gsElimWInverse = 199
}
 This enum class specifies the F-relaxation type. More...
 
enum class  geos::hypre::MGRGlobalSmootherType : HYPRE_Int {
  geos::hypre::none = -1 , geos::hypre::blockJacobi = 0 , geos::hypre::blockGaussSeidel = 1 , geos::hypre::jacobi = 2 ,
  geos::hypre::ilu0 = 16
}
 This enum class specifies the global smoother type. More...
 

Functions

constexpr HYPRE_MemoryLocation geos::hypre::getMemoryLocation (LvArray::MemorySpace const space)
 
constexpr LvArray::MemorySpace geos::hypre::getLvArrayMemorySpace (HYPRE_MemoryLocation const location)
 
void geos::hypre::checkDeviceErrors (char const *msg, char const *file, int const line)
 
HYPRE_BigInt * geos::hypre::toHypreBigInt (geos::globalIndex *const index)
 Converts a non-const array from GEOSX globalIndex type to HYPRE_BigInt. More...
 
HYPRE_BigInt const * geos::hypre::toHypreBigInt (geos::globalIndex const *const index)
 Converts a const array from GEOSX globalIndex type to HYPRE_BigInt. More...
 
HYPRE_Vector geos::hypre::parVectorToVectorAll (HYPRE_ParVector const vec)
 Gather a parallel vector on a every rank. More...
 
HYPRE_Int geos::hypre::dummySetup (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector)
 Dummy function that does nothing but conform to hypre's signature for preconditioner setup/apply functions. More...
 
HYPRE_Int geos::hypre::SuperLUDistSolve (HYPRE_Solver solver, HYPRE_ParCSRMatrix A, HYPRE_ParVector b, HYPRE_ParVector x)
 The missing wrapper compatible with hypre solver solve signature. More...
 
HYPRE_Int geos::hypre::SuperLUDistDestroy (HYPRE_Solver solver)
 The missing wrapper compatible with hypre solver destroy signature. More...
 
HYPRE_Int geos::hypre::relaxationCreate (HYPRE_Solver &solver, HYPRE_Int const type)
 Create a relaxation-based smoother. More...
 
HYPRE_Int geos::hypre::relaxationSetup (HYPRE_Solver solver, HYPRE_ParCSRMatrix A, HYPRE_ParVector b, HYPRE_ParVector x)
 Setup a relaxation-based smoother. More...
 
HYPRE_Int geos::hypre::relaxationSolve (HYPRE_Solver solver, HYPRE_ParCSRMatrix A, HYPRE_ParVector b, HYPRE_ParVector x)
 Solve with a relaxation-based smoother. More...
 
HYPRE_Int geos::hypre::relaxationDestroy (HYPRE_Solver solver)
 Destroy a relaxation-based smoother. More...
 
HYPRE_Int geos::hypre::getAMGCycleType (LinearSolverParameters::AMG::CycleType const &type)
 Returns hypre's identifier of the AMG cycle type. More...
 
HYPRE_Int geos::hypre::getAMGRelaxationType (LinearSolverParameters::AMG::SmootherType const &type)
 Returns hypre's identifier of the AMG smoother type. More...
 
HYPRE_Int geos::hypre::getAMGInterpolationType (LinearSolverParameters::AMG::InterpType const &type)
 Returns hypre's identifier of the AMG interpolation type. More...
 
HYPRE_Int geos::hypre::getAMGAggressiveInterpolationType (LinearSolverParameters::AMG::AggInterpType const &type)
 Returns hypre's identifier of the AMG aggressive interpolation type. More...
 
HYPRE_Int geos::hypre::getILUType (LinearSolverParameters::AMG::SmootherType const type)
 Returns hypre's identifier of the AMG ILU smoother type. More...
 
HYPRE_Int geos::hypre::getAMGCoarseType (LinearSolverParameters::AMG::CoarseType const &type)
 Returns hypre's identifier of the AMG coarse solver type. More...
 
HYPRE_Int geos::hypre::getAMGCoarseningType (LinearSolverParameters::AMG::CoarseningType const &type)
 Returns hypre's identifier of the AMG coarsening type. More...
 
HYPRE_Int geos::hypre::getRelaxationType (LinearSolverParameters::PreconditionerType const type)
 Returns hypre's identifier of the relaxation preconditioner type. More...
 
HYPRE_Int geos::hypre::getILUType (LinearSolverParameters::PreconditionerType const type)
 Returns hypre's identifier of the ILU preconditioner type. More...
 

Variables

constexpr LvArray::MemorySpace geos::hypre::memorySpace = parallelDeviceMemorySpace
 Memory space used by hypre matrix/vector objects.
 
constexpr HYPRE_MemoryLocation geos::hypre::memoryLocation = HYPRE_MEMORY_DEVICE
 Memory location used by hypre matrix/vector objects.
 

Macro Definition Documentation

◆ GEOS_HYPRE_CHECK_DEVICE_ERRORS

#define GEOS_HYPRE_CHECK_DEVICE_ERRORS (   msg)    ::geos::hypre::checkDeviceErrors( msg, __FILE__, __LINE__ )

Check for previous device errors and report with line information.

Parameters
msgcustom message to add

Definition at line 173 of file HypreUtils.hpp.