source: CIVL/examples/mpi-omp/AMG2013/sstruct_mv/sstruct_graph.h@ 7d77e64

main test-branch
Last change on this file since 7d77e64 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: 5.2 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 *
17 * Header info for the hypre_SStructGraph structures
18 *
19 *****************************************************************************/
20
21#ifndef hypre_SSTRUCT_GRAPH_HEADER
22#define hypre_SSTRUCT_GRAPH_HEADER
23
24/*--------------------------------------------------------------------------
25 * hypre_SStructGraph:
26 *--------------------------------------------------------------------------*/
27
28typedef struct
29{
30 int to_part;
31 hypre_Index to_index;
32 int to_var;
33 int to_box; /* local box number */
34 int to_proc;
35 HYPRE_BigInt rank;
36
37} hypre_SStructUEntry;
38
39typedef struct
40{
41 int part;
42 hypre_Index index;
43 int var;
44 int box; /* local box number */
45 int nUentries;
46 hypre_SStructUEntry *Uentries;
47
48} hypre_SStructUVEntry;
49
50typedef struct hypre_SStructGraph_struct
51{
52 MPI_Comm comm;
53 int ndim;
54 hypre_SStructGrid *grid;
55 int nparts;
56 hypre_SStructPGrid **pgrids;
57 hypre_SStructStencil ***stencils; /* each (part, var) has a stencil */
58
59 /* U-graph info: Entries are referenced via local grid-variable rank. */
60 int nUventries; /* number of iUventries */
61 int aUventries; /* alloc size of iUventries */
62 int *iUventries;
63
64
65 hypre_SStructUVEntry **Uventries;
66 int totUentries;
67
68 int ref_count;
69
70 int type; /* GEC0203 */
71} hypre_SStructGraph;
72
73/*--------------------------------------------------------------------------
74 * Accessor macros: hypre_SStructGraph
75 *--------------------------------------------------------------------------*/
76
77#define hypre_SStructGraphComm(graph) ((graph) -> comm)
78#define hypre_SStructGraphNDim(graph) ((graph) -> ndim)
79#define hypre_SStructGraphGrid(graph) ((graph) -> grid)
80#define hypre_SStructGraphNParts(graph) ((graph) -> nparts)
81#define hypre_SStructGraphPGrids(graph) ((graph) -> pgrids)
82#define hypre_SStructGraphPGrid(graph, p) ((graph) -> pgrids[p])
83#define hypre_SStructGraphStencils(graph) ((graph) -> stencils)
84#define hypre_SStructGraphStencil(graph, p, v) ((graph) -> stencils[p][v])
85#define hypre_SStructGraphNUVEntries(graph) ((graph) -> nUventries)
86#define hypre_SStructGraphAUVEntries(graph) ((graph) -> aUventries)
87#define hypre_SStructGraphIUVEntries(graph) ((graph) -> iUventries)
88#define hypre_SStructGraphIUVEntry(graph, i) ((graph) -> iUventries[i])
89#define hypre_SStructGraphUVEntries(graph) ((graph) -> Uventries)
90#define hypre_SStructGraphUVEntry(graph, i) ((graph) -> Uventries[i])
91#define hypre_SStructGraphTotUEntries(graph) ((graph) -> totUentries)
92#define hypre_SStructGraphRefCount(graph) ((graph) -> ref_count)
93#define hypre_SStructGraphObjectType(graph) ((graph) -> type)
94
95/*--------------------------------------------------------------------------
96 * Accessor macros: hypre_SStructUVEntry
97 *--------------------------------------------------------------------------*/
98
99#define hypre_SStructUVEntryPart(Uv) ((Uv) -> part)
100#define hypre_SStructUVEntryIndex(Uv) ((Uv) -> index)
101#define hypre_SStructUVEntryVar(Uv) ((Uv) -> var)
102#define hypre_SStructUVEntryBox(Uv) ((Uv) -> box)
103#define hypre_SStructUVEntryNUEntries(Uv) ((Uv) -> nUentries)
104#define hypre_SStructUVEntryUEntries(Uv) ((Uv) -> Uentries)
105#define hypre_SStructUVEntryUEntry(Uv, i) &((Uv) -> Uentries[i])
106#define hypre_SStructUVEntryToPart(Uv, i) ((Uv) -> Uentries[i].to_part)
107#define hypre_SStructUVEntryToIndex(Uv, i) ((Uv) -> Uentries[i].to_index)
108#define hypre_SStructUVEntryToVar(Uv, i) ((Uv) -> Uentries[i].to_var)
109#define hypre_SStructUVEntryToBox(Uv, i) ((Uv) -> Uentries[i].to_box)
110#define hypre_SStructUVEntryToProc(Uv, i) ((Uv) -> Uentries[i].to_proc)
111#define hypre_SStructUVEntryRank(Uv, i) ((Uv) -> Uentries[i].rank)
112/*--------------------------------------------------------------------------
113 * Accessor macros: hypre_SStructUEntry
114 *--------------------------------------------------------------------------*/
115
116#define hypre_SStructUEntryToPart(U) ((U) -> to_part)
117#define hypre_SStructUEntryToIndex(U) ((U) -> to_index)
118#define hypre_SStructUEntryToVar(U) ((U) -> to_var)
119#define hypre_SStructUEntryToBox(U) ((U) -> to_box)
120#define hypre_SStructUEntryToProc(U) ((U) -> to_proc)
121#define hypre_SStructUEntryRank(U) ((U) -> rank)
122
123#endif
124
125
Note: See TracBrowser for help on using the repository browser.