p4est  2.8.643-dbc7-dirty
p4est is a software library for parallel adaptive mesh refinement.
p8est_nodes.h
1 /*
2  This file is part of p4est.
3  p4est is a C library to manage a collection (a forest) of multiple
4  connected adaptive quadtrees or octrees in parallel.
5 
6  Copyright (C) 2010 The University of Texas System
7  Additional copyright (C) 2011 individual authors
8  Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac
9 
10  p4est is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  p4est is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with p4est; if not, write to the Free Software Foundation, Inc.,
22  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 */
24 
25 #ifndef P8EST_NODES_H
26 #define P8EST_NODES_H
27 
28 #include <p8est.h>
29 #include <p8est_ghost.h>
30 
31 SC_EXTERN_C_BEGIN;
32 
36 typedef struct p8est_indep
37 {
38  p4est_qcoord_t x, y, z;
39  int8_t level, pad8;
40  int16_t pad16;
42  {
43  void *unused;
44  p4est_topidx_t which_tree;
45  struct
46  {
47  p4est_topidx_t which_tree;
48  int owner_rank;
49  }
50  piggy1;
51  struct
52  {
53  p4est_topidx_t which_tree;
54  p4est_topidx_t from_tree;
55  }
56  piggy_unused2;
57  struct
58  {
59  p4est_topidx_t which_tree;
60  p4est_locidx_t local_num;
61  }
62  piggy3;
63  }
64  p;
65 }
67 
71 typedef struct p8est_hang2
72 {
73  p4est_qcoord_t x, y, z;
74  int8_t level, pad8;
75  int16_t pad16;
77  {
78  void *unused;
79  p4est_topidx_t which_tree;
80  struct
81  {
82  p4est_topidx_t which_tree;
83  int owner_rank;
84  }
85  piggy_unused1;
86  struct
87  {
88  p4est_topidx_t which_tree;
89  p4est_topidx_t from_tree;
90  }
91  piggy_unused2;
92  struct
93  {
94  p4est_topidx_t which_tree;
95  p4est_locidx_t local_num;
96  }
97  piggy_unused3;
98  struct
99  {
100  p4est_topidx_t which_tree;
101  p4est_locidx_t depends[2];
102  }
103  piggy;
104  }
105  p;
106 }
108 
112 typedef struct p8est_hang4
113 {
114  p4est_qcoord_t x, y, z;
115  int8_t level, pad8;
116  int16_t pad16;
118  {
119  void *unused;
120  p4est_topidx_t which_tree;
121  struct
122  {
123  p4est_topidx_t which_tree;
124  int owner_rank;
125  }
126  piggy_unused1;
127  struct
128  {
129  p4est_topidx_t which_tree;
130  p4est_topidx_t from_tree;
131  }
132  piggy_unused2;
133  struct
134  {
135  p4est_topidx_t which_tree;
136  p4est_locidx_t local_num;
137  }
138  piggy_unused3;
139  struct
140  {
141  p4est_topidx_t which_tree;
142  p4est_locidx_t depends[4];
143  }
144  piggy;
145  }
146  p;
147 }
149 
184 typedef struct p8est_nodes
185 {
186  p4est_locidx_t num_local_quadrants;
187  p4est_locidx_t num_owned_indeps, num_owned_shared;
188  p4est_locidx_t offset_owned_indeps;
189  sc_array_t indep_nodes;
190  sc_array_t face_hangings;
191  sc_array_t edge_hangings;
192  p4est_locidx_t *local_nodes;
193  sc_array_t shared_indeps;
194  p4est_locidx_t *shared_offsets;
195  int *nonlocal_ranks;
196  p4est_locidx_t *global_owned_indeps;
197 }
199 
209 p8est_nodes_t *p8est_nodes_new (p8est_t * p8est, p8est_ghost_t * ghost);
210 
212 void p8est_nodes_destroy (p8est_nodes_t * nodes);
213 
215 int p8est_nodes_is_valid (p8est_t * p8est,
216  p8est_nodes_t * nodes);
217 
218 SC_EXTERN_C_END;
219 
220 #endif /* !P8EST_NODES_H */
int32_t p4est_qcoord_t
Typedef for quadrant coordinates.
Definition: p4est_base.h:81
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition: p4est_base.h:93
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:106
The top-level 3D p8est interface.
passing quadrants and data to neighboring processes
quadrants that neighbor the local domain
Definition: p8est_ghost.h:41
Store a hanging node that depends on two independent nodes.
Definition: p8est_nodes.h:72
Store a hanging node that depends on four independent nodes.
Definition: p8est_nodes.h:113
Store an independent node.
Definition: p8est_nodes.h:37
This structure holds complete parallel node information.
Definition: p8est_nodes.h:185
The p8est forest datatype.
Definition: p8est.h:132
Definition: p8est_nodes.h:77
Definition: p8est_nodes.h:118
Definition: p8est_nodes.h:42