source: CIVL/examples/mpi-omp/AMG2013/struct_mv/struct_grid.h@ beab7f2

main test-branch
Last change on this file since beab7f2 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*BHEADER**********************************************************************
2 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
3 * Produced at the Lawrence Livermore National Laboratory.
4 * This file is part of HYPRE. See file COPYRIGHT for details.
5 *
6 * HYPRE is free software; you can redistribute it and/or modify it under the
7 * terms of the GNU Lesser General Public License (as published by the Free
8 * Software Foundation) version 2.1 dated February 1999.
9 *
10 * $Revision: 2.4 $
11 ***********************************************************************EHEADER*/
12
13
14/******************************************************************************
15 *
16 * Header info for the hypre_StructGrid structures
17 *
18 *****************************************************************************/
19
20#ifndef hypre_STRUCT_GRID_HEADER
21#define hypre_STRUCT_GRID_HEADER
22
23/*--------------------------------------------------------------------------
24 * hypre_StructGrid:
25 *--------------------------------------------------------------------------*/
26
27typedef struct hypre_StructGrid_struct
28{
29 MPI_Comm comm;
30
31 int dim; /* Number of grid dimensions */
32
33 hypre_BoxArray *boxes; /* Array of boxes in this process */
34 int *ids; /* Unique IDs for boxes */
35
36 hypre_BoxNeighbors *neighbors; /* Neighbors of boxes */
37 int max_distance; /* Neighborhood size */
38
39 hypre_Box *bounding_box; /* Bounding box around grid */
40
41 int local_size; /* Number of grid points locally */
42 int global_size; /* Total number of grid points */
43
44 hypre_Index periodic; /* Indicates if grid is periodic */
45
46 int ref_count;
47
48 /* GEC0902 additions for ghost expansion of boxes */
49
50 int ghlocal_size; /* Number of vars in box including ghosts */
51 int num_ghost[6]; /* ghost layer size for each box */
52
53
54} hypre_StructGrid;
55
56/*--------------------------------------------------------------------------
57 * Accessor macros: hypre_StructGrid
58 *--------------------------------------------------------------------------*/
59
60#define hypre_StructGridComm(grid) ((grid) -> comm)
61#define hypre_StructGridDim(grid) ((grid) -> dim)
62#define hypre_StructGridBoxes(grid) ((grid) -> boxes)
63#define hypre_StructGridIDs(grid) ((grid) -> ids)
64#define hypre_StructGridNeighbors(grid) ((grid) -> neighbors)
65#define hypre_StructGridMaxDistance(grid) ((grid) -> max_distance)
66#define hypre_StructGridBoundingBox(grid) ((grid) -> bounding_box)
67#define hypre_StructGridLocalSize(grid) ((grid) -> local_size)
68#define hypre_StructGridGlobalSize(grid) ((grid) -> global_size)
69#define hypre_StructGridPeriodic(grid) ((grid) -> periodic)
70#define hypre_StructGridRefCount(grid) ((grid) -> ref_count)
71#define hypre_StructGridGhlocalSize(grid) ((grid) -> ghlocal_size)
72#define hypre_StructGridNumGhost(grid) ((grid) -> num_ghost)
73
74#define hypre_StructGridBox(grid, i) \
75(hypre_BoxArrayBox(hypre_StructGridBoxes(grid), i))
76#define hypre_StructGridNumBoxes(grid) \
77(hypre_BoxArraySize(hypre_StructGridBoxes(grid)))
78
79#define hypre_StructGridIDPeriod(grid) \
80hypre_BoxNeighborsIDPeriod(hypre_StructGridNeighbors(grid))
81
82/*--------------------------------------------------------------------------
83 * Looping macros:
84 *--------------------------------------------------------------------------*/
85
86#define hypre_ForStructGridBoxI(i, grid) \
87hypre_ForBoxI(i, hypre_StructGridBoxes(grid))
88
89#endif
90
Note: See TracBrowser for help on using the repository browser.