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_COMMUNICATION_H 00025 #define P8EST_COMMUNICATION_H 00026 00027 #include <p8est.h> 00028 00029 SC_EXTERN_C_BEGIN; 00030 00031 typedef enum 00032 { 00033 P8EST_COMM_COUNT_PERTREE = 1, 00034 P8EST_COMM_BALANCE_FIRST_COUNT, 00035 P8EST_COMM_BALANCE_FIRST_LOAD, 00036 P8EST_COMM_BALANCE_SECOND_COUNT, 00037 P8EST_COMM_BALANCE_SECOND_LOAD, 00038 P8EST_COMM_PARTITION_GIVEN, 00039 P8EST_COMM_PARTITION_WEIGHTED_LOW, 00040 P8EST_COMM_PARTITION_WEIGHTED_HIGH, 00041 P8EST_COMM_PARTITION_CORRECTION, 00042 P8EST_COMM_GHOST_COUNT, 00043 P8EST_COMM_GHOST_LOAD, 00044 P8EST_COMM_GHOST_EXCHANGE, 00045 P8EST_COMM_GHOST_EXPAND_COUNT, 00046 P8EST_COMM_GHOST_EXPAND_LOAD, 00047 P8EST_COMM_NODES_QUERY, 00048 P8EST_COMM_NODES_REPLY, 00049 P8EST_COMM_SAVE, 00050 P8EST_COMM_LNODES_TEST, 00051 P8EST_COMM_LNODES_PASS, 00052 P8EST_COMM_LNODES_OWNED, 00053 P8EST_COMM_LNODES_ALL 00054 } 00055 p8est_comm_tag_t; 00056 00061 void p8est_comm_count_quadrants (p8est_t * p8est); 00062 00071 void p8est_comm_global_partition (p8est_t * p8est, 00072 p8est_quadrant_t * 00073 first_quad); 00074 00081 void p8est_comm_count_pertree (p8est_t * p8est, 00082 p4est_gloidx_t * pertree); 00083 00089 int p8est_comm_is_owner (p8est_t * p8est, 00090 p4est_locidx_t which_tree, 00091 const p8est_quadrant_t * q, 00092 int rank); 00093 00099 int p8est_comm_find_owner (p8est_t * p8est, 00100 p4est_locidx_t which_tree, 00101 const p8est_quadrant_t * q, 00102 int guess); 00103 00114 void p8est_comm_tree_info (p8est_t * p8est, 00115 p4est_locidx_t which_tree, 00116 int full_tree[], 00117 int tree_contact[], 00118 const p8est_quadrant_t ** firstq, 00119 const p8est_quadrant_t ** nextq); 00120 00129 int p8est_comm_neighborhood_owned (p8est_t * p8est, 00130 p4est_locidx_t which_tree, 00131 int full_tree[], 00132 int tree_contact[], 00133 p8est_quadrant_t * q); 00134 00141 int p8est_comm_sync_flag (p8est_t * p8est, 00142 int flag, sc_MPI_Op operation); 00143 00150 unsigned p8est_comm_checksum (p8est_t * p8est, 00151 unsigned local_crc, 00152 size_t local_bytes); 00153 00154 SC_EXTERN_C_END; 00155 00156 #endif /* !P8EST_COMMUNICATION_H */