1f4bdf6c4SBarry Smith 2f4bdf6c4SBarry Smith #if !defined(_MHYP_H) 3f4bdf6c4SBarry Smith #define _MHYP_H 4f4bdf6c4SBarry Smith 5c6db04a5SJed Brown #include <petscdmda.h> /*I "petscdmda.h" I*/ 6c6db04a5SJed Brown #include <HYPRE_struct_mv.h> 7c6db04a5SJed Brown #include <HYPRE_struct_ls.h> 8c6db04a5SJed Brown #include <_hypre_struct_mv.h> 9c6db04a5SJed Brown #include <HYPRE_sstruct_mv.h> 10c6db04a5SJed Brown #include <HYPRE_sstruct_ls.h> 11c6db04a5SJed Brown #include <_hypre_sstruct_mv.h> 12f4bdf6c4SBarry Smith 13f4bdf6c4SBarry Smith typedef struct { 14f4bdf6c4SBarry Smith MPI_Comm hcomm; 15f4bdf6c4SBarry Smith DM da; 16f4bdf6c4SBarry Smith HYPRE_StructGrid hgrid; 17f4bdf6c4SBarry Smith HYPRE_StructStencil hstencil; 18f4bdf6c4SBarry Smith HYPRE_StructMatrix hmat; 19f4bdf6c4SBarry Smith HYPRE_StructVector hb,hx; 20f4bdf6c4SBarry Smith hypre_Box hbox; 21f4bdf6c4SBarry Smith 22f4bdf6c4SBarry Smith PetscBool needsinitialization; 23f4bdf6c4SBarry Smith 24f4bdf6c4SBarry Smith /* variables that are stored here so they need not be reloaded for each MatSetValuesLocal() or MatZeroRowsLocal() call */ 25f4bdf6c4SBarry Smith PetscInt *gindices,rstart,gnx,gnxgny,xs,ys,zs,nx,ny,nxny; 26f4bdf6c4SBarry Smith } Mat_HYPREStruct; 27f4bdf6c4SBarry Smith 28f4bdf6c4SBarry Smith typedef struct { 29f4bdf6c4SBarry Smith MPI_Comm hcomm; 30f4bdf6c4SBarry Smith DM da; 31f4bdf6c4SBarry Smith HYPRE_SStructGrid ss_grid; 32f4bdf6c4SBarry Smith HYPRE_SStructGraph ss_graph; 33f4bdf6c4SBarry Smith HYPRE_SStructStencil ss_stencil; 34f4bdf6c4SBarry Smith HYPRE_SStructMatrix ss_mat; 35f4bdf6c4SBarry Smith HYPRE_SStructVector ss_b, ss_x; 36f4bdf6c4SBarry Smith hypre_Box hbox; 37f4bdf6c4SBarry Smith 38f4bdf6c4SBarry Smith int ss_object_type; 39f4bdf6c4SBarry Smith int nvars; 40f4bdf6c4SBarry Smith int dofs_order; 41f4bdf6c4SBarry Smith 42f4bdf6c4SBarry Smith PetscBool needsinitialization; 43f4bdf6c4SBarry Smith 44f4bdf6c4SBarry Smith /* variables that are stored here so they need not be reloaded for each MatSetValuesLocal() or MatZeroRowsLocal() call */ 45f4bdf6c4SBarry Smith PetscInt *gindices,rstart,gnx,gnxgny,gnxgnygnz,xs,ys,zs,nx,ny,nz,nxny,nxnynz; 46f4bdf6c4SBarry Smith } Mat_HYPRESStruct; 47f4bdf6c4SBarry Smith 48f4bdf6c4SBarry Smith 495a576424SJed Brown PETSC_INTERN PetscErrorCode MatHYPRE_IJMatrixCreate(Mat,HYPRE_IJMatrix*); 505a576424SJed Brown PETSC_INTERN PetscErrorCode MatHYPRE_IJMatrixCopy(Mat,HYPRE_IJMatrix); 515a576424SJed Brown PETSC_INTERN PetscErrorCode MatHYPRE_IJMatrixFastCopy(Mat,HYPRE_IJMatrix); 52*be42d407SJed Brown PETSC_EXTERN PetscErrorCode VecHYPRE_IJVectorCreate(Vec,HYPRE_IJVector*); 53f4bdf6c4SBarry Smith 54f4bdf6c4SBarry Smith 55f4bdf6c4SBarry Smith #endif 56