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 */ 25*19bfd8f8SBarry Smith const PetscInt *gindices; 26*19bfd8f8SBarry Smith PetscInt rstart,gnx,gnxgny,xs,ys,zs,nx,ny,nxny; 27f4bdf6c4SBarry Smith } Mat_HYPREStruct; 28f4bdf6c4SBarry Smith 29f4bdf6c4SBarry Smith typedef struct { 30f4bdf6c4SBarry Smith MPI_Comm hcomm; 31f4bdf6c4SBarry Smith DM da; 32f4bdf6c4SBarry Smith HYPRE_SStructGrid ss_grid; 33f4bdf6c4SBarry Smith HYPRE_SStructGraph ss_graph; 34f4bdf6c4SBarry Smith HYPRE_SStructStencil ss_stencil; 35f4bdf6c4SBarry Smith HYPRE_SStructMatrix ss_mat; 36f4bdf6c4SBarry Smith HYPRE_SStructVector ss_b, ss_x; 37f4bdf6c4SBarry Smith hypre_Box hbox; 38f4bdf6c4SBarry Smith 39f4bdf6c4SBarry Smith int ss_object_type; 40f4bdf6c4SBarry Smith int nvars; 41f4bdf6c4SBarry Smith int dofs_order; 42f4bdf6c4SBarry Smith 43f4bdf6c4SBarry Smith PetscBool needsinitialization; 44f4bdf6c4SBarry Smith 45f4bdf6c4SBarry Smith /* variables that are stored here so they need not be reloaded for each MatSetValuesLocal() or MatZeroRowsLocal() call */ 46*19bfd8f8SBarry Smith const PetscInt *gindices; 47*19bfd8f8SBarry Smith PetscInt rstart,gnx,gnxgny,gnxgnygnz,xs,ys,zs,nx,ny,nz,nxny,nxnynz; 48f4bdf6c4SBarry Smith } Mat_HYPRESStruct; 49f4bdf6c4SBarry Smith 50f4bdf6c4SBarry Smith 515a576424SJed Brown PETSC_INTERN PetscErrorCode MatHYPRE_IJMatrixCreate(Mat,HYPRE_IJMatrix*); 525a576424SJed Brown PETSC_INTERN PetscErrorCode MatHYPRE_IJMatrixCopy(Mat,HYPRE_IJMatrix); 535a576424SJed Brown PETSC_INTERN PetscErrorCode MatHYPRE_IJMatrixFastCopy(Mat,HYPRE_IJMatrix); 54be42d407SJed Brown PETSC_EXTERN PetscErrorCode VecHYPRE_IJVectorCreate(Vec,HYPRE_IJVector*); 55f4bdf6c4SBarry Smith 56f4bdf6c4SBarry Smith 57f4bdf6c4SBarry Smith #endif 58