p4est  1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p8est_search.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  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 P8EST_SEARCH_H
25 #define P8EST_SEARCH_H
26 
27 #include <p8est.h>
28 
29 SC_EXTERN_C_BEGIN;
30 
35 ssize_t p8est_find_lower_bound (sc_array_t * array,
36  const p8est_quadrant_t * q,
37  size_t guess);
38 
43 ssize_t p8est_find_higher_bound (sc_array_t * array,
44  const p8est_quadrant_t * q,
45  size_t guess);
46 
61 void p8est_split_array (sc_array_t * array, int level,
62  size_t indices[]);
63 
88 int32_t p8est_find_range_boundaries (p8est_quadrant_t * lq,
89  p8est_quadrant_t * uq,
90  int level, int faces[],
91  int edges[], int corners[]);
92 
118 typedef int (*p8est_search_query_t) (p8est_t * p8est,
119  p4est_topidx_t which_tree,
120  p8est_quadrant_t * quadrant,
121  p4est_locidx_t local_num,
122  void *point);
123 
152 void p8est_search (p8est_t * p8est,
153  p8est_search_query_t search_quadrant_fn,
154  p8est_search_query_t search_point_fn,
155  sc_array_t * points);
156 
157 SC_EXTERN_C_END;
158 
159 #endif
The top-level 3D p8est interface.
The 3D quadrant (i.e.
Definition: p8est.h:61
The p8est forest datatype.
Definition: p8est.h:125
The sc_array object provides a large array of equal-size elements.
Definition: sc_containers.h:92
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition: p4est_base.h:63
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:74