1 #ifndef _MHYPRE_H 2 #define _MHYPRE_H 3 4 #include <petscsys.h> 5 #include <../src/vec/vec/impls/hypre/vhyp.h> 6 #include <HYPRE_IJ_mv.h> 7 8 typedef struct { 9 HYPRE_IJMatrix ij; 10 VecHYPRE_IJVector x; 11 VecHYPRE_IJVector b; 12 MPI_Comm comm; 13 PetscBool inner_free; 14 15 /* MatGetArray_HYPRE */ 16 void *array; 17 PetscInt array_size; 18 PetscBool array_available; 19 20 /* MatSetOption_ support */ 21 PetscBool donotstash; 22 23 /* COO */ 24 Mat cooMat; /* An agent matrix which does the MatSetValuesCOO() job for IJMatrix */ 25 HYPRE_Int *diagJ, *offdJ; /* Allocated by hypre, but we take the ownership away, so we need to free them on our own */ 26 PetscInt *diag; /* Diagonal pointers (i.e., SeqAIJ->diag[]) on device, allocated by hypre_TAlloc(). */ 27 HYPRE_MemoryLocation memType; 28 } Mat_HYPRE; 29 30 #endif 31