p4est  2.8.7
p4est is a software library for parallel adaptive mesh refinement.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
p4est_base.h
Go to the documentation of this file.
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 
30 #ifndef P4EST_BASE_H
31 #define P4EST_BASE_H
32 
33 /* include config headers */
34 #include <p4est_config.h>
35 #include <sc_config.h>
36 #if \
37  (defined (P4EST_ENABLE_MPI) && !defined (SC_ENABLE_MPI)) || \
38  (!defined (P4EST_ENABLE_MPI) && defined (SC_ENABLE_MPI))
39 #error "MPI configured differently in p4est and libsc"
40 #endif
41 #if \
42  (defined (P4EST_ENABLE_MPIIO) && !defined (SC_ENABLE_MPIIO)) || \
43  (!defined (P4EST_ENABLE_MPIIO) && defined (SC_ENABLE_MPIIO))
44 #error "MPI I/O configured differently in p4est and libsc"
45 #endif
46 
47 /* indirectly also include sc.h */
48 #include <sc_containers.h>
49 #define _p4est_const _sc_const
50 
51 /*--------------------------------------------------------------------*/
52 /*------------------------ QUERY API CHANGES -------------------------*/
53 /*---- definitions to allow user code to query the p4est library -----*/
54 
56 #define P4EST_COMM_TRANSFER_NULL
57 
60 #define P4EST_CONN_DISK_PERIODIC
61 
63 #define P4EST_CONN_REORDER_NEWID
64 
71 #define P4EST_SEARCH_LOCAL
72 
74 #define P4EST_VTK_CELL_DATAV
75 
76 /*--------------------------------------------------------------------*/
77 
78 SC_EXTERN_C_BEGIN;
79 
81 typedef int32_t p4est_qcoord_t;
82 #define p4est_qcoord_compare sc_int32_compare
83 #define P4EST_QCOORD_BITS 32
84 #define P4EST_MPI_QCOORD sc_MPI_INT
85 #define P4EST_VTK_QCOORD "Int32"
86 #define P4EST_F90_QCOORD INTEGER(KIND=C_INT32_T)
87 #define P4EST_QCOORD_MIN INT32_MIN
88 #define P4EST_QCOORD_MAX INT32_MAX
89 #define P4EST_QCOORD_1 ((p4est_qcoord_t) 1)
90 #define P4EST_QCOORD_ABS(x) ((p4est_qcoord_t) labs ((long) (x)))
91 
93 typedef int32_t p4est_topidx_t;
94 #define p4est_topidx_compare sc_int32_compare
95 #define P4EST_TOPIDX_BITS 32
96 #define P4EST_MPI_TOPIDX sc_MPI_INT
97 #define P4EST_VTK_TOPIDX "Int32"
98 #define P4EST_F90_TOPIDX INTEGER(KIND=C_INT32_T)
99 #define P4EST_TOPIDX_MIN INT32_MIN
100 #define P4EST_TOPIDX_MAX INT32_MAX
101 #define P4EST_TOPIDX_FITS_32 1
102 #define P4EST_TOPIDX_1 ((p4est_topidx_t) 1)
103 #define P4EST_TOPIDX_ABS(x) ((p4est_topidx_t) labs ((long) (x)))
104 
106 typedef int32_t p4est_locidx_t;
107 #define p4est_locidx_compare sc_int32_compare
108 #define P4EST_LOCIDX_BITS 32
109 #define P4EST_MPI_LOCIDX sc_MPI_INT
110 #define P4EST_VTK_LOCIDX "Int32"
111 #define P4EST_F90_LOCIDX INTEGER(KIND=C_INT32_T)
112 #define P4EST_LOCIDX_MIN INT32_MIN
113 #define P4EST_LOCIDX_MAX INT32_MAX
114 #define P4EST_LOCIDX_1 ((p4est_locidx_t) 1)
115 #define P4EST_LOCIDX_ABS(x) ((p4est_locidx_t) labs ((long) (x)))
116 
118 typedef int64_t p4est_gloidx_t;
119 #define p4est_gloidx_compare sc_int64_compare
120 #define P4EST_GLOIDX_BITS 64
121 #define P4EST_MPI_GLOIDX sc_MPI_LONG_LONG_INT
122 #define P4EST_VTK_GLOIDX "Int64"
123 #define P4EST_F90_GLOIDX INTEGER(KIND=C_INT64_T)
124 #define P4EST_GLOIDX_MIN INT64_MIN
125 #define P4EST_GLOIDX_MAX INT64_MAX
126 #define P4EST_GLOIDX_1 ((p4est_gloidx_t) 1)
127 #define P4EST_GLOIDX_ABS(x) ((p4est_gloidx_t) llabs ((long long) (x)))
128 
130 typedef enum p4est_comm_tag
131 {
132  P4EST_COMM_TAG_FIRST = SC_TAG_FIRST,
133  P4EST_COMM_COUNT_PERTREE = SC_TAG_LAST,
134  P4EST_COMM_BALANCE_FIRST_COUNT,
135  P4EST_COMM_BALANCE_FIRST_LOAD,
136  P4EST_COMM_BALANCE_SECOND_COUNT,
137  P4EST_COMM_BALANCE_SECOND_LOAD,
138  P4EST_COMM_PARTITION_GIVEN,
139  P4EST_COMM_PARTITION_WEIGHTED_LOW,
140  P4EST_COMM_PARTITION_WEIGHTED_HIGH,
141  P4EST_COMM_PARTITION_CORRECTION,
142  P4EST_COMM_GHOST_COUNT,
143  P4EST_COMM_GHOST_LOAD,
144  P4EST_COMM_GHOST_EXCHANGE,
145  P4EST_COMM_GHOST_EXPAND_COUNT,
146  P4EST_COMM_GHOST_EXPAND_LOAD,
147  P4EST_COMM_GHOST_SUPPORT_COUNT,
148  P4EST_COMM_GHOST_SUPPORT_LOAD,
149  P4EST_COMM_GHOST_CHECKSUM,
150  P4EST_COMM_NODES_QUERY,
151  P4EST_COMM_NODES_REPLY,
152  P4EST_COMM_SAVE,
153  P4EST_COMM_LNODES_TEST,
154  P4EST_COMM_LNODES_PASS,
155  P4EST_COMM_LNODES_OWNED,
156  P4EST_COMM_LNODES_ALL,
157  P4EST_COMM_TAG_LAST
158 }
160 
161 /* some error checking possibly specific to p4est */
162 #ifdef P4EST_ENABLE_DEBUG
163 #define P4EST_ASSERT(c) SC_CHECK_ABORT ((c), "Assertion '" #c "'")
164 #define P4EST_EXECUTE_ASSERT_FALSE(expression) \
165  do { int _p4est_i = (int) (expression); \
166  SC_CHECK_ABORT (!_p4est_i, "Expected false: '" #expression "'"); \
167  } while (0)
168 #define P4EST_EXECUTE_ASSERT_TRUE(expression) \
169  do { int _p4est_i = (int) (expression); \
170  SC_CHECK_ABORT (_p4est_i, "Expected true: '" #expression "'"); \
171  } while (0)
172 #define P4EST_EXECUTE_ASSERT_INT(expression,ival) \
173  do { int _p4est_i = (int) (expression); \
174  SC_CHECK_ABORT ((ival) == _p4est_i, \
175  "Expected '" #ival "': '" #expression "'"); \
176  } while (0)
177 #define P4EST_EXECUTE_ASSERT_TOPIDX(expression,tval) \
178  do { p4est_topidx_t _p4est_t = (p4est_topidx_t) (expression); \
179  SC_CHECK_ABORT ((tval) == _p4est_t, \
180  "Expected '" #tval "': '" #expression "'"); \
181  } while (0)
182 #define P4EST_DEBUG_EXECUTE(expression) \
183  do { (void) (expression); } while (0)
184 #else
185 #define P4EST_ASSERT(c) SC_NOOP ()
186 #define P4EST_EXECUTE_ASSERT_FALSE(expression) \
187  do { (void) (expression); } while (0)
188 #define P4EST_EXECUTE_ASSERT_TRUE(expression) \
189  do { (void) (expression); } while (0)
190 #define P4EST_EXECUTE_ASSERT_INT(expression,ival) \
191  do { (void) (expression); } while (0)
192 #define P4EST_EXECUTE_ASSERT_TOPIDX(expression,tval) \
193  do { (void) (expression); } while (0)
194 #define P4EST_DEBUG_EXECUTE(expression) SC_NOOP ()
195 #endif
196 
197 /* macros for memory allocation, will abort if out of memory */
199 #define P4EST_ALLOC(t,n) (t *) sc_malloc (p4est_package_id, \
200  (n) * sizeof(t))
202 #define P4EST_ALLOC_ZERO(t,n) (t *) sc_calloc (p4est_package_id, \
203  (size_t) (n), sizeof(t))
205 #define P4EST_REALLOC(p,t,n) (t *) sc_realloc (p4est_package_id, \
206  (p), (n) * sizeof(t))
208 #define P4EST_STRDUP(s) sc_strdup (p4est_package_id, (s))
210 #define P4EST_FREE(p) sc_free (p4est_package_id, (p))
211 
212 /* log helper macros */
213 #define P4EST_GLOBAL_LOG(p,s) \
214  SC_GEN_LOG (p4est_package_id, SC_LC_GLOBAL, (p), (s))
215 #define P4EST_LOG(p,s) \
216  SC_GEN_LOG (p4est_package_id, SC_LC_NORMAL, (p), (s))
217 void P4EST_GLOBAL_LOGF (int priority, const char *fmt, ...)
218  __attribute__ ((format (printf, 2, 3)));
219 void P4EST_LOGF (int priority, const char *fmt, ...)
220  __attribute__ ((format (printf, 2, 3)));
221 #ifndef __cplusplus
222 #define P4EST_GLOBAL_LOGF(p,f,...) \
223  SC_GEN_LOGF (p4est_package_id, SC_LC_GLOBAL, (p), (f), __VA_ARGS__)
224 #define P4EST_LOGF(p,f,...) \
225  SC_GEN_LOGF (p4est_package_id, SC_LC_NORMAL, (p), (f), __VA_ARGS__)
226 #endif
227 
228 /* convenience global log macros will only print if identifier <= 0 */
229 #define P4EST_GLOBAL_TRACE(s) P4EST_GLOBAL_LOG (SC_LP_TRACE, (s))
230 #define P4EST_GLOBAL_LDEBUG(s) P4EST_GLOBAL_LOG (SC_LP_DEBUG, (s))
231 #define P4EST_GLOBAL_VERBOSE(s) P4EST_GLOBAL_LOG (SC_LP_VERBOSE, (s))
232 #define P4EST_GLOBAL_INFO(s) P4EST_GLOBAL_LOG (SC_LP_INFO, (s))
233 #define P4EST_GLOBAL_STATISTICS(s) P4EST_GLOBAL_LOG (SC_LP_STATISTICS, (s))
234 #define P4EST_GLOBAL_PRODUCTION(s) P4EST_GLOBAL_LOG (SC_LP_PRODUCTION, (s))
235 #define P4EST_GLOBAL_ESSENTIAL(s) P4EST_GLOBAL_LOG (SC_LP_ESSENTIAL, (s))
236 #define P4EST_GLOBAL_LERROR(s) P4EST_GLOBAL_LOG (SC_LP_ERROR, (s))
237 void P4EST_GLOBAL_TRACEF (const char *fmt, ...)
238  __attribute__ ((format (printf, 1, 2)));
239 void P4EST_GLOBAL_LDEBUGF (const char *fmt, ...)
240  __attribute__ ((format (printf, 1, 2)));
241 void P4EST_GLOBAL_VERBOSEF (const char *fmt, ...)
242  __attribute__ ((format (printf, 1, 2)));
243 void P4EST_GLOBAL_INFOF (const char *fmt, ...)
244  __attribute__ ((format (printf, 1, 2)));
245 void P4EST_GLOBAL_STATISTICSF (const char *fmt, ...)
246  __attribute__ ((format (printf, 1, 2)));
247 void P4EST_GLOBAL_PRODUCTIONF (const char *fmt, ...)
248  __attribute__ ((format (printf, 1, 2)));
249 void P4EST_GLOBAL_ESSENTIALF (const char *fmt, ...)
250  __attribute__ ((format (printf, 1, 2)));
251 void P4EST_GLOBAL_LERRORF (const char *fmt, ...)
252  __attribute__ ((format (printf, 1, 2)));
253 #ifndef __cplusplus
254 #define P4EST_GLOBAL_TRACEF(f,...) \
255  P4EST_GLOBAL_LOGF (SC_LP_TRACE, (f), __VA_ARGS__)
256 #define P4EST_GLOBAL_LDEBUGF(f,...) \
257  P4EST_GLOBAL_LOGF (SC_LP_DEBUG, (f), __VA_ARGS__)
258 #define P4EST_GLOBAL_VERBOSEF(f,...) \
259  P4EST_GLOBAL_LOGF (SC_LP_VERBOSE, (f), __VA_ARGS__)
260 #define P4EST_GLOBAL_INFOF(f,...) \
261  P4EST_GLOBAL_LOGF (SC_LP_INFO, (f), __VA_ARGS__)
262 #define P4EST_GLOBAL_STATISTICSF(f,...) \
263  P4EST_GLOBAL_LOGF (SC_LP_STATISTICS, (f), __VA_ARGS__)
264 #define P4EST_GLOBAL_PRODUCTIONF(f,...) \
265  P4EST_GLOBAL_LOGF (SC_LP_PRODUCTION, (f), __VA_ARGS__)
266 #define P4EST_GLOBAL_ESSENTIALF(f,...) \
267  P4EST_GLOBAL_LOGF (SC_LP_ESSENTIAL, (f), __VA_ARGS__)
268 #define P4EST_GLOBAL_LERRORF(f,...) \
269  P4EST_GLOBAL_LOGF (SC_LP_ERROR, (f), __VA_ARGS__)
270 #endif
271 #define P4EST_GLOBAL_NOTICE P4EST_GLOBAL_STATISTICS
272 #define P4EST_GLOBAL_NOTICEF P4EST_GLOBAL_STATISTICSF
273 
274 /* convenience log macros that are active on every processor */
275 #define P4EST_TRACE(s) P4EST_LOG (SC_LP_TRACE, (s))
276 #define P4EST_LDEBUG(s) P4EST_LOG (SC_LP_DEBUG, (s))
277 #define P4EST_VERBOSE(s) P4EST_LOG (SC_LP_VERBOSE, (s))
278 #define P4EST_INFO(s) P4EST_LOG (SC_LP_INFO, (s))
279 #define P4EST_STATISTICS(s) P4EST_LOG (SC_LP_STATISTICS, (s))
280 #define P4EST_PRODUCTION(s) P4EST_LOG (SC_LP_PRODUCTION, (s))
281 #define P4EST_ESSENTIAL(s) P4EST_LOG (SC_LP_ESSENTIAL, (s))
282 #define P4EST_LERROR(s) P4EST_LOG (SC_LP_ERROR, (s))
283 void P4EST_TRACEF (const char *fmt, ...)
284  __attribute__ ((format (printf, 1, 2)));
285 void P4EST_LDEBUGF (const char *fmt, ...)
286  __attribute__ ((format (printf, 1, 2)));
287 void P4EST_VERBOSEF (const char *fmt, ...)
288  __attribute__ ((format (printf, 1, 2)));
289 void P4EST_INFOF (const char *fmt, ...)
290  __attribute__ ((format (printf, 1, 2)));
291 void P4EST_STATISTICSF (const char *fmt, ...)
292  __attribute__ ((format (printf, 1, 2)));
293 void P4EST_PRODUCTIONF (const char *fmt, ...)
294  __attribute__ ((format (printf, 1, 2)));
295 void P4EST_ESSENTIALF (const char *fmt, ...)
296  __attribute__ ((format (printf, 1, 2)));
297 void P4EST_LERRORF (const char *fmt, ...)
298  __attribute__ ((format (printf, 1, 2)));
299 #ifndef __cplusplus
300 #define P4EST_TRACEF(f,...) \
301  P4EST_LOGF (SC_LP_TRACE, (f), __VA_ARGS__)
302 #define P4EST_LDEBUGF(f,...) \
303  P4EST_LOGF (SC_LP_DEBUG, (f), __VA_ARGS__)
304 #define P4EST_VERBOSEF(f,...) \
305  P4EST_LOGF (SC_LP_VERBOSE, (f), __VA_ARGS__)
306 #define P4EST_INFOF(f,...) \
307  P4EST_LOGF (SC_LP_INFO, (f), __VA_ARGS__)
308 #define P4EST_STATISTICSF(f,...) \
309  P4EST_LOGF (SC_LP_STATISTICS, (f), __VA_ARGS__)
310 #define P4EST_PRODUCTIONF(f,...) \
311  P4EST_LOGF (SC_LP_PRODUCTION, (f), __VA_ARGS__)
312 #define P4EST_ESSENTIALF(f,...) \
313  P4EST_LOGF (SC_LP_ESSENTIAL, (f), __VA_ARGS__)
314 #define P4EST_LERRORF(f,...) \
315  P4EST_LOGF (SC_LP_ERROR, (f), __VA_ARGS__)
316 #endif
317 #define P4EST_NOTICE P4EST_STATISTICS
318 #define P4EST_NOTICEF P4EST_STATISTICSF
319 
326 extern SC_DLL_PUBLIC int p4est_package_id;
327 
328 static inline void
329 p4est_log_indent_push (void)
330 {
331  sc_log_indent_push_count (p4est_package_id, 1);
332 }
333 
334 static inline void
335 p4est_log_indent_pop (void)
336 {
337  sc_log_indent_pop_count (p4est_package_id, 1);
338 }
339 
349 void p4est_init (sc_log_handler_t log_handler,
350  int log_threshold);
351 
364 
368 int p4est_have_zlib (void);
369 
375 
380 /*@unused@*/
381 static inline unsigned
382 p4est_topidx_hash2 (const p4est_topidx_t * tt)
383 {
384  uint32_t a, b, c;
385 
386 #if (P4EST_TOPIDX_FITS_32)
387  a = (uint32_t) tt[0];
388  b = (uint32_t) tt[1];
389  c = 0;
390 #else
391  a = (uint32_t) (tt[0] && 0xFFFFFFFF);
392  b = (uint32_t) (tt[0] >> 32);
393  c = (uint32_t) (tt[1] && 0xFFFFFFFF);
394  sc_hash_mix (a, b, c);
395  a += (uint32_t) (tt[1] >> 32);
396 #endif
397  sc_hash_final (a, b, c);
398 
399  return (unsigned) c;
400 }
401 
406 /*@unused@*/
407 static inline unsigned
408 p4est_topidx_hash3 (const p4est_topidx_t * tt)
409 {
410  uint32_t a, b, c;
411 
412 #if (P4EST_TOPIDX_FITS_32)
413  a = (uint32_t) tt[0];
414  b = (uint32_t) tt[1];
415  c = (uint32_t) tt[2];
416 #else
417  a = (uint32_t) (tt[0] && 0xFFFFFFFF);
418  b = (uint32_t) (tt[0] >> 32);
419  c = (uint32_t) (tt[1] && 0xFFFFFFFF);
420  sc_hash_mix (a, b, c);
421  a += (uint32_t) (tt[1] >> 32);
422  b += (uint32_t) (tt[2] && 0xFFFFFFFF);
423  c += (uint32_t) (tt[2] >> 32);
424 #endif
425  sc_hash_final (a, b, c);
426 
427  return (unsigned) c;
428 }
429 
434 /*@unused@*/
435 static inline unsigned
436 p4est_topidx_hash4 (const p4est_topidx_t * tt)
437 {
438  uint32_t a, b, c;
439 
440 #if (P4EST_TOPIDX_FITS_32)
441  a = (uint32_t) tt[0];
442  b = (uint32_t) tt[1];
443  c = (uint32_t) tt[2];
444  sc_hash_mix (a, b, c);
445  a += (uint32_t) tt[3];
446 #else
447  a = (uint32_t) (tt[0] && 0xFFFFFFFF);
448  b = (uint32_t) (tt[0] >> 32);
449  c = (uint32_t) (tt[1] && 0xFFFFFFFF);
450  sc_hash_mix (a, b, c);
451  a += (uint32_t) (tt[1] >> 32);
452  b += (uint32_t) (tt[2] && 0xFFFFFFFF);
453  c += (uint32_t) (tt[2] >> 32);
454  sc_hash_mix (a, b, c);
455  a += (uint32_t) (tt[3] && 0xFFFFFFFF);
456  b += (uint32_t) (tt[3] >> 32);
457 #endif
458  sc_hash_final (a, b, c);
459 
460  return (unsigned) c;
461 }
462 
463 /*@unused@*/
464 static inline int
465 p4est_topidx_is_sorted (p4est_topidx_t * t, int length)
466 {
467  int i;
468 
469  for (i = 1; i < length; ++i) {
470  if (t[i - 1] > t[i]) {
471  return 0;
472  }
473  }
474  return 1;
475 }
476 
477 /*@unused@*/
478 static inline void
479 p4est_topidx_bsort (p4est_topidx_t * t, int length)
480 {
481  int i, j;
482  p4est_topidx_t tswap;
483 
484  /* go through all elements except the last */
485  for (i = length - 1; i > 0; --i) {
486  /* bubble up the first element until before position i */
487  for (j = 0; j < i; ++j) {
488  if (t[j] > t[j + 1]) {
489  tswap = t[j + 1];
490  t[j + 1] = t[j];
491  t[j] = tswap;
492  }
493  }
494  }
495  P4EST_ASSERT (p4est_topidx_is_sorted (t, length));
496 }
497 
498 /*@unused@*/
499 static inline uint64_t
500 p4est_partition_cut_uint64 (uint64_t global_num, int p, int num_procs)
501 {
502  uint64_t result;
503 
504  /* In theory, a double * double product should never overflow
505  due to the 15-bit exponent used internally on x87 and above.
506  Also in theory, 80-bit floats should be used internally,
507  and multiply/divide associativity goes left-to-right.
508  Still checking for funny stuff just to be sure. */
509 
510  P4EST_ASSERT (0 <= p && p <= num_procs);
511 
512  if (p == num_procs) {
513  /* prevent roundoff error and division by zero */
514  return global_num;
515  }
516 
517  result = (uint64_t)
518  (((long double) global_num * (double) p) / (double) num_procs);
519 
520  P4EST_ASSERT (result <= global_num);
521 
522  return result;
523 }
524 
525 /*@unused@*/
526 static inline p4est_gloidx_t
527 p4est_partition_cut_gloidx (p4est_gloidx_t global_num, int p, int num_procs)
528 {
529  p4est_gloidx_t result;
530 
531  /* In theory, a double * double product should never overflow
532  due to the 15-bit exponent used internally on x87 and above.
533  Also in theory, 80-bit floats should be used internally,
534  and multiply/divide associativity goes left-to-right.
535  Still checking for funny stuff just to be sure. */
536 
537  P4EST_ASSERT (global_num >= 0);
538  P4EST_ASSERT (0 <= p && p <= num_procs);
539 
540  if (p == num_procs) {
541  /* prevent roundoff error and division by zero */
542  return global_num;
543  }
544 
545  result = (p4est_gloidx_t)
546  (((long double) global_num * (double) p) / (double) num_procs);
547 
548  P4EST_ASSERT (0 <= result && result <= global_num);
549 
550  return result;
551 }
552 
561 const char *p4est_version (void);
562 
568 
574 
575 SC_EXTERN_C_END;
576 
577 #endif /* !P4EST_BASE_H */
int32_t p4est_qcoord_t
Typedef for quadrant coordinates.
Definition: p4est_base.h:81
enum p4est_comm_tag p4est_comm_tag_t
Tags for MPI messages.
SC_DLL_PUBLIC int p4est_package_id
The package id for p4est within libsc.
int p4est_version_major(void)
Return the major version of p4est.
int p4est_have_zlib(void)
Check for a sufficiently recent zlib installation.
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition: p4est_base.h:93
int p4est_get_package_id(void)
Query the package identity as registered in libsc.
p4est_comm_tag
Tags for MPI messages.
Definition: p4est_base.h:131
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:106
void p4est_init(sc_log_handler_t log_handler, int log_threshold)
Registers p4est with the SC Library and sets the logging behavior.
int p4est_version_minor(void)
Return the minor version of p4est.
int64_t p4est_gloidx_t
Typedef for globally unique indexing of quadrants.
Definition: p4est_base.h:118
const char * p4est_version(void)
Return the full version of p4est.
int p4est_is_initialized(void)
Return whether p4est has been initialized or not.