| 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 | /*BHEADER**********************************************************************
|
|---|
| 13 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 14 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 15 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 16 | *
|
|---|
| 17 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 18 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 19 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 20 | *
|
|---|
| 21 | * $Revision: 2.4 $
|
|---|
| 22 | ***********************************************************************EHEADER*/
|
|---|
| 23 | /*BHEADER**********************************************************************
|
|---|
| 24 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 25 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 26 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 27 | *
|
|---|
| 28 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 29 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 30 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 31 | *
|
|---|
| 32 | * $Revision: 2.4 $
|
|---|
| 33 | ***********************************************************************EHEADER*/
|
|---|
| 34 | /*BHEADER**********************************************************************
|
|---|
| 35 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 36 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 37 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 38 | *
|
|---|
| 39 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 40 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 41 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 42 | *
|
|---|
| 43 | * $Revision: 2.4 $
|
|---|
| 44 | ***********************************************************************EHEADER*/
|
|---|
| 45 | /*BHEADER**********************************************************************
|
|---|
| 46 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 47 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 48 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 49 | *
|
|---|
| 50 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 51 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 52 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 53 | *
|
|---|
| 54 | * $Revision: 2.4 $
|
|---|
| 55 | ***********************************************************************EHEADER*/
|
|---|
| 56 | /*BHEADER**********************************************************************
|
|---|
| 57 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 58 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 59 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 60 | *
|
|---|
| 61 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 62 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 63 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 64 | *
|
|---|
| 65 | * $Revision: 2.4 $
|
|---|
| 66 | ***********************************************************************EHEADER*/
|
|---|
| 67 |
|
|---|
| 68 | #include "utilities.h"
|
|---|
| 69 |
|
|---|
| 70 | #include "HYPRE_sstruct_mv.h"
|
|---|
| 71 |
|
|---|
| 72 | #ifndef hypre_SSTRUCT_MV_HEADER
|
|---|
| 73 | #define hypre_SSTRUCT_MV_HEADER
|
|---|
| 74 |
|
|---|
| 75 | #include "struct_mv.h"
|
|---|
| 76 | #include "IJ_mv.h"
|
|---|
| 77 | #include "HYPRE.h"
|
|---|
| 78 |
|
|---|
| 79 | #ifdef __cplusplus
|
|---|
| 80 | extern "C" {
|
|---|
| 81 | #endif
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 | /******************************************************************************
|
|---|
| 87 | *
|
|---|
| 88 | *****************************************************************************/
|
|---|
| 89 |
|
|---|
| 90 | #ifndef hypre_BOX_MAP_HEADER
|
|---|
| 91 | #define hypre_BOX_MAP_HEADER
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 | /*--------------------------------------------------------------------------
|
|---|
| 95 | * hypre_StructMap:
|
|---|
| 96 | *--------------------------------------------------------------------------*/
|
|---|
| 97 |
|
|---|
| 98 | typedef struct hypre_BoxMapEntry_struct
|
|---|
| 99 | {
|
|---|
| 100 | hypre_Index imin;
|
|---|
| 101 | hypre_Index imax;
|
|---|
| 102 |
|
|---|
| 103 | /* GEC0902 additional information for ghost calculation in the offset */
|
|---|
| 104 | int num_ghost[6];
|
|---|
| 105 |
|
|---|
| 106 | void *info;
|
|---|
| 107 |
|
|---|
| 108 | /* link list of hypre_BoxMapEntries, ones on the process listed first. */
|
|---|
| 109 | struct hypre_BoxMapEntry_struct *next;
|
|---|
| 110 |
|
|---|
| 111 | } hypre_BoxMapEntry;
|
|---|
| 112 |
|
|---|
| 113 | typedef struct
|
|---|
| 114 | {
|
|---|
| 115 | int max_nentries;
|
|---|
| 116 | hypre_Index global_imin;
|
|---|
| 117 | hypre_Index global_imax;
|
|---|
| 118 |
|
|---|
| 119 | /* GEC0902 additional information for ghost calculation in the offset */
|
|---|
| 120 | int num_ghost[6];
|
|---|
| 121 |
|
|---|
| 122 | int nentries;
|
|---|
| 123 | hypre_BoxMapEntry *entries;
|
|---|
| 124 | hypre_BoxMapEntry **table; /* this points into 'entries' array */
|
|---|
| 125 | hypre_BoxMapEntry *boxproc_table; /* (proc, local_box) table pointer */
|
|---|
| 126 | int *indexes[3];
|
|---|
| 127 | int size[3];
|
|---|
| 128 | int *boxproc_offset;
|
|---|
| 129 |
|
|---|
| 130 | int last_index[3];
|
|---|
| 131 |
|
|---|
| 132 | } hypre_BoxMap;
|
|---|
| 133 |
|
|---|
| 134 | /*--------------------------------------------------------------------------
|
|---|
| 135 | * Accessor macros: hypre_BoxMap
|
|---|
| 136 | *--------------------------------------------------------------------------*/
|
|---|
| 137 |
|
|---|
| 138 | #define hypre_BoxMapMaxNEntries(map) ((map) -> max_nentries)
|
|---|
| 139 | #define hypre_BoxMapGlobalIMin(map) ((map) -> global_imin)
|
|---|
| 140 | #define hypre_BoxMapGlobalIMax(map) ((map) -> global_imax)
|
|---|
| 141 | #define hypre_BoxMapNEntries(map) ((map) -> nentries)
|
|---|
| 142 | #define hypre_BoxMapEntries(map) ((map) -> entries)
|
|---|
| 143 | #define hypre_BoxMapTable(map) ((map) -> table)
|
|---|
| 144 | #define hypre_BoxMapBoxProcTable(map) ((map) -> boxproc_table)
|
|---|
| 145 | #define hypre_BoxMapBoxProcOffset(map) ((map) -> boxproc_offset)
|
|---|
| 146 | #define hypre_BoxMapIndexes(map) ((map) -> indexes)
|
|---|
| 147 | #define hypre_BoxMapSize(map) ((map) -> size)
|
|---|
| 148 | #define hypre_BoxMapLastIndex(map) ((map) -> last_index)
|
|---|
| 149 | #define hypre_BoxMapNumGhost(map) ((map) -> num_ghost)
|
|---|
| 150 |
|
|---|
| 151 | #define hypre_BoxMapIndexesD(map, d) hypre_BoxMapIndexes(map)[d]
|
|---|
| 152 | #define hypre_BoxMapSizeD(map, d) hypre_BoxMapSize(map)[d]
|
|---|
| 153 | #define hypre_BoxMapLastIndexD(map, d) hypre_BoxMapLastIndex(map)[d]
|
|---|
| 154 |
|
|---|
| 155 | #define hypre_BoxMapTableEntry(map, i, j, k) \
|
|---|
| 156 | hypre_BoxMapTable(map)[((k*hypre_BoxMapSizeD(map, 1) + j)*\
|
|---|
| 157 | hypre_BoxMapSizeD(map, 0) + i)]
|
|---|
| 158 |
|
|---|
| 159 | #define hypre_BoxMapBoxProcTableEntry(map, box, proc) \
|
|---|
| 160 | hypre_BoxMapBoxProcTable(map)[ box + \
|
|---|
| 161 | hypre_BoxMapBoxProcOffset(map)[proc] ]
|
|---|
| 162 |
|
|---|
| 163 | /*--------------------------------------------------------------------------
|
|---|
| 164 | * Accessor macros: hypre_BoxMapEntry
|
|---|
| 165 | *--------------------------------------------------------------------------*/
|
|---|
| 166 |
|
|---|
| 167 | #define hypre_BoxMapEntryIMin(entry) ((entry) -> imin)
|
|---|
| 168 | #define hypre_BoxMapEntryIMax(entry) ((entry) -> imax)
|
|---|
| 169 | #define hypre_BoxMapEntryInfo(entry) ((entry) -> info)
|
|---|
| 170 | #define hypre_BoxMapEntryNumGhost(entry) ((entry) -> num_ghost)
|
|---|
| 171 | #define hypre_BoxMapEntryNext(entry) ((entry) -> next)
|
|---|
| 172 |
|
|---|
| 173 | #endif
|
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 |
|
|---|
| 177 | /******************************************************************************
|
|---|
| 178 | *
|
|---|
| 179 | * Header info for the hypre_SStructGrid structures
|
|---|
| 180 | *
|
|---|
| 181 | *****************************************************************************/
|
|---|
| 182 |
|
|---|
| 183 | #ifndef hypre_SSTRUCT_GRID_HEADER
|
|---|
| 184 | #define hypre_SSTRUCT_GRID_HEADER
|
|---|
| 185 |
|
|---|
| 186 | /*--------------------------------------------------------------------------
|
|---|
| 187 | * hypre_SStructGrid:
|
|---|
| 188 | *
|
|---|
| 189 | * NOTE: Since variables may be replicated across different processes,
|
|---|
| 190 | * a separate set of "interface grids" is retained so that data can be
|
|---|
| 191 | * migrated onto and off of the internal (non-replicated) grids.
|
|---|
| 192 | *--------------------------------------------------------------------------*/
|
|---|
| 193 |
|
|---|
| 194 | typedef enum hypre_SStructVariable_enum hypre_SStructVariable;
|
|---|
| 195 |
|
|---|
| 196 | typedef struct
|
|---|
| 197 | {
|
|---|
| 198 | HYPRE_SStructVariable type;
|
|---|
| 199 | int rank; /* local rank */
|
|---|
| 200 | int proc;
|
|---|
| 201 |
|
|---|
| 202 | } hypre_SStructUVar;
|
|---|
| 203 |
|
|---|
| 204 | typedef struct
|
|---|
| 205 | {
|
|---|
| 206 | int part;
|
|---|
| 207 | hypre_Index cell;
|
|---|
| 208 | int nuvars;
|
|---|
| 209 | hypre_SStructUVar *uvars;
|
|---|
| 210 |
|
|---|
| 211 | } hypre_SStructUCVar;
|
|---|
| 212 |
|
|---|
| 213 | typedef struct
|
|---|
| 214 | {
|
|---|
| 215 | MPI_Comm comm; /* TODO: use different comms */
|
|---|
| 216 | int ndim;
|
|---|
| 217 | int nvars; /* number of variables */
|
|---|
| 218 | HYPRE_SStructVariable *vartypes; /* types of variables */
|
|---|
| 219 | hypre_StructGrid *sgrids[8]; /* struct grids for each vartype */
|
|---|
| 220 | hypre_BoxArray *iboxarrays[8]; /* interface boxes */
|
|---|
| 221 |
|
|---|
| 222 | hypre_BoxArray *pneighbors;
|
|---|
| 223 |
|
|---|
| 224 | int local_size; /* Number of variables locally */
|
|---|
| 225 | HYPRE_BigInt global_size; /* Total number of variables */
|
|---|
| 226 |
|
|---|
| 227 | hypre_Index periodic; /* Indicates if pgrid is periodic */
|
|---|
| 228 |
|
|---|
| 229 | /* GEC0902 additions for ghost expansion of boxes */
|
|---|
| 230 |
|
|---|
| 231 | int ghlocal_size; /* Number of vars including ghosts */
|
|---|
| 232 |
|
|---|
| 233 | int cell_sgrid_done; /* =1 implies cell grid already assembled */
|
|---|
| 234 | } hypre_SStructPGrid;
|
|---|
| 235 |
|
|---|
| 236 | typedef struct
|
|---|
| 237 | {
|
|---|
| 238 | hypre_Box box;
|
|---|
| 239 | int part;
|
|---|
| 240 | hypre_Index ilower;
|
|---|
| 241 | hypre_Index coord;
|
|---|
| 242 | hypre_Index dir;
|
|---|
| 243 | int primary;
|
|---|
| 244 |
|
|---|
| 245 | } hypre_SStructNeighbor;
|
|---|
| 246 |
|
|---|
| 247 | enum hypre_SStructMapInfoType
|
|---|
| 248 | {
|
|---|
| 249 | hypre_SSTRUCT_MAP_INFO_DEFAULT = 0,
|
|---|
| 250 | hypre_SSTRUCT_MAP_INFO_NEIGHBOR = 1
|
|---|
| 251 | };
|
|---|
| 252 |
|
|---|
| 253 | typedef struct
|
|---|
| 254 | {
|
|---|
| 255 | int type;
|
|---|
| 256 | int proc;
|
|---|
| 257 | HYPRE_BigInt offset;
|
|---|
| 258 | int box;
|
|---|
| 259 | /* GEC0902 ghost offset */
|
|---|
| 260 | HYPRE_BigInt ghoffset;
|
|---|
| 261 |
|
|---|
| 262 | } hypre_SStructMapInfo;
|
|---|
| 263 |
|
|---|
| 264 | typedef struct
|
|---|
| 265 | {
|
|---|
| 266 | int type;
|
|---|
| 267 | int proc;
|
|---|
| 268 | HYPRE_BigInt offset; /* minimum offset for this box */
|
|---|
| 269 | int box;
|
|---|
| 270 | HYPRE_BigInt ghoffset; /* GEC0902 minimum offset ghost for this box */
|
|---|
| 271 | int part; /* part the box lives on */
|
|---|
| 272 | hypre_Index ilower; /* local ilower on neighbor index-space */
|
|---|
| 273 | hypre_Index coord; /* lives on local index-space */
|
|---|
| 274 | hypre_Index dir; /* lives on neighbor index-space */
|
|---|
| 275 | hypre_Index stride; /* lives on local index-space */
|
|---|
| 276 | hypre_Index ghstride; /* GEC1002 the ghost equivalent of strides */
|
|---|
| 277 |
|
|---|
| 278 | } hypre_SStructNMapInfo;
|
|---|
| 279 |
|
|---|
| 280 | typedef struct hypre_SStructGrid_struct
|
|---|
| 281 | {
|
|---|
| 282 | MPI_Comm comm;
|
|---|
| 283 | int ndim;
|
|---|
| 284 | int nparts;
|
|---|
| 285 |
|
|---|
| 286 | /* s-variable info */
|
|---|
| 287 | hypre_SStructPGrid **pgrids;
|
|---|
| 288 |
|
|---|
| 289 | /* neighbor info */
|
|---|
| 290 | int *nneighbors;
|
|---|
| 291 | hypre_SStructNeighbor **neighbors;
|
|---|
| 292 | int **nvneighbors;
|
|---|
| 293 | hypre_SStructNeighbor ***vneighbors;
|
|---|
| 294 |
|
|---|
| 295 | /* u-variables info: During construction, array entries are consecutive.
|
|---|
| 296 | * After 'Assemble', entries are referenced via local cell rank. */
|
|---|
| 297 | int nucvars;
|
|---|
| 298 | hypre_SStructUCVar **ucvars;
|
|---|
| 299 |
|
|---|
| 300 | /* info for mapping (part, index, var) --> rank */
|
|---|
| 301 | hypre_BoxMap ***maps; /* map for each part, var */
|
|---|
| 302 | hypre_SStructMapInfo ***info;
|
|---|
| 303 | hypre_SStructNMapInfo ***ninfo;
|
|---|
| 304 | HYPRE_BigInt start_rank;
|
|---|
| 305 |
|
|---|
| 306 | int local_size; /* Number of variables locally */
|
|---|
| 307 | HYPRE_BigInt global_size; /* Total number of variables */
|
|---|
| 308 |
|
|---|
| 309 | int ref_count;
|
|---|
| 310 |
|
|---|
| 311 | /* GEC0902 additions for ghost expansion of boxes */
|
|---|
| 312 |
|
|---|
| 313 | int ghlocal_size; /* GEC0902 Number of vars including ghosts */
|
|---|
| 314 | HYPRE_BigInt ghstart_rank; /* GEC0902 start rank including ghosts */
|
|---|
| 315 |
|
|---|
| 316 | } hypre_SStructGrid;
|
|---|
| 317 |
|
|---|
| 318 | /*--------------------------------------------------------------------------
|
|---|
| 319 | * Accessor macros: hypre_SStructGrid
|
|---|
| 320 | *--------------------------------------------------------------------------*/
|
|---|
| 321 |
|
|---|
| 322 | #define hypre_SStructGridComm(grid) ((grid) -> comm)
|
|---|
| 323 | #define hypre_SStructGridNDim(grid) ((grid) -> ndim)
|
|---|
| 324 | #define hypre_SStructGridNParts(grid) ((grid) -> nparts)
|
|---|
| 325 | #define hypre_SStructGridPGrids(grid) ((grid) -> pgrids)
|
|---|
| 326 | #define hypre_SStructGridPGrid(grid, part) ((grid) -> pgrids[part])
|
|---|
| 327 | #define hypre_SStructGridNNeighbors(grid) ((grid) -> nneighbors)
|
|---|
| 328 | #define hypre_SStructGridNeighbors(grid) ((grid) -> neighbors)
|
|---|
| 329 | #define hypre_SStructGridNVNeighbors(grid) ((grid) -> nvneighbors)
|
|---|
| 330 | #define hypre_SStructGridVNeighbors(grid) ((grid) -> vneighbors)
|
|---|
| 331 | #define hypre_SStructGridNUCVars(grid) ((grid) -> nucvars)
|
|---|
| 332 | #define hypre_SStructGridUCVars(grid) ((grid) -> ucvars)
|
|---|
| 333 | #define hypre_SStructGridUCVar(grid, i) ((grid) -> ucvars[i])
|
|---|
| 334 | #define hypre_SStructGridMaps(grid) ((grid) -> maps)
|
|---|
| 335 | #define hypre_SStructGridMap(grid, part, var) ((grid) -> maps[part][var])
|
|---|
| 336 | #define hypre_SStructGridInfo(grid) ((grid) -> info)
|
|---|
| 337 | #define hypre_SStructGridNInfo(grid) ((grid) -> ninfo)
|
|---|
| 338 | #define hypre_SStructGridStartRank(grid) ((grid) -> start_rank)
|
|---|
| 339 | #define hypre_SStructGridLocalSize(grid) ((grid) -> local_size)
|
|---|
| 340 | #define hypre_SStructGridGlobalSize(grid) ((grid) -> global_size)
|
|---|
| 341 | #define hypre_SStructGridRefCount(grid) ((grid) -> ref_count)
|
|---|
| 342 | #define hypre_SStructGridGhlocalSize(grid) ((grid) -> ghlocal_size)
|
|---|
| 343 | #define hypre_SStructGridGhstartRank(grid) ((grid) -> ghstart_rank)
|
|---|
| 344 |
|
|---|
| 345 | /*--------------------------------------------------------------------------
|
|---|
| 346 | * Accessor macros: hypre_SStructPGrid
|
|---|
| 347 | *--------------------------------------------------------------------------*/
|
|---|
| 348 |
|
|---|
| 349 | #define hypre_SStructPGridComm(pgrid) ((pgrid) -> comm)
|
|---|
| 350 | #define hypre_SStructPGridNDim(pgrid) ((pgrid) -> ndim)
|
|---|
| 351 | #define hypre_SStructPGridNVars(pgrid) ((pgrid) -> nvars)
|
|---|
| 352 | #define hypre_SStructPGridVarTypes(pgrid) ((pgrid) -> vartypes)
|
|---|
| 353 | #define hypre_SStructPGridVarType(pgrid, var) ((pgrid) -> vartypes[var])
|
|---|
| 354 | #define hypre_SStructPGridCellSGridDone(pgrid) ((pgrid) -> cell_sgrid_done)
|
|---|
| 355 |
|
|---|
| 356 | #define hypre_SStructPGridSGrids(pgrid) ((pgrid) -> sgrids)
|
|---|
| 357 | #define hypre_SStructPGridSGrid(pgrid, var) \
|
|---|
| 358 | ((pgrid) -> sgrids[hypre_SStructPGridVarType(pgrid, var)])
|
|---|
| 359 | #define hypre_SStructPGridCellSGrid(pgrid) \
|
|---|
| 360 | ((pgrid) -> sgrids[HYPRE_SSTRUCT_VARIABLE_CELL])
|
|---|
| 361 | #define hypre_SStructPGridVTSGrid(pgrid, vartype) ((pgrid) -> sgrids[vartype])
|
|---|
| 362 |
|
|---|
| 363 | #define hypre_SStructPGridIBoxArrays(pgrid) ((pgrid) -> iboxarrays)
|
|---|
| 364 | #define hypre_SStructPGridIBoxArray(pgrid, var) \
|
|---|
| 365 | ((pgrid) -> iboxarrays[hypre_SStructPGridVarType(pgrid, var)])
|
|---|
| 366 | #define hypre_SStructPGridCellIBoxArray(pgrid) \
|
|---|
| 367 | ((pgrid) -> iboxarrays[HYPRE_SSTRUCT_VARIABLE_CELL])
|
|---|
| 368 | #define hypre_SStructPGridVTIBoxArray(pgrid, vartype) \
|
|---|
| 369 | ((pgrid) -> iboxarrays[vartype])
|
|---|
| 370 |
|
|---|
| 371 | #define hypre_SStructPGridPNeighbors(pgrid) ((pgrid) -> pneighbors)
|
|---|
| 372 | #define hypre_SStructPGridLocalSize(pgrid) ((pgrid) -> local_size)
|
|---|
| 373 | #define hypre_SStructPGridGlobalSize(pgrid) ((pgrid) -> global_size)
|
|---|
| 374 | #define hypre_SStructPGridPeriodic(pgrid) ((pgrid) -> periodic)
|
|---|
| 375 | #define hypre_SStructPGridGhlocalSize(pgrid) ((pgrid) -> ghlocal_size)
|
|---|
| 376 |
|
|---|
| 377 | /*--------------------------------------------------------------------------
|
|---|
| 378 | * Accessor macros: hypre_SStructMapInfo
|
|---|
| 379 | *--------------------------------------------------------------------------*/
|
|---|
| 380 |
|
|---|
| 381 | #define hypre_SStructMapInfoType(info) ((info) -> type)
|
|---|
| 382 | #define hypre_SStructMapInfoProc(info) ((info) -> proc)
|
|---|
| 383 | #define hypre_SStructMapInfoOffset(info) ((info) -> offset)
|
|---|
| 384 | #define hypre_SStructMapInfoBox(info) ((info) -> box)
|
|---|
| 385 | #define hypre_SStructMapInfoGhoffset(info) ((info) -> ghoffset)
|
|---|
| 386 |
|
|---|
| 387 | /*--------------------------------------------------------------------------
|
|---|
| 388 | * Accessor macros: hypre_SStructNMapInfo
|
|---|
| 389 | *--------------------------------------------------------------------------*/
|
|---|
| 390 |
|
|---|
| 391 | /* Use the MapInfo macros to access the first five structure components */
|
|---|
| 392 |
|
|---|
| 393 | #define hypre_SStructNMapInfoPart(info) ((info) -> part)
|
|---|
| 394 | #define hypre_SStructNMapInfoILower(info) ((info) -> ilower)
|
|---|
| 395 | #define hypre_SStructNMapInfoCoord(info) ((info) -> coord)
|
|---|
| 396 | #define hypre_SStructNMapInfoDir(info) ((info) -> dir)
|
|---|
| 397 | #define hypre_SStructNMapInfoStride(info) ((info) -> stride)
|
|---|
| 398 | #define hypre_SStructNMapInfoGhstride(info) ((info) -> ghstride)
|
|---|
| 399 |
|
|---|
| 400 | /*--------------------------------------------------------------------------
|
|---|
| 401 | * Accessor macros: hypre_SStructNeighbor
|
|---|
| 402 | *--------------------------------------------------------------------------*/
|
|---|
| 403 |
|
|---|
| 404 | #define hypre_SStructNeighborBox(neighbor) &((neighbor) -> box)
|
|---|
| 405 | #define hypre_SStructNeighborPart(neighbor) ((neighbor) -> part)
|
|---|
| 406 | #define hypre_SStructNeighborILower(neighbor) ((neighbor) -> ilower)
|
|---|
| 407 | #define hypre_SStructNeighborCoord(neighbor) ((neighbor) -> coord)
|
|---|
| 408 | #define hypre_SStructNeighborDir(neighbor) ((neighbor) -> dir)
|
|---|
| 409 | #define hypre_SStructNeighborPrimary(neighbor) ((neighbor) -> primary)
|
|---|
| 410 |
|
|---|
| 411 | /*--------------------------------------------------------------------------
|
|---|
| 412 | * Accessor macros: hypre_SStructUCVar
|
|---|
| 413 | *--------------------------------------------------------------------------*/
|
|---|
| 414 |
|
|---|
| 415 | #define hypre_SStructUCVarPart(uc) ((uc) -> part)
|
|---|
| 416 | #define hypre_SStructUCVarCell(uc) ((uc) -> cell)
|
|---|
| 417 | #define hypre_SStructUCVarNUVars(uc) ((uc) -> nuvars)
|
|---|
| 418 | #define hypre_SStructUCVarUVars(uc) ((uc) -> uvars)
|
|---|
| 419 | #define hypre_SStructUCVarType(uc, i) ((uc) -> uvars[i].type)
|
|---|
| 420 | #define hypre_SStructUCVarRank(uc, i) ((uc) -> uvars[i].rank)
|
|---|
| 421 | #define hypre_SStructUCVarProc(uc, i) ((uc) -> uvars[i].proc)
|
|---|
| 422 |
|
|---|
| 423 | #endif
|
|---|
| 424 |
|
|---|
| 425 |
|
|---|
| 426 |
|
|---|
| 427 |
|
|---|
| 428 | /******************************************************************************
|
|---|
| 429 | *
|
|---|
| 430 | * Header info for hypre_SStructStencil data structures
|
|---|
| 431 | *
|
|---|
| 432 | *****************************************************************************/
|
|---|
| 433 |
|
|---|
| 434 | #ifndef hypre_SSTRUCT_STENCIL_HEADER
|
|---|
| 435 | #define hypre_SSTRUCT_STENCIL_HEADER
|
|---|
| 436 |
|
|---|
| 437 | /*--------------------------------------------------------------------------
|
|---|
| 438 | * hypre_SStructStencil
|
|---|
| 439 | *--------------------------------------------------------------------------*/
|
|---|
| 440 |
|
|---|
| 441 | typedef struct hypre_SStructStencil_struct
|
|---|
| 442 | {
|
|---|
| 443 | hypre_StructStencil *sstencil;
|
|---|
| 444 | int *vars;
|
|---|
| 445 |
|
|---|
| 446 | int ref_count;
|
|---|
| 447 |
|
|---|
| 448 | } hypre_SStructStencil;
|
|---|
| 449 |
|
|---|
| 450 | /*--------------------------------------------------------------------------
|
|---|
| 451 | * Accessor functions for the hypre_SStructStencil structure
|
|---|
| 452 | *--------------------------------------------------------------------------*/
|
|---|
| 453 |
|
|---|
| 454 | #define hypre_SStructStencilSStencil(stencil) ((stencil) -> sstencil)
|
|---|
| 455 | #define hypre_SStructStencilVars(stencil) ((stencil) -> vars)
|
|---|
| 456 | #define hypre_SStructStencilVar(stencil, i) ((stencil) -> vars[i])
|
|---|
| 457 | #define hypre_SStructStencilRefCount(stencil) ((stencil) -> ref_count)
|
|---|
| 458 |
|
|---|
| 459 | #define hypre_SStructStencilShape(stencil) \
|
|---|
| 460 | hypre_StructStencilShape( hypre_SStructStencilSStencil(stencil) )
|
|---|
| 461 | #define hypre_SStructStencilSize(stencil) \
|
|---|
| 462 | hypre_StructStencilSize( hypre_SStructStencilSStencil(stencil) )
|
|---|
| 463 | #define hypre_SStructStencilMaxOffset(stencil) \
|
|---|
| 464 | hypre_StructStencilMaxOffset( hypre_SStructStencilSStencil(stencil) )
|
|---|
| 465 | #define hypre_SStructStencilNDim(stencil) \
|
|---|
| 466 | hypre_StructStencilDim( hypre_SStructStencilSStencil(stencil) )
|
|---|
| 467 | #define hypre_SStructStencilEntry(stencil, i) \
|
|---|
| 468 | hypre_StructStencilElement( hypre_SStructStencilSStencil(stencil), i )
|
|---|
| 469 |
|
|---|
| 470 | #endif
|
|---|
| 471 |
|
|---|
| 472 |
|
|---|
| 473 |
|
|---|
| 474 | /******************************************************************************
|
|---|
| 475 | *
|
|---|
| 476 | * Header info for the hypre_SStructGraph structures
|
|---|
| 477 | *
|
|---|
| 478 | *****************************************************************************/
|
|---|
| 479 |
|
|---|
| 480 | #ifndef hypre_SSTRUCT_GRAPH_HEADER
|
|---|
| 481 | #define hypre_SSTRUCT_GRAPH_HEADER
|
|---|
| 482 |
|
|---|
| 483 | /*--------------------------------------------------------------------------
|
|---|
| 484 | * hypre_SStructGraph:
|
|---|
| 485 | *--------------------------------------------------------------------------*/
|
|---|
| 486 |
|
|---|
| 487 | typedef struct
|
|---|
| 488 | {
|
|---|
| 489 | int to_part;
|
|---|
| 490 | hypre_Index to_index;
|
|---|
| 491 | int to_var;
|
|---|
| 492 | int to_box; /* local box number */
|
|---|
| 493 | int to_proc;
|
|---|
| 494 | HYPRE_BigInt rank;
|
|---|
| 495 |
|
|---|
| 496 | } hypre_SStructUEntry;
|
|---|
| 497 |
|
|---|
| 498 | typedef struct
|
|---|
| 499 | {
|
|---|
| 500 | int part;
|
|---|
| 501 | hypre_Index index;
|
|---|
| 502 | int var;
|
|---|
| 503 | int box; /* local box number */
|
|---|
| 504 | int nUentries;
|
|---|
| 505 | hypre_SStructUEntry *Uentries;
|
|---|
| 506 |
|
|---|
| 507 | } hypre_SStructUVEntry;
|
|---|
| 508 |
|
|---|
| 509 | typedef struct hypre_SStructGraph_struct
|
|---|
| 510 | {
|
|---|
| 511 | MPI_Comm comm;
|
|---|
| 512 | int ndim;
|
|---|
| 513 | hypre_SStructGrid *grid;
|
|---|
| 514 | int nparts;
|
|---|
| 515 | hypre_SStructPGrid **pgrids;
|
|---|
| 516 | hypre_SStructStencil ***stencils; /* each (part, var) has a stencil */
|
|---|
| 517 |
|
|---|
| 518 | /* U-graph info: Entries are referenced via local grid-variable rank. */
|
|---|
| 519 | int nUventries; /* number of iUventries */
|
|---|
| 520 | int aUventries; /* alloc size of iUventries */
|
|---|
| 521 | int *iUventries;
|
|---|
| 522 |
|
|---|
| 523 |
|
|---|
| 524 | hypre_SStructUVEntry **Uventries;
|
|---|
| 525 | int totUentries;
|
|---|
| 526 |
|
|---|
| 527 | int ref_count;
|
|---|
| 528 |
|
|---|
| 529 | int type; /* GEC0203 */
|
|---|
| 530 | } hypre_SStructGraph;
|
|---|
| 531 |
|
|---|
| 532 | /*--------------------------------------------------------------------------
|
|---|
| 533 | * Accessor macros: hypre_SStructGraph
|
|---|
| 534 | *--------------------------------------------------------------------------*/
|
|---|
| 535 |
|
|---|
| 536 | #define hypre_SStructGraphComm(graph) ((graph) -> comm)
|
|---|
| 537 | #define hypre_SStructGraphNDim(graph) ((graph) -> ndim)
|
|---|
| 538 | #define hypre_SStructGraphGrid(graph) ((graph) -> grid)
|
|---|
| 539 | #define hypre_SStructGraphNParts(graph) ((graph) -> nparts)
|
|---|
| 540 | #define hypre_SStructGraphPGrids(graph) ((graph) -> pgrids)
|
|---|
| 541 | #define hypre_SStructGraphPGrid(graph, p) ((graph) -> pgrids[p])
|
|---|
| 542 | #define hypre_SStructGraphStencils(graph) ((graph) -> stencils)
|
|---|
| 543 | #define hypre_SStructGraphStencil(graph, p, v) ((graph) -> stencils[p][v])
|
|---|
| 544 | #define hypre_SStructGraphNUVEntries(graph) ((graph) -> nUventries)
|
|---|
| 545 | #define hypre_SStructGraphAUVEntries(graph) ((graph) -> aUventries)
|
|---|
| 546 | #define hypre_SStructGraphIUVEntries(graph) ((graph) -> iUventries)
|
|---|
| 547 | #define hypre_SStructGraphIUVEntry(graph, i) ((graph) -> iUventries[i])
|
|---|
| 548 | #define hypre_SStructGraphUVEntries(graph) ((graph) -> Uventries)
|
|---|
| 549 | #define hypre_SStructGraphUVEntry(graph, i) ((graph) -> Uventries[i])
|
|---|
| 550 | #define hypre_SStructGraphTotUEntries(graph) ((graph) -> totUentries)
|
|---|
| 551 | #define hypre_SStructGraphRefCount(graph) ((graph) -> ref_count)
|
|---|
| 552 | #define hypre_SStructGraphObjectType(graph) ((graph) -> type)
|
|---|
| 553 |
|
|---|
| 554 | /*--------------------------------------------------------------------------
|
|---|
| 555 | * Accessor macros: hypre_SStructUVEntry
|
|---|
| 556 | *--------------------------------------------------------------------------*/
|
|---|
| 557 |
|
|---|
| 558 | #define hypre_SStructUVEntryPart(Uv) ((Uv) -> part)
|
|---|
| 559 | #define hypre_SStructUVEntryIndex(Uv) ((Uv) -> index)
|
|---|
| 560 | #define hypre_SStructUVEntryVar(Uv) ((Uv) -> var)
|
|---|
| 561 | #define hypre_SStructUVEntryBox(Uv) ((Uv) -> box)
|
|---|
| 562 | #define hypre_SStructUVEntryNUEntries(Uv) ((Uv) -> nUentries)
|
|---|
| 563 | #define hypre_SStructUVEntryUEntries(Uv) ((Uv) -> Uentries)
|
|---|
| 564 | #define hypre_SStructUVEntryUEntry(Uv, i) &((Uv) -> Uentries[i])
|
|---|
| 565 | #define hypre_SStructUVEntryToPart(Uv, i) ((Uv) -> Uentries[i].to_part)
|
|---|
| 566 | #define hypre_SStructUVEntryToIndex(Uv, i) ((Uv) -> Uentries[i].to_index)
|
|---|
| 567 | #define hypre_SStructUVEntryToVar(Uv, i) ((Uv) -> Uentries[i].to_var)
|
|---|
| 568 | #define hypre_SStructUVEntryToBox(Uv, i) ((Uv) -> Uentries[i].to_box)
|
|---|
| 569 | #define hypre_SStructUVEntryToProc(Uv, i) ((Uv) -> Uentries[i].to_proc)
|
|---|
| 570 | #define hypre_SStructUVEntryRank(Uv, i) ((Uv) -> Uentries[i].rank)
|
|---|
| 571 | /*--------------------------------------------------------------------------
|
|---|
| 572 | * Accessor macros: hypre_SStructUEntry
|
|---|
| 573 | *--------------------------------------------------------------------------*/
|
|---|
| 574 |
|
|---|
| 575 | #define hypre_SStructUEntryToPart(U) ((U) -> to_part)
|
|---|
| 576 | #define hypre_SStructUEntryToIndex(U) ((U) -> to_index)
|
|---|
| 577 | #define hypre_SStructUEntryToVar(U) ((U) -> to_var)
|
|---|
| 578 | #define hypre_SStructUEntryToBox(U) ((U) -> to_box)
|
|---|
| 579 | #define hypre_SStructUEntryToProc(U) ((U) -> to_proc)
|
|---|
| 580 | #define hypre_SStructUEntryRank(U) ((U) -> rank)
|
|---|
| 581 |
|
|---|
| 582 | #endif
|
|---|
| 583 |
|
|---|
| 584 |
|
|---|
| 585 |
|
|---|
| 586 |
|
|---|
| 587 |
|
|---|
| 588 | /******************************************************************************
|
|---|
| 589 | *
|
|---|
| 590 | * Header info for the hypre_SStructMatrix structures
|
|---|
| 591 | *
|
|---|
| 592 | *****************************************************************************/
|
|---|
| 593 |
|
|---|
| 594 | #ifndef hypre_SSTRUCT_MATRIX_HEADER
|
|---|
| 595 | #define hypre_SSTRUCT_MATRIX_HEADER
|
|---|
| 596 |
|
|---|
| 597 | /*--------------------------------------------------------------------------
|
|---|
| 598 | * hypre_SStructMatrix:
|
|---|
| 599 | *--------------------------------------------------------------------------*/
|
|---|
| 600 |
|
|---|
| 601 | typedef struct
|
|---|
| 602 | {
|
|---|
| 603 | MPI_Comm comm;
|
|---|
| 604 | hypre_SStructPGrid *pgrid;
|
|---|
| 605 | hypre_SStructStencil **stencils; /* nvar array of stencils */
|
|---|
| 606 |
|
|---|
| 607 | int nvars;
|
|---|
| 608 | int **smaps;
|
|---|
| 609 | hypre_StructStencil ***sstencils; /* nvar x nvar array of sstencils */
|
|---|
| 610 | hypre_StructMatrix ***smatrices; /* nvar x nvar array of smatrices */
|
|---|
| 611 | int **symmetric; /* Stencil entries symmetric?
|
|---|
| 612 | * (nvar x nvar array) */
|
|---|
| 613 |
|
|---|
| 614 | /* temporary storage for SetValues routines */
|
|---|
| 615 | int sentries_size;
|
|---|
| 616 | int *sentries;
|
|---|
| 617 |
|
|---|
| 618 | int complex; /* Matrix complex? */
|
|---|
| 619 |
|
|---|
| 620 | int ref_count;
|
|---|
| 621 |
|
|---|
| 622 | } hypre_SStructPMatrix;
|
|---|
| 623 |
|
|---|
| 624 | typedef struct hypre_SStructMatrix_struct
|
|---|
| 625 | {
|
|---|
| 626 | MPI_Comm comm;
|
|---|
| 627 | int ndim;
|
|---|
| 628 | hypre_SStructGraph *graph;
|
|---|
| 629 | int ***splits; /* S/U-matrix split for each stencil */
|
|---|
| 630 |
|
|---|
| 631 | /* S-matrix info */
|
|---|
| 632 | int nparts;
|
|---|
| 633 | hypre_SStructPMatrix **pmatrices;
|
|---|
| 634 | int ***symmetric; /* Stencil entries symmetric?
|
|---|
| 635 | * (nparts x nvar x nvar array) */
|
|---|
| 636 |
|
|---|
| 637 | /* U-matrix info */
|
|---|
| 638 | HYPRE_IJMatrix ijmatrix;
|
|---|
| 639 | hypre_ParCSRMatrix *parcsrmatrix;
|
|---|
| 640 |
|
|---|
| 641 | /* temporary storage for SetValues routines */
|
|---|
| 642 | int entries_size;
|
|---|
| 643 | int *Sentries;
|
|---|
| 644 | int *Uentries;
|
|---|
| 645 | HYPRE_BigInt *tmp_col_coords;
|
|---|
| 646 | double *tmp_coeffs;
|
|---|
| 647 |
|
|---|
| 648 | int ns_symmetric; /* Non-stencil entries symmetric? */
|
|---|
| 649 | int complex; /* Matrix complex? */
|
|---|
| 650 | HYPRE_BigInt global_size; /* Total number of nonzero coeffs */
|
|---|
| 651 |
|
|---|
| 652 | int ref_count;
|
|---|
| 653 |
|
|---|
| 654 | /* GEC0902 adding an object type to the matrix */
|
|---|
| 655 | int object_type;
|
|---|
| 656 |
|
|---|
| 657 | } hypre_SStructMatrix;
|
|---|
| 658 |
|
|---|
| 659 | /*--------------------------------------------------------------------------
|
|---|
| 660 | * Accessor macros: hypre_SStructMatrix
|
|---|
| 661 | *--------------------------------------------------------------------------*/
|
|---|
| 662 |
|
|---|
| 663 | #define hypre_SStructMatrixComm(mat) ((mat) -> comm)
|
|---|
| 664 | #define hypre_SStructMatrixNDim(mat) ((mat) -> ndim)
|
|---|
| 665 | #define hypre_SStructMatrixGraph(mat) ((mat) -> graph)
|
|---|
| 666 | #define hypre_SStructMatrixSplits(mat) ((mat) -> splits)
|
|---|
| 667 | #define hypre_SStructMatrixSplit(mat, p, v) ((mat) -> splits[p][v])
|
|---|
| 668 | #define hypre_SStructMatrixNParts(mat) ((mat) -> nparts)
|
|---|
| 669 | #define hypre_SStructMatrixPMatrices(mat) ((mat) -> pmatrices)
|
|---|
| 670 | #define hypre_SStructMatrixPMatrix(mat, part) ((mat) -> pmatrices[part])
|
|---|
| 671 | #define hypre_SStructMatrixSymmetric(mat) ((mat) -> symmetric)
|
|---|
| 672 | #define hypre_SStructMatrixIJMatrix(mat) ((mat) -> ijmatrix)
|
|---|
| 673 | #define hypre_SStructMatrixParCSRMatrix(mat) ((mat) -> parcsrmatrix)
|
|---|
| 674 | #define hypre_SStructMatrixEntriesSize(mat) ((mat) -> entries_size)
|
|---|
| 675 | #define hypre_SStructMatrixSEntries(mat) ((mat) -> Sentries)
|
|---|
| 676 | #define hypre_SStructMatrixUEntries(mat) ((mat) -> Uentries)
|
|---|
| 677 | #define hypre_SStructMatrixTmpColCoords(mat) ((mat) -> tmp_col_coords)
|
|---|
| 678 | #define hypre_SStructMatrixTmpCoeffs(mat) ((mat) -> tmp_coeffs)
|
|---|
| 679 | #define hypre_SStructMatrixNSSymmetric(mat) ((mat) -> ns_symmetric)
|
|---|
| 680 | #define hypre_SStructMatrixComplex(mat) ((mat) -> complex)
|
|---|
| 681 | #define hypre_SStructMatrixGlobalSize(mat) ((mat) -> global_size)
|
|---|
| 682 | #define hypre_SStructMatrixRefCount(mat) ((mat) -> ref_count)
|
|---|
| 683 | #define hypre_SStructMatrixObjectType(mat) ((mat) -> object_type)
|
|---|
| 684 |
|
|---|
| 685 | /*--------------------------------------------------------------------------
|
|---|
| 686 | * Accessor macros: hypre_SStructPMatrix
|
|---|
| 687 | *--------------------------------------------------------------------------*/
|
|---|
| 688 |
|
|---|
| 689 | #define hypre_SStructPMatrixComm(pmat) ((pmat) -> comm)
|
|---|
| 690 | #define hypre_SStructPMatrixPGrid(pmat) ((pmat) -> pgrid)
|
|---|
| 691 | #define hypre_SStructPMatrixStencils(pmat) ((pmat) -> stencils)
|
|---|
| 692 | #define hypre_SStructPMatrixNVars(pmat) ((pmat) -> nvars)
|
|---|
| 693 | #define hypre_SStructPMatrixStencil(pmat, var) ((pmat) -> stencils[var])
|
|---|
| 694 | #define hypre_SStructPMatrixSMaps(pmat) ((pmat) -> smaps)
|
|---|
| 695 | #define hypre_SStructPMatrixSMap(pmat, var) ((pmat) -> smaps[var])
|
|---|
| 696 | #define hypre_SStructPMatrixSStencils(pmat) ((pmat) -> sstencils)
|
|---|
| 697 | #define hypre_SStructPMatrixSStencil(pmat, vi, vj) \
|
|---|
| 698 | ((pmat) -> sstencils[vi][vj])
|
|---|
| 699 | #define hypre_SStructPMatrixSMatrices(pmat) ((pmat) -> smatrices)
|
|---|
| 700 | #define hypre_SStructPMatrixSMatrix(pmat, vi, vj) \
|
|---|
| 701 | ((pmat) -> smatrices[vi][vj])
|
|---|
| 702 | #define hypre_SStructPMatrixSymmetric(pmat) ((pmat) -> symmetric)
|
|---|
| 703 | #define hypre_SStructPMatrixSEntriesSize(pmat) ((pmat) -> sentries_size)
|
|---|
| 704 | #define hypre_SStructPMatrixSEntries(pmat) ((pmat) -> sentries)
|
|---|
| 705 | #define hypre_SStructPMatrixComplex(pmat) ((pmat) -> complex)
|
|---|
| 706 | #define hypre_SStructPMatrixRefCount(pmat) ((pmat) -> ref_count)
|
|---|
| 707 |
|
|---|
| 708 | #endif
|
|---|
| 709 |
|
|---|
| 710 |
|
|---|
| 711 |
|
|---|
| 712 | /******************************************************************************
|
|---|
| 713 | *
|
|---|
| 714 | * Header info for the hypre_SStructVector structures
|
|---|
| 715 | *
|
|---|
| 716 | *****************************************************************************/
|
|---|
| 717 |
|
|---|
| 718 | #ifndef hypre_SSTRUCT_VECTOR_HEADER
|
|---|
| 719 | #define hypre_SSTRUCT_VECTOR_HEADER
|
|---|
| 720 |
|
|---|
| 721 | /*--------------------------------------------------------------------------
|
|---|
| 722 | * hypre_SStructVector:
|
|---|
| 723 | *--------------------------------------------------------------------------*/
|
|---|
| 724 |
|
|---|
| 725 | typedef struct
|
|---|
| 726 | {
|
|---|
| 727 | MPI_Comm comm;
|
|---|
| 728 | hypre_SStructPGrid *pgrid;
|
|---|
| 729 |
|
|---|
| 730 | int nvars;
|
|---|
| 731 | hypre_StructVector **svectors; /* nvar array of svectors */
|
|---|
| 732 | hypre_CommPkg **comm_pkgs; /* nvar array of comm pkgs */
|
|---|
| 733 |
|
|---|
| 734 | int complex; /* Is the vector complex */
|
|---|
| 735 |
|
|---|
| 736 | int ref_count;
|
|---|
| 737 |
|
|---|
| 738 | int *dataindices; /* GEC1002 array for starting index of the
|
|---|
| 739 | svector. pdataindices[varx] */
|
|---|
| 740 | int datasize; /* Size of the pvector = sums size of svectors */
|
|---|
| 741 |
|
|---|
| 742 | } hypre_SStructPVector;
|
|---|
| 743 |
|
|---|
| 744 | typedef struct hypre_SStructVector_struct
|
|---|
| 745 | {
|
|---|
| 746 | MPI_Comm comm;
|
|---|
| 747 | int ndim;
|
|---|
| 748 | hypre_SStructGrid *grid;
|
|---|
| 749 | int object_type;
|
|---|
| 750 |
|
|---|
| 751 | /* s-vector info */
|
|---|
| 752 | int nparts;
|
|---|
| 753 | hypre_SStructPVector **pvectors;
|
|---|
| 754 | hypre_CommPkg ***comm_pkgs; /* nvar array of comm pkgs */
|
|---|
| 755 |
|
|---|
| 756 | /* u-vector info */
|
|---|
| 757 | HYPRE_IJVector ijvector;
|
|---|
| 758 | hypre_ParVector *parvector;
|
|---|
| 759 |
|
|---|
| 760 | /* GEC10020902 pointer to big chunk of memory and auxiliary information */
|
|---|
| 761 |
|
|---|
| 762 | double *data; /* GEC1002 pointer to chunk data */
|
|---|
| 763 | int *dataindices; /* GEC1002 dataindices[partx] is the starting index
|
|---|
| 764 | of vector data for the part=partx */
|
|---|
| 765 | int datasize ; /* GEC1002 size of all data = ghlocalsize */
|
|---|
| 766 |
|
|---|
| 767 | int complex; /* Is the vector complex */
|
|---|
| 768 | HYPRE_BigInt global_size; /* Total number coefficients */
|
|---|
| 769 |
|
|---|
| 770 | int ref_count;
|
|---|
| 771 |
|
|---|
| 772 | } hypre_SStructVector;
|
|---|
| 773 |
|
|---|
| 774 | /*--------------------------------------------------------------------------
|
|---|
| 775 | * Accessor macros: hypre_SStructVector
|
|---|
| 776 | *--------------------------------------------------------------------------*/
|
|---|
| 777 |
|
|---|
| 778 | #define hypre_SStructVectorComm(vec) ((vec) -> comm)
|
|---|
| 779 | #define hypre_SStructVectorNDim(vec) ((vec) -> ndim)
|
|---|
| 780 | #define hypre_SStructVectorGrid(vec) ((vec) -> grid)
|
|---|
| 781 | #define hypre_SStructVectorObjectType(vec) ((vec) -> object_type)
|
|---|
| 782 | #define hypre_SStructVectorNParts(vec) ((vec) -> nparts)
|
|---|
| 783 | #define hypre_SStructVectorPVectors(vec) ((vec) -> pvectors)
|
|---|
| 784 | #define hypre_SStructVectorPVector(vec, part) ((vec) -> pvectors[part])
|
|---|
| 785 | #define hypre_SStructVectorIJVector(vec) ((vec) -> ijvector)
|
|---|
| 786 | #define hypre_SStructVectorParVector(vec) ((vec) -> parvector)
|
|---|
| 787 | #define hypre_SStructVectorComplex(vec) ((vec) -> complex)
|
|---|
| 788 | #define hypre_SStructVectorGlobalSize(vec) ((vec) -> global_size)
|
|---|
| 789 | #define hypre_SStructVectorRefCount(vec) ((vec) -> ref_count)
|
|---|
| 790 | #define hypre_SStructVectorData(vec) ((vec) -> data )
|
|---|
| 791 | #define hypre_SStructVectorDataIndices(vec) ((vec) -> dataindices)
|
|---|
| 792 | #define hypre_SStructVectorDataSize(vec) ((vec) -> datasize)
|
|---|
| 793 |
|
|---|
| 794 |
|
|---|
| 795 | /*--------------------------------------------------------------------------
|
|---|
| 796 | * Accessor macros: hypre_SStructPVector
|
|---|
| 797 | *--------------------------------------------------------------------------*/
|
|---|
| 798 |
|
|---|
| 799 | #define hypre_SStructPVectorComm(pvec) ((pvec) -> comm)
|
|---|
| 800 | #define hypre_SStructPVectorPGrid(pvec) ((pvec) -> pgrid)
|
|---|
| 801 | #define hypre_SStructPVectorNVars(pvec) ((pvec) -> nvars)
|
|---|
| 802 | #define hypre_SStructPVectorSVectors(pvec) ((pvec) -> svectors)
|
|---|
| 803 | #define hypre_SStructPVectorSVector(pvec, v) ((pvec) -> svectors[v])
|
|---|
| 804 | #define hypre_SStructPVectorCommPkgs(pvec) ((pvec) -> comm_pkgs)
|
|---|
| 805 | #define hypre_SStructPVectorCommPkg(pvec, v) ((pvec) -> comm_pkgs[v])
|
|---|
| 806 | #define hypre_SStructPVectorComplex(pvec) ((pvec) -> complex)
|
|---|
| 807 | #define hypre_SStructPVectorRefCount(pvec) ((pvec) -> ref_count)
|
|---|
| 808 | #define hypre_SStructPVectorDataIndices(pvec) ((pvec) -> dataindices )
|
|---|
| 809 | #define hypre_SStructPVectorDataSize(pvec) ((pvec) -> datasize )
|
|---|
| 810 |
|
|---|
| 811 | #endif
|
|---|
| 812 |
|
|---|
| 813 | /* box_map.c */
|
|---|
| 814 | int hypre_BoxMapEntrySetInfo ( hypre_BoxMapEntry *entry , void *info );
|
|---|
| 815 | int hypre_BoxMapEntryGetInfo ( hypre_BoxMapEntry *entry , void **info_ptr );
|
|---|
| 816 | int hypre_BoxMapEntryGetExtents ( hypre_BoxMapEntry *entry , hypre_Index imin , hypre_Index imax );
|
|---|
| 817 | int hypre_BoxMapCreate ( int max_nentries , hypre_Index global_imin , hypre_Index global_imax , int nprocs , hypre_BoxMap **map_ptr );
|
|---|
| 818 | int hypre_BoxMapIncSize ( hypre_BoxMap *map , int inc_nentries );
|
|---|
| 819 | int hypre_BoxMapAddEntry ( hypre_BoxMap *map , hypre_Index imin , hypre_Index imax , void *info );
|
|---|
| 820 | int hypre_BoxMapAssemble ( hypre_BoxMap *map , MPI_Comm comm );
|
|---|
| 821 | int hypre_BoxMapDestroy ( hypre_BoxMap *map );
|
|---|
| 822 | int hypre_BoxMapFindEntry ( hypre_BoxMap *map , hypre_Index index , hypre_BoxMapEntry **entry_ptr );
|
|---|
| 823 | int hypre_BoxMapFindBoxProcEntry ( hypre_BoxMap *map , int box , int proc , hypre_BoxMapEntry **entry_ptr );
|
|---|
| 824 | int hypre_BoxMapIntersect ( hypre_BoxMap *map , hypre_Index ilower , hypre_Index iupper , hypre_BoxMapEntry ***entries_ptr , int *nentries_ptr );
|
|---|
| 825 | int hypre_BoxMapSetNumGhost ( hypre_BoxMap *map , int *num_ghost );
|
|---|
| 826 |
|
|---|
| 827 | /* HYPRE_sstruct_graph.c */
|
|---|
| 828 | int HYPRE_SStructGraphCreate ( MPI_Comm comm , HYPRE_SStructGrid grid , HYPRE_SStructGraph *graph_ptr );
|
|---|
| 829 | int HYPRE_SStructGraphDestroy ( HYPRE_SStructGraph graph );
|
|---|
| 830 | int HYPRE_SStructGraphSetStencil ( HYPRE_SStructGraph graph , int part , int var , HYPRE_SStructStencil stencil );
|
|---|
| 831 | int HYPRE_SStructGraphAddEntries ( HYPRE_SStructGraph graph , int part , int *index , int var , int to_part , int *to_index , int to_var );
|
|---|
| 832 | int HYPRE_SStructGraphAssemble ( HYPRE_SStructGraph graph );
|
|---|
| 833 | int HYPRE_SStructGraphSetObjectType ( HYPRE_SStructGraph graph , int type );
|
|---|
| 834 |
|
|---|
| 835 | /* HYPRE_sstruct_grid.c */
|
|---|
| 836 | int HYPRE_SStructGridCreate ( MPI_Comm comm , int ndim , int nparts , HYPRE_SStructGrid *grid_ptr );
|
|---|
| 837 | int HYPRE_SStructGridDestroy ( HYPRE_SStructGrid grid );
|
|---|
| 838 | int HYPRE_SStructGridSetExtents ( HYPRE_SStructGrid grid , int part , int *ilower , int *iupper );
|
|---|
| 839 | int HYPRE_SStructGridSetVariables ( HYPRE_SStructGrid grid , int part , int nvars , HYPRE_SStructVariable *vartypes );
|
|---|
| 840 | int HYPRE_SStructGridSetVariable ( HYPRE_SStructGrid grid , int part , int var , int nvars , HYPRE_SStructVariable vartype );
|
|---|
| 841 | int HYPRE_SStructGridAddVariables ( HYPRE_SStructGrid grid , int part , int *index , int nvars , HYPRE_SStructVariable *vartypes );
|
|---|
| 842 | int HYPRE_SStructGridAddVariable ( HYPRE_SStructGrid grid , int part , int *index , int var , HYPRE_SStructVariable vartype );
|
|---|
| 843 | int HYPRE_SStructGridSetNeighborBox ( HYPRE_SStructGrid grid , int part , int *ilower , int *iupper , int nbor_part , int *nbor_ilower , int *nbor_iupper , int *index_map );
|
|---|
| 844 | int HYPRE_SStructGridSetNeighborBoxZ ( HYPRE_SStructGrid grid , int part , int *ilower , int *iupper , int nbor_part , int *nbor_ilower , int *nbor_iupper , int *index_map , int primary );
|
|---|
| 845 | int HYPRE_SStructGridAddUnstructuredPart ( HYPRE_SStructGrid grid , int ilower , int iupper );
|
|---|
| 846 | int HYPRE_SStructGridAssemble ( HYPRE_SStructGrid grid );
|
|---|
| 847 | int HYPRE_SStructGridSetPeriodic ( HYPRE_SStructGrid grid , int part , int *periodic );
|
|---|
| 848 | int HYPRE_SStructGridSetNumGhost ( HYPRE_SStructGrid grid , int *num_ghost );
|
|---|
| 849 |
|
|---|
| 850 | /* HYPRE_sstruct_matrix.c */
|
|---|
| 851 | int HYPRE_SStructMatrixCreate ( MPI_Comm comm , HYPRE_SStructGraph graph , HYPRE_SStructMatrix *matrix_ptr );
|
|---|
| 852 | int HYPRE_SStructMatrixDestroy ( HYPRE_SStructMatrix matrix );
|
|---|
| 853 | int HYPRE_SStructMatrixInitialize ( HYPRE_SStructMatrix matrix );
|
|---|
| 854 | int HYPRE_SStructMatrixSetValues ( HYPRE_SStructMatrix matrix , int part , int *index , int var , int nentries , int *entries , double *values );
|
|---|
| 855 | int HYPRE_SStructMatrixSetBoxValues ( HYPRE_SStructMatrix matrix , int part , int *ilower , int *iupper , int var , int nentries , int *entries , double *values );
|
|---|
| 856 | int HYPRE_SStructMatrixGetValues ( HYPRE_SStructMatrix matrix , int part , int *index , int var , int nentries , int *entries , double *values );
|
|---|
| 857 | int HYPRE_SStructMatrixGetBoxValues ( HYPRE_SStructMatrix matrix , int part , int *ilower , int *iupper , int var , int nentries , int *entries , double *values );
|
|---|
| 858 | int HYPRE_SStructMatrixAddToValues ( HYPRE_SStructMatrix matrix , int part , int *index , int var , int nentries , int *entries , double *values );
|
|---|
| 859 | int HYPRE_SStructMatrixAddToBoxValues ( HYPRE_SStructMatrix matrix , int part , int *ilower , int *iupper , int var , int nentries , int *entries , double *values );
|
|---|
| 860 | int HYPRE_SStructMatrixAssemble ( HYPRE_SStructMatrix matrix );
|
|---|
| 861 | int HYPRE_SStructMatrixSetSymmetric ( HYPRE_SStructMatrix matrix , int part , int var , int to_var , int symmetric );
|
|---|
| 862 | int HYPRE_SStructMatrixSetNSSymmetric ( HYPRE_SStructMatrix matrix , int symmetric );
|
|---|
| 863 | int HYPRE_SStructMatrixSetObjectType ( HYPRE_SStructMatrix matrix , int type );
|
|---|
| 864 | int HYPRE_SStructMatrixGetObject ( HYPRE_SStructMatrix matrix , void **object );
|
|---|
| 865 | int HYPRE_SStructMatrixGetObject2 ( HYPRE_SStructMatrix matrix , void **object );
|
|---|
| 866 | int HYPRE_SStructMatrixPrint ( const char *filename , HYPRE_SStructMatrix matrix , int all );
|
|---|
| 867 | int HYPRE_SStructMatrixMatvec ( double alpha , HYPRE_SStructMatrix A , HYPRE_SStructVector x , double beta , HYPRE_SStructVector y );
|
|---|
| 868 |
|
|---|
| 869 | /* HYPRE_sstruct_stencil.c */
|
|---|
| 870 | int HYPRE_SStructStencilCreate ( int ndim , int size , HYPRE_SStructStencil *stencil_ptr );
|
|---|
| 871 | int HYPRE_SStructStencilDestroy ( HYPRE_SStructStencil stencil );
|
|---|
| 872 | int HYPRE_SStructStencilSetEntry ( HYPRE_SStructStencil stencil , int entry , int *offset , int var );
|
|---|
| 873 |
|
|---|
| 874 | /* HYPRE_sstruct_vector.c */
|
|---|
| 875 | int HYPRE_SStructVectorCreate ( MPI_Comm comm , HYPRE_SStructGrid grid , HYPRE_SStructVector *vector_ptr );
|
|---|
| 876 | int HYPRE_SStructVectorDestroy ( HYPRE_SStructVector vector );
|
|---|
| 877 | int HYPRE_SStructVectorInitialize ( HYPRE_SStructVector vector );
|
|---|
| 878 | int HYPRE_SStructVectorSetValues ( HYPRE_SStructVector vector , int part , int *index , int var , double *value );
|
|---|
| 879 | int HYPRE_SStructVectorSetBoxValues ( HYPRE_SStructVector vector , int part , int *ilower , int *iupper , int var , double *values );
|
|---|
| 880 | int HYPRE_SStructVectorAddToValues ( HYPRE_SStructVector vector , int part , int *index , int var , double *value );
|
|---|
| 881 | int HYPRE_SStructVectorAddToBoxValues ( HYPRE_SStructVector vector , int part , int *ilower , int *iupper , int var , double *values );
|
|---|
| 882 | int HYPRE_SStructVectorAssemble ( HYPRE_SStructVector vector );
|
|---|
| 883 | int HYPRE_SStructVectorGather ( HYPRE_SStructVector vector );
|
|---|
| 884 | int HYPRE_SStructVectorGetValues ( HYPRE_SStructVector vector , int part , int *index , int var , double *value );
|
|---|
| 885 | int HYPRE_SStructVectorGetBoxValues ( HYPRE_SStructVector vector , int part , int *ilower , int *iupper , int var , double *values );
|
|---|
| 886 | int HYPRE_SStructVectorSetConstantValues ( HYPRE_SStructVector vector , double value );
|
|---|
| 887 | int HYPRE_SStructVectorSetObjectType ( HYPRE_SStructVector vector , int type );
|
|---|
| 888 | int HYPRE_SStructVectorGetObject ( HYPRE_SStructVector vector , void **object );
|
|---|
| 889 | int HYPRE_SStructVectorPrint ( const char *filename , HYPRE_SStructVector vector , int all );
|
|---|
| 890 | int HYPRE_SStructVectorClearGhostValues ( HYPRE_SStructVector x );
|
|---|
| 891 | int HYPRE_SStructVectorCopy ( HYPRE_SStructVector x , HYPRE_SStructVector y );
|
|---|
| 892 | int HYPRE_SStructVectorScale ( double alpha , HYPRE_SStructVector y );
|
|---|
| 893 | int HYPRE_SStructInnerProd ( HYPRE_SStructVector x , HYPRE_SStructVector y , double *result );
|
|---|
| 894 | int HYPRE_SStructAxpy ( double alpha , HYPRE_SStructVector x , HYPRE_SStructVector y );
|
|---|
| 895 |
|
|---|
| 896 | /* sstruct_axpy.c */
|
|---|
| 897 | int hypre_SStructPAxpy ( double alpha , hypre_SStructPVector *px , hypre_SStructPVector *py );
|
|---|
| 898 | int hypre_SStructAxpy ( double alpha , hypre_SStructVector *x , hypre_SStructVector *y );
|
|---|
| 899 |
|
|---|
| 900 | /* sstruct_copy.c */
|
|---|
| 901 | int hypre_SStructPCopy ( hypre_SStructPVector *px , hypre_SStructPVector *py );
|
|---|
| 902 | int hypre_SStructPartialPCopy ( hypre_SStructPVector *px , hypre_SStructPVector *py , hypre_BoxArrayArray **array_boxes );
|
|---|
| 903 | int hypre_SStructCopy ( hypre_SStructVector *x , hypre_SStructVector *y );
|
|---|
| 904 |
|
|---|
| 905 | /* sstruct_graph.c */
|
|---|
| 906 | int hypre_SStructGraphRef ( hypre_SStructGraph *graph , hypre_SStructGraph **graph_ref );
|
|---|
| 907 | int hypre_SStructGraphFindUVEntry ( hypre_SStructGraph *graph , int part , hypre_Index index , int var , hypre_SStructUVEntry **Uventry_ptr );
|
|---|
| 908 | int hypre_SStructGraphFindBoxEndpt ( hypre_SStructGraph *graph , int part , int var , int proc , int endpt , int boxi );
|
|---|
| 909 | int hypre_SStructGraphFindSGridEndpts ( hypre_SStructGraph *graph , int part , int var , int proc , int endpt , int *endpts );
|
|---|
| 910 |
|
|---|
| 911 | /* sstruct_grid.c */
|
|---|
| 912 | int hypre_SStructVariableGetOffset ( HYPRE_SStructVariable vartype , int ndim , hypre_Index varoffset );
|
|---|
| 913 | int hypre_SStructPGridCreate ( MPI_Comm comm , int ndim , hypre_SStructPGrid **pgrid_ptr );
|
|---|
| 914 | int hypre_SStructPGridDestroy ( hypre_SStructPGrid *pgrid );
|
|---|
| 915 | int hypre_SStructPGridSetExtents ( hypre_SStructPGrid *pgrid , hypre_Index ilower , hypre_Index iupper );
|
|---|
| 916 | int hypre_SStructPGridSetCellSGrid ( hypre_SStructPGrid *pgrid , hypre_StructGrid *cell_sgrid );
|
|---|
| 917 | int hypre_SStructPGridSetVariables ( hypre_SStructPGrid *pgrid , int nvars , HYPRE_SStructVariable *vartypes );
|
|---|
| 918 | int hypre_SStructPGridSetVariable ( hypre_SStructPGrid *pgrid , int var , int nvars , HYPRE_SStructVariable vartype );
|
|---|
| 919 | int hypre_SStructPGridSetPNeighbor ( hypre_SStructPGrid *pgrid , hypre_Box *pneighbor_box );
|
|---|
| 920 | int hypre_SStructPGridAssemble ( hypre_SStructPGrid *pgrid );
|
|---|
| 921 | int hypre_SStructGridRef ( hypre_SStructGrid *grid , hypre_SStructGrid **grid_ref );
|
|---|
| 922 | int hypre_SStructGridAssembleMaps ( hypre_SStructGrid *grid );
|
|---|
| 923 | int hypre_SStructGridAssembleNBorMaps ( hypre_SStructGrid *grid );
|
|---|
| 924 | int hypre_SStructGridFindMapEntry ( hypre_SStructGrid *grid , int part , hypre_Index index , int var , hypre_BoxMapEntry **entry_ptr );
|
|---|
| 925 | int hypre_SStructGridBoxProcFindMapEntry ( hypre_SStructGrid *grid , int part , int var , int box , int proc , hypre_BoxMapEntry **entry_ptr );
|
|---|
| 926 | int hypre_SStructMapEntryGetCSRstrides ( hypre_BoxMapEntry *entry , hypre_Index strides );
|
|---|
| 927 | int hypre_SStructMapEntryGetGhstrides ( hypre_BoxMapEntry *entry , hypre_Index strides );
|
|---|
| 928 | int hypre_SStructMapEntryGetGlobalCSRank ( hypre_BoxMapEntry *entry , hypre_Index index , HYPRE_BigInt *rank_ptr );
|
|---|
| 929 | int hypre_SStructMapEntryGetGlobalGhrank ( hypre_BoxMapEntry *entry , hypre_Index index , HYPRE_BigInt *rank_ptr );
|
|---|
| 930 | int hypre_SStructMapEntryGetProcess ( hypre_BoxMapEntry *entry , int *proc_ptr );
|
|---|
| 931 | int hypre_SStructMapEntryGetBox ( hypre_BoxMapEntry *entry , int *box_ptr );
|
|---|
| 932 | int hypre_SStructBoxToNBorBox ( hypre_Box *box , hypre_Index index , hypre_Index nbor_index , hypre_Index coord , hypre_Index dir );
|
|---|
| 933 | int hypre_SStructNBorBoxToBox ( hypre_Box *nbor_box , hypre_Index index , hypre_Index nbor_index , hypre_Index coord , hypre_Index dir );
|
|---|
| 934 | int hypre_SStructGridSetNumGhost ( hypre_SStructGrid *grid , int *num_ghost );
|
|---|
| 935 | int hypre_SStructMapEntryGetGlobalRank ( hypre_BoxMapEntry *entry , hypre_Index index , HYPRE_BigInt *rank_ptr , int type );
|
|---|
| 936 | int hypre_SStructMapEntryGetStrides ( hypre_BoxMapEntry *entry , hypre_Index strides , int type );
|
|---|
| 937 | int hypre_SStructBoxNumMap ( hypre_SStructGrid *grid , int part , int boxnum , int **num_varboxes_ptr , int ***map_ptr );
|
|---|
| 938 | int hypre_SStructCellGridBoxNumMap ( hypre_SStructGrid *grid , int part , int ***num_varboxes_ptr , int ****map_ptr );
|
|---|
| 939 |
|
|---|
| 940 | /* sstruct_innerprod.c */
|
|---|
| 941 | int hypre_SStructPInnerProd ( hypre_SStructPVector *px , hypre_SStructPVector *py , double *presult_ptr );
|
|---|
| 942 | int hypre_SStructInnerProd ( hypre_SStructVector *x , hypre_SStructVector *y , double *result_ptr );
|
|---|
| 943 |
|
|---|
| 944 | /* sstruct_matrix.c */
|
|---|
| 945 | int hypre_SStructPMatrixRef ( hypre_SStructPMatrix *matrix , hypre_SStructPMatrix **matrix_ref );
|
|---|
| 946 | int hypre_SStructPMatrixCreate ( MPI_Comm comm , hypre_SStructPGrid *pgrid , hypre_SStructStencil **stencils , hypre_SStructPMatrix **pmatrix_ptr );
|
|---|
| 947 | int hypre_SStructPMatrixDestroy ( hypre_SStructPMatrix *pmatrix );
|
|---|
| 948 | int hypre_SStructPMatrixInitialize ( hypre_SStructPMatrix *pmatrix );
|
|---|
| 949 | int hypre_SStructPMatrixSetValues ( hypre_SStructPMatrix *pmatrix , hypre_Index index , int var , int nentries , int *entries , double *values , int add_to );
|
|---|
| 950 | int hypre_SStructPMatrixSetBoxValues ( hypre_SStructPMatrix *pmatrix , hypre_Index ilower , hypre_Index iupper , int var , int nentries , int *entries , double *values , int add_to );
|
|---|
| 951 | int hypre_SStructPMatrixAssemble ( hypre_SStructPMatrix *pmatrix );
|
|---|
| 952 | int hypre_SStructPMatrixSetSymmetric ( hypre_SStructPMatrix *pmatrix , int var , int to_var , int symmetric );
|
|---|
| 953 | int hypre_SStructPMatrixPrint ( const char *filename , hypre_SStructPMatrix *pmatrix , int all );
|
|---|
| 954 | int hypre_SStructUMatrixInitialize ( hypre_SStructMatrix *matrix );
|
|---|
| 955 | int hypre_SStructUMatrixSetValues ( hypre_SStructMatrix *matrix , int part , hypre_Index index , int var , int nentries , int *entries , double *values , int add_to );
|
|---|
| 956 | int hypre_SStructUMatrixSetBoxValues ( hypre_SStructMatrix *matrix , int part , hypre_Index ilower , hypre_Index iupper , int var , int nentries , int *entries , double *values , int add_to );
|
|---|
| 957 | int hypre_SStructUMatrixAssemble ( hypre_SStructMatrix *matrix );
|
|---|
| 958 | int hypre_SStructMatrixRef ( hypre_SStructMatrix *matrix , hypre_SStructMatrix **matrix_ref );
|
|---|
| 959 | int hypre_SStructMatrixSplitEntries ( hypre_SStructMatrix *matrix , int part , int var , int nentries , int *entries , int *nSentries_ptr , int **Sentries_ptr , int *nUentries_ptr , int **Uentries_ptr );
|
|---|
| 960 |
|
|---|
| 961 | /* sstruct_matvec.c */
|
|---|
| 962 | int hypre_SStructPMatvecCreate ( void **pmatvec_vdata_ptr );
|
|---|
| 963 | int hypre_SStructPMatvecSetup ( void *pmatvec_vdata , hypre_SStructPMatrix *pA , hypre_SStructPVector *px );
|
|---|
| 964 | int hypre_SStructPMatvecCompute ( void *pmatvec_vdata , double alpha , hypre_SStructPMatrix *pA , hypre_SStructPVector *px , double beta , hypre_SStructPVector *py );
|
|---|
| 965 | int hypre_SStructPMatvecDestroy ( void *pmatvec_vdata );
|
|---|
| 966 | int hypre_SStructPMatvec ( double alpha , hypre_SStructPMatrix *pA , hypre_SStructPVector *px , double beta , hypre_SStructPVector *py );
|
|---|
| 967 | int hypre_SStructMatvecCreate ( void **matvec_vdata_ptr );
|
|---|
| 968 | int hypre_SStructMatvecSetup ( void *matvec_vdata , hypre_SStructMatrix *A , hypre_SStructVector *x );
|
|---|
| 969 | int hypre_SStructMatvecCompute ( void *matvec_vdata , double alpha , hypre_SStructMatrix *A , hypre_SStructVector *x , double beta , hypre_SStructVector *y );
|
|---|
| 970 | int hypre_SStructMatvecDestroy ( void *matvec_vdata );
|
|---|
| 971 | int hypre_SStructMatvec ( double alpha , hypre_SStructMatrix *A , hypre_SStructVector *x , double beta , hypre_SStructVector *y );
|
|---|
| 972 |
|
|---|
| 973 | /* sstruct_overlap_innerprod.c */
|
|---|
| 974 | int hypre_SStructPOverlapInnerProd ( hypre_SStructPVector *px , hypre_SStructPVector *py , double *presult_ptr );
|
|---|
| 975 | int hypre_SStructOverlapInnerProd ( hypre_SStructVector *x , hypre_SStructVector *y , double *result_ptr );
|
|---|
| 976 |
|
|---|
| 977 | /* sstruct_scale.c */
|
|---|
| 978 | int hypre_SStructPScale ( double alpha , hypre_SStructPVector *py );
|
|---|
| 979 | int hypre_SStructScale ( double alpha , hypre_SStructVector *y );
|
|---|
| 980 |
|
|---|
| 981 | /* sstruct_stencil.c */
|
|---|
| 982 | int hypre_SStructStencilRef ( hypre_SStructStencil *stencil , hypre_SStructStencil **stencil_ref );
|
|---|
| 983 |
|
|---|
| 984 | /* sstruct_vector.c */
|
|---|
| 985 | int hypre_SStructPVectorRef ( hypre_SStructPVector *vector , hypre_SStructPVector **vector_ref );
|
|---|
| 986 | int hypre_SStructPVectorCreate ( MPI_Comm comm , hypre_SStructPGrid *pgrid , hypre_SStructPVector **pvector_ptr );
|
|---|
| 987 | int hypre_SStructPVectorDestroy ( hypre_SStructPVector *pvector );
|
|---|
| 988 | int hypre_SStructPVectorInitialize ( hypre_SStructPVector *pvector );
|
|---|
| 989 | int hypre_SStructPVectorSetValues ( hypre_SStructPVector *pvector , hypre_Index index , int var , double *value , int add_to );
|
|---|
| 990 | int hypre_SStructPVectorSetBoxValues ( hypre_SStructPVector *pvector , hypre_Index ilower , hypre_Index iupper , int var , double *values , int add_to );
|
|---|
| 991 | int hypre_SStructPVectorAssemble ( hypre_SStructPVector *pvector );
|
|---|
| 992 | int hypre_SStructPVectorGather ( hypre_SStructPVector *pvector );
|
|---|
| 993 | int hypre_SStructPVectorGetValues ( hypre_SStructPVector *pvector , hypre_Index index , int var , double *value );
|
|---|
| 994 | int hypre_SStructPVectorGetBoxValues ( hypre_SStructPVector *pvector , hypre_Index ilower , hypre_Index iupper , int var , double *values );
|
|---|
| 995 | int hypre_SStructPVectorSetConstantValues ( hypre_SStructPVector *pvector , double value );
|
|---|
| 996 | int hypre_SStructPVectorPrint ( const char *filename , hypre_SStructPVector *pvector , int all );
|
|---|
| 997 | int hypre_SStructVectorRef ( hypre_SStructVector *vector , hypre_SStructVector **vector_ref );
|
|---|
| 998 | int hypre_SStructVectorSetConstantValues ( hypre_SStructVector *vector , double value );
|
|---|
| 999 | int hypre_SStructVectorConvert ( hypre_SStructVector *vector , hypre_ParVector **parvector_ptr );
|
|---|
| 1000 | int hypre_SStructVectorParConvert ( hypre_SStructVector *vector , hypre_ParVector **parvector_ptr );
|
|---|
| 1001 | int hypre_SStructVectorRestore ( hypre_SStructVector *vector , hypre_ParVector *parvector );
|
|---|
| 1002 | int hypre_SStructVectorParRestore ( hypre_SStructVector *vector , hypre_ParVector *parvector );
|
|---|
| 1003 | int hypre_SStructPVectorInitializeShell ( hypre_SStructPVector *pvector );
|
|---|
| 1004 | int hypre_SStructVectorInitializeShell ( hypre_SStructVector *vector );
|
|---|
| 1005 | int hypre_SStructVectorClearGhostValues ( hypre_SStructVector *vector );
|
|---|
| 1006 |
|
|---|
| 1007 | #ifdef __cplusplus
|
|---|
| 1008 | }
|
|---|
| 1009 | #endif
|
|---|
| 1010 |
|
|---|
| 1011 | #endif
|
|---|
| 1012 |
|
|---|