p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
p4est_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 P4EST_NODES_H
26#define P4EST_NODES_H
27
28#include <p4est_ghost.h>
29
30SC_EXTERN_C_BEGIN;
31
35typedef struct p4est_indep
36{
37 p4est_qcoord_t x, y;
38 int8_t level, pad8;
39 int16_t pad16;
41 {
42 void *unused;
43 p4est_topidx_t which_tree;
44 struct
45 {
46 p4est_topidx_t which_tree;
47 int owner_rank;
48 }
49 piggy1;
50 struct
51 {
52 p4est_topidx_t which_tree;
53 p4est_topidx_t from_tree;
54 }
55 piggy_unused2;
56 struct
57 {
58 p4est_topidx_t which_tree;
59 p4est_locidx_t local_num;
60 }
61 piggy3;
62 }
63 p;
64}
66
70typedef struct p4est_hang2
71{
72 p4est_qcoord_t x, y;
73 int8_t level, pad8;
74 int16_t pad16;
76 {
77 void *unused;
78 p4est_topidx_t which_tree;
79 struct
80 {
81 p4est_topidx_t which_tree;
82 int owner_rank;
83 }
84 piggy_unused1;
85 struct
86 {
87 p4est_topidx_t which_tree;
88 p4est_topidx_t from_tree;
89 }
90 piggy_unused2;
91 struct
92 {
93 p4est_topidx_t which_tree;
94 p4est_locidx_t local_num;
95 }
96 piggy_unused3;
97 struct
98 {
99 p4est_topidx_t which_tree;
100 p4est_locidx_t depends[2];
101 }
102 piggy;
103 }
104 p;
105}
107
140typedef struct p4est_nodes
141{
142 p4est_locidx_t num_local_quadrants;
143 p4est_locidx_t num_owned_indeps, num_owned_shared;
144 p4est_locidx_t offset_owned_indeps;
145 sc_array_t indep_nodes;
146 sc_array_t face_hangings;
147 p4est_locidx_t *local_nodes;
148 sc_array_t shared_indeps;
149 p4est_locidx_t *shared_offsets;
150 int *nonlocal_ranks;
151 p4est_locidx_t *global_owned_indeps;
152}
154
164p4est_nodes_t *p4est_nodes_new (p4est_t * p4est, p4est_ghost_t * ghost);
165
167void p4est_nodes_destroy (p4est_nodes_t * nodes);
168
170int p4est_nodes_is_valid (p4est_t * p4est,
171 p4est_nodes_t * nodes);
172
173SC_EXTERN_C_END;
174
175#endif /* !P4EST_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
passing quadrants and data to neighboring processes
quadrants that neighbor the local domain
Definition: p4est_ghost.h:41
Store a hanging node that depends on two independent nodes.
Definition: p4est_nodes.h:71
Store an independent node.
Definition: p4est_nodes.h:36
This structure holds complete parallel node information.
Definition: p4est_nodes.h:141
The p4est forest datatype.
Definition: p4est.h:136
Definition: p4est_nodes.h:76
Definition: p4est_nodes.h:41