1
1
/*BHEADER**********************************************************************
2
* Copyright (c) 2006 The Regents of the University of California.
2
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
3
3
* Produced at the Lawrence Livermore National Laboratory.
4
* Written by the HYPRE team. UCRL-CODE-222953.
7
* This file is part of HYPRE (see http://www.llnl.gov/CASC/hypre/).
8
* Please see the COPYRIGHT_and_LICENSE file for the copyright notice,
9
* disclaimer, contact information and the GNU Lesser General Public License.
11
* HYPRE is free software; you can redistribute it and/or modify it under the
12
* terms of the GNU General Public License (as published by the Free Software
13
* Foundation) version 2.1 dated February 1999.
15
* HYPRE is distributed in the hope that it will be useful, but WITHOUT ANY
16
* WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or FITNESS
17
* FOR A PARTICULAR PURPOSE. See the terms and conditions of the GNU General
18
* Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with this program; if not, write to the Free Software Foundation,
22
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4
* This file is part of HYPRE. See file COPYRIGHT for details.
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.
25
11
***********************************************************************EHEADER*/
29
16
/******************************************************************************
31
18
* Header info for the hypre_SStructGrid structures
120
int offset; /* minimum offset for this box */
122
int ghoffset; /* GEC0902 minimum offset ghost for this box */
123
int part; /* part the box lives on */
124
hypre_Index ilower; /* local ilower on neighbor index-space */
125
hypre_Index coord; /* lives on local index-space */
126
hypre_Index dir; /* lives on neighbor index-space */
127
hypre_Index stride; /* lives on local index-space */
105
int offset; /* minimum offset for this box */
107
int ghoffset; /* GEC0902 minimum offset ghost for this box */
108
int part; /* part the box lives on */
109
hypre_Index ilower; /* box ilower, but on the neighbor index-space */
110
hypre_Index coord; /* lives on local index-space */
111
hypre_Index dir; /* lives on local index-space */
112
hypre_Index stride; /* lives on local index-space */
128
113
hypre_Index ghstride; /* GEC1002 the ghost equivalent of strides */
130
115
} hypre_SStructNMapInfo;
119
hypre_CommInfo *comm_info;
125
} hypre_SStructCommInfo;
132
127
typedef struct hypre_SStructGrid_struct
143
138
hypre_SStructNeighbor **neighbors;
144
139
int **nvneighbors;
145
140
hypre_SStructNeighbor ***vneighbors;
141
hypre_SStructCommInfo **vnbor_comm_info; /* for updating shared data */
147
144
/* u-variables info: During construction, array entries are consecutive.
148
145
* After 'Assemble', entries are referenced via local cell rank. */
180
177
#define hypre_SStructGridNeighbors(grid) ((grid) -> neighbors)
181
178
#define hypre_SStructGridNVNeighbors(grid) ((grid) -> nvneighbors)
182
179
#define hypre_SStructGridVNeighbors(grid) ((grid) -> vneighbors)
180
#define hypre_SStructGridVNborCommInfo(grid) ((grid) -> vnbor_comm_info)
181
#define hypre_SStructGridVNborNComms(grid) ((grid) -> vnbor_ncomms)
183
182
#define hypre_SStructGridNUCVars(grid) ((grid) -> nucvars)
184
183
#define hypre_SStructGridUCVars(grid) ((grid) -> ucvars)
185
184
#define hypre_SStructGridUCVar(grid, i) ((grid) -> ucvars[i])
233
232
#define hypre_SStructMapInfoType(info) ((info) -> type)
234
233
#define hypre_SStructMapInfoProc(info) ((info) -> proc)
235
234
#define hypre_SStructMapInfoOffset(info) ((info) -> offset)
236
#define hypre_SStructMapInfoBox(info) ((info) -> box)
235
#define hypre_SStructMapInfoBoxnum(info) ((info) -> boxnum)
237
236
#define hypre_SStructMapInfoGhoffset(info) ((info) -> ghoffset)
239
238
/*--------------------------------------------------------------------------
258
257
#define hypre_SStructNeighborILower(neighbor) ((neighbor) -> ilower)
259
258
#define hypre_SStructNeighborCoord(neighbor) ((neighbor) -> coord)
260
259
#define hypre_SStructNeighborDir(neighbor) ((neighbor) -> dir)
261
#define hypre_SStructNeighborPrimary(neighbor) ((neighbor) -> primary)
261
/*--------------------------------------------------------------------------
262
* Accessor macros: hypre_SStructCommInfo
263
*--------------------------------------------------------------------------*/
265
#define hypre_SStructCommInfoCommInfo(cinfo) ((cinfo) -> comm_info)
266
#define hypre_SStructCommInfoSendPart(cinfo) ((cinfo) -> send_part)
267
#define hypre_SStructCommInfoRecvPart(cinfo) ((cinfo) -> recv_part)
268
#define hypre_SStructCommInfoSendVar(cinfo) ((cinfo) -> send_var)
269
#define hypre_SStructCommInfoRecvVar(cinfo) ((cinfo) -> recv_var)
263
271
/*--------------------------------------------------------------------------
264
272
* Accessor macros: hypre_SStructUCVar