p4est
1.0
|
00001 /* 00002 This file is part of p4est. 00003 p4est is a C library to manage a collection (a forest) of multiple 00004 connected adaptive quadtrees or octrees in parallel. 00005 00006 Copyright (C) 2010 The University of Texas System 00007 Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac 00008 00009 p4est is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 p4est is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with p4est; if not, write to the Free Software Foundation, Inc., 00021 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 */ 00023 00024 #ifndef P8EST_SEARCH_H 00025 #define P8EST_SEARCH_H 00026 00027 #include <p8est.h> 00028 00029 SC_EXTERN_C_BEGIN; 00030 00035 ssize_t p8est_find_lower_bound (sc_array_t * array, 00036 const p8est_quadrant_t * q, 00037 size_t guess); 00038 00043 ssize_t p8est_find_higher_bound (sc_array_t * array, 00044 const p8est_quadrant_t * q, 00045 size_t guess); 00046 00061 void p8est_split_array (sc_array_t * array, int level, 00062 size_t indices[]); 00063 00088 int32_t p8est_find_range_boundaries (p8est_quadrant_t * lq, 00089 p8est_quadrant_t * uq, 00090 int level, int faces[], 00091 int edges[], int corners[]); 00092 00118 typedef int (*p8est_search_query_t) (p8est_t * p8est, 00119 p4est_topidx_t which_tree, 00120 p8est_quadrant_t * quadrant, 00121 p4est_locidx_t local_num, 00122 void *point); 00123 00152 void p8est_search (p8est_t * p8est, 00153 p8est_search_query_t search_quadrant_fn, 00154 p8est_search_query_t search_point_fn, 00155 sc_array_t * points); 00156 00157 SC_EXTERN_C_END; 00158 00159 #endif