p4est  2.8.643-dbc7-dirty
p4est is a software library for parallel adaptive mesh refinement.
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) 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 P6EST_PROFILE_H
26 #define P6EST_PROFILE_H
27 
28 #include <p6est.h>
29 #include <p6est_ghost.h>
30 #include <p4est_lnodes.h>
31 #include <p6est_lnodes.h>
32 
33 SC_EXTERN_C_BEGIN;
34 
43 typedef enum
44 {
45  P6EST_PROFILE_UNION,
46  P6EST_PROFILE_INTERSECTION
47 }
48 p6est_profile_type_t;
49 
50 typedef struct p6est_profile
51 {
52  p6est_profile_type_t ptype;
54  p4est_lnodes_t *lnodes;
55  p4est_ghost_t *cghost;
56  int ghost_owned;
57  p4est_locidx_t *lnode_ranges;
58  sc_array_t *lnode_columns;
59  int *lnode_changed[2];
60  p4est_locidx_t *enode_counts;
61  int evenodd;
62  p4est_qcoord_t diff;
63 }
65 
76 p6est_profile_t *p6est_profile_new_local (p6est_t * p6est,
77  p6est_ghost_t * ghost,
78  p6est_profile_type_t ptype,
80  int degree);
81 
83 void p6est_profile_destroy (p6est_profile_t * profile);
84 
86 void p6est_profile_balance_local (p6est_profile_t * profile);
87 
94 int p6est_profile_sync (p6est_profile_t * profile);
95 
98 void p6est_refine_to_profile (p6est_t * p6est,
99  p6est_profile_t * profile,
100  p6est_init_t init_fn,
101  p6est_replace_t replace_fn);
102 
103 void p6est_profile_element_to_node (p6est_t * p6est,
104  p6est_profile_t * profile,
105  p4est_locidx_t * offsets,
107  elem_to_node,
108  p6est_lnodes_code_t * fc);
109 
110 SC_EXTERN_C_END;
111 
112 #endif /* !P6EST_PROFILE_H */
int32_t p4est_qcoord_t
Typedef for quadrant coordinates.
Definition: p4est_base.h:81
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:106
A hybrid 2D+1D AMR extension.
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:201
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:234
passing columns of layers and data to neighboring processes
p8est_connect_type_t
Characterize a type of adjacency.
Definition: p8est_connectivity.h:90
quadrants that neighbor the local domain
Definition: p4est_ghost.h:41
Store a parallel numbering of Lobatto points of a given degree > 0.
Definition: p4est_lnodes.h:133
columns of layers that neighbor the local domain
Definition: p6est_ghost.h:42
Definition: p6est_profile.h:51
The p6est forest datatype.
Definition: p6est.h:165