Actual source code: mhypre.h

  1: #if !defined(_MHYPRE_H)
  2: #define _MHYPRE_H

  4: #include <petscsys.h>
  5: #include <../src/vec/vec/impls/hypre/vhyp.h>
  6: #include <HYPRE_IJ_mv.h>

  8: typedef struct {
  9:   HYPRE_IJMatrix    ij;
 10:   VecHYPRE_IJVector x;
 11:   VecHYPRE_IJVector b;
 12:   MPI_Comm          comm;
 13:   PetscBool         inner_free;
 14:   void              *array;
 15:   PetscInt          size;
 16:   PetscBool         available;
 17:   PetscBool         sorted_full;

 19:   Mat               cooMat; /* An agent matrix which does the MatSetValuesCOO() job for IJMatrix */
 20:   HYPRE_Int         *diagJ,*offdJ; /* Allocated by hypre, but we take the ownership away, so we need to free them on our own */
 21:   PetscInt          *diag; /* Diagonal pointers (i.e., SeqAIJ->diag[]) on device, allocated by hypre_TAlloc(). */
 22:   HYPRE_MemoryLocation memType;
 23: } Mat_HYPRE;

 25: #endif