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 P4EST_NODES_H 00025 #define P4EST_NODES_H 00026 00027 #include <p4est.h> 00028 #include <p4est_ghost.h> 00029 00030 SC_EXTERN_C_BEGIN; 00031 00035 typedef struct p4est_indep 00036 { 00037 p4est_qcoord_t x, y; 00038 int8_t level, pad8; 00039 int16_t pad16; 00040 union p4est_indep_data 00041 { 00042 void *unused; 00043 p4est_topidx_t which_tree; 00044 struct 00045 { 00046 p4est_topidx_t which_tree; 00047 int owner_rank; 00048 } 00049 piggy1; 00050 struct 00051 { 00052 p4est_topidx_t which_tree; 00053 p4est_topidx_t from_tree; 00054 } 00055 piggy_unused2; 00056 struct 00057 { 00058 p4est_topidx_t which_tree; 00059 p4est_locidx_t local_num; 00060 } 00061 piggy3; 00062 } 00063 p; 00064 } 00065 p4est_indep_t; 00066 00070 typedef struct p4est_hang2 00071 { 00072 p4est_qcoord_t x, y; 00073 int8_t level, pad8; 00074 int16_t pad16; 00075 union p4est_hang2_data 00076 { 00077 void *unused; 00078 p4est_topidx_t which_tree; 00079 struct 00080 { 00081 p4est_topidx_t which_tree; 00082 int owner_rank; 00083 } 00084 piggy_unused1; 00085 struct 00086 { 00087 p4est_topidx_t which_tree; 00088 p4est_topidx_t from_tree; 00089 } 00090 piggy_unused2; 00091 struct 00092 { 00093 p4est_topidx_t which_tree; 00094 p4est_locidx_t local_num; 00095 } 00096 piggy_unused3; 00097 struct 00098 { 00099 p4est_topidx_t which_tree; 00100 p4est_locidx_t depends[2]; 00101 } 00102 piggy; 00103 } 00104 p; 00105 } 00106 p4est_hang2_t; 00107 00140 typedef struct p4est_nodes 00141 { 00142 p4est_locidx_t num_local_quadrants; 00143 p4est_locidx_t num_owned_indeps, num_owned_shared; 00144 p4est_locidx_t offset_owned_indeps; 00145 sc_array_t indep_nodes; 00146 sc_array_t face_hangings; 00147 p4est_locidx_t *local_nodes; 00148 sc_array_t shared_indeps; 00149 p4est_locidx_t *shared_offsets; 00150 int *nonlocal_ranks; 00151 p4est_locidx_t *global_owned_indeps; 00152 } 00153 p4est_nodes_t; 00154 00164 p4est_nodes_t *p4est_nodes_new (p4est_t * p4est, p4est_ghost_t * ghost); 00165 00167 void p4est_nodes_destroy (p4est_nodes_t * nodes); 00168 00170 int p4est_nodes_is_valid (p4est_t * p4est, 00171 p4est_nodes_t * nodes); 00172 00173 SC_EXTERN_C_END; 00174 00175 #endif /* !P4EST_NODES_H */