hypre/struct_mv/struct_grid.h

75 lines
2.9 KiB
C
Raw Normal View History

1997-11-13 23:59:20 +08:00
/*BHEADER**********************************************************************
* (c) 1997 The Regents of the University of California
*
* See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
* notice, contact person, and disclaimer.
*
* $Revision$
*********************************************************************EHEADER*/
/******************************************************************************
*
1998-02-18 01:56:00 +08:00
* Header info for the hypre_StructGrid structures
1997-11-13 23:59:20 +08:00
*
*****************************************************************************/
1998-02-18 01:56:00 +08:00
#ifndef hypre_STRUCT_GRID_HEADER
#define hypre_STRUCT_GRID_HEADER
1997-11-13 23:59:20 +08:00
/*--------------------------------------------------------------------------
1998-02-18 01:56:00 +08:00
* hypre_StructGrid:
1997-11-13 23:59:20 +08:00
*--------------------------------------------------------------------------*/
typedef struct hypre_StructGrid_struct
1997-11-13 23:59:20 +08:00
{
MPI_Comm comm;
int dim; /* Number of grid dimensions */
hypre_BoxArray *boxes; /* Array of boxes in this process */
int *ids; /* Unique IDs for boxes */
hypre_BoxNeighbors *neighbors; /* Neighbors of boxes */
int max_distance; /* Neighborhood size */
hypre_Box *bounding_box; /* Bounding box around grid */
int local_size; /* Number of grid points locally */
int global_size; /* Total number of grid points */
hypre_Index periodic; /* Indicates if grid is periodic */
1999-01-08 07:35:07 +08:00
int ref_count;
1998-02-18 01:56:00 +08:00
} hypre_StructGrid;
1997-11-13 23:59:20 +08:00
/*--------------------------------------------------------------------------
1998-02-18 01:56:00 +08:00
* Accessor macros: hypre_StructGrid
1997-11-13 23:59:20 +08:00
*--------------------------------------------------------------------------*/
1998-02-18 01:56:00 +08:00
#define hypre_StructGridComm(grid) ((grid) -> comm)
#define hypre_StructGridDim(grid) ((grid) -> dim)
#define hypre_StructGridBoxes(grid) ((grid) -> boxes)
#define hypre_StructGridIDs(grid) ((grid) -> ids)
#define hypre_StructGridNeighbors(grid) ((grid) -> neighbors)
#define hypre_StructGridMaxDistance(grid) ((grid) -> max_distance)
#define hypre_StructGridBoundingBox(grid) ((grid) -> bounding_box)
#define hypre_StructGridLocalSize(grid) ((grid) -> local_size)
#define hypre_StructGridGlobalSize(grid) ((grid) -> global_size)
#define hypre_StructGridPeriodic(grid) ((grid) -> periodic)
#define hypre_StructGridRefCount(grid) ((grid) -> ref_count)
1997-11-13 23:59:20 +08:00
1998-02-18 01:56:00 +08:00
#define hypre_StructGridBox(grid, i) \
(hypre_BoxArrayBox(hypre_StructGridBoxes(grid), i))
#define hypre_StructGridNumBoxes(grid) \
(hypre_BoxArraySize(hypre_StructGridBoxes(grid)))
1997-11-13 23:59:20 +08:00
/*--------------------------------------------------------------------------
* Looping macros:
*--------------------------------------------------------------------------*/
1998-02-18 01:56:00 +08:00
#define hypre_ForStructGridBoxI(i, grid) \
hypre_ForBoxI(i, hypre_StructGridBoxes(grid))
1997-11-13 23:59:20 +08:00
#endif