p4est  1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6est_profile.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) 2014 The University of Texas System
7  Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac
8 
9  p4est is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  p4est is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with p4est; if not, write to the Free Software Foundation, Inc.,
21  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 */
23 
24 #ifndef P6EST_PROFILE_H
25 #define P6EST_PROFILE_H
26 
27 #include <p6est.h>
28 #include <p6est_ghost.h>
29 #include <p4est_lnodes.h>
30 #include <p6est_lnodes.h>
31 
40 typedef enum
41 {
42  P6EST_PROFILE_UNION,
43  P6EST_PROFILE_INTERSECTION
44 }
45 p6est_profile_type_t;
46 
47 typedef struct p6est_profile
48 {
49  p6est_profile_type_t ptype;
51  p4est_lnodes_t *lnodes;
52  p4est_ghost_t *cghost;
53  int ghost_owned;
54  p4est_locidx_t *lnode_ranges;
55  sc_array_t *lnode_columns;
56  int *lnode_changed[2];
57  p4est_locidx_t *enode_counts;
58  int evenodd;
59 }
61 
72 p6est_profile_t *p6est_profile_new_local (p6est_t * p6est,
73  p6est_ghost_t * ghost,
74  p6est_profile_type_t ptype,
76  int degree);
77 
79 void p6est_profile_destroy (p6est_profile_t * profile);
80 
82 void p6est_profile_balance_local (p6est_profile_t * profile);
83 
90 int p6est_profile_sync (p6est_profile_t * profile);
91 
94 void p6est_refine_to_profile (p6est_t * p6est,
95  p6est_profile_t * profile,
96  p6est_init_t init_fn,
97  p6est_replace_t replace_fn);
98 
99 void p6est_profile_element_to_node (p6est_t * p6est,
100  p6est_profile_t * profile,
101  p4est_locidx_t * offsets,
103  elem_to_node,
104  p6est_lnodes_code_t * fc);
105 #endif /* !P6EST_PROFILE_H */
quadrants that neighbor the local domain
Definition: p4est_ghost.h:39
void(* p6est_replace_t)(p6est_t *p6est, p4est_topidx_t which_tree, int num_outcolumns, int num_outlayers, p4est_quadrant_t *outcolumns[], p2est_quadrant_t *outlayers[], int num_incolumns, int num_inlayers, p4est_quadrant_t *incolumns[], p2est_quadrant_t *inlayers[])
Callback function prototype to transfer information from outgoing layers to incoming layers...
Definition: p6est.h:228
columns of layers that neighbor the local domain
Definition: p6est_ghost.h:40
The p6est forest datatype.
Definition: p6est.h:163
p8est_connect_type_t
Characterize a type of adjacency.
Definition: p8est_connectivity.h:79
passing columns of layers and data to neighboring processes
void(* p6est_init_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to initialize the layers's user data.
Definition: p6est.h:195
The sc_array object provides a large array of equal-size elements.
Definition: sc_containers.h:92
Store a parallel numbering of Lobatto points of a given degree > 0.
Definition: p4est_lnodes.h:131
Definition: p6est_profile.h:47
A hybrid 2D+1D AMR extension.
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:74