Actual source code: mhyp.h
1: #pragma once
3: #include <petscdmda.h>
4: #include <HYPRE_struct_mv.h>
5: #include <HYPRE_struct_ls.h>
6: #include <_hypre_struct_mv.h>
7: #include <HYPRE_sstruct_mv.h>
8: #include <HYPRE_sstruct_ls.h>
9: #include <_hypre_sstruct_mv.h>
11: typedef struct {
12: MPI_Comm hcomm;
13: DM da;
14: HYPRE_StructGrid hgrid;
15: HYPRE_StructStencil hstencil;
16: HYPRE_StructMatrix hmat;
17: HYPRE_StructVector hb, hx;
18: hypre_Box hbox;
20: PetscBool needsinitialization;
22: /* variables that are stored here so they need not be reloaded for each MatSetValuesLocal() or MatZeroRowsLocal() call */
23: const PetscInt *gindices;
24: PetscInt rstart, gnx, gnxgny, xs, ys, zs, nx, ny, nxny;
25: } Mat_HYPREStruct;
27: typedef struct {
28: MPI_Comm hcomm;
29: DM da;
30: HYPRE_SStructGrid ss_grid;
31: HYPRE_SStructGraph ss_graph;
32: HYPRE_SStructStencil ss_stencil;
33: HYPRE_SStructMatrix ss_mat;
34: HYPRE_SStructVector ss_b, ss_x;
35: hypre_Box hbox;
37: int ss_object_type;
38: int nvars;
39: int dofs_order;
41: PetscBool needsinitialization;
43: /* variables that are stored here so they need not be reloaded for each MatSetValuesLocal() or MatZeroRowsLocal() call */
44: const PetscInt *gindices;
45: PetscInt rstart, gnx, gnxgny, gnxgnygnz, xs, ys, zs, nx, ny, nz, nxny, nxnynz;
46: } Mat_HYPRESStruct;