p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
|
General support types and functions. More...
#include <p4est_config.h>
#include <sc_config.h>
#include <sc_containers.h>
Go to the source code of this file.
Macros | |
#define | _p4est_const _sc_const |
#define | P4EST_COMM_TRANSFER_NULL |
We do no longer dereference unneeded pointers in p4est_transfer_. | |
#define | P4EST_CONN_DISK_PERIODIC |
The p4est_connectivity_new_disk function now accepts a bool arg. More... | |
#define | P4EST_CONN_REORDER_NEWID |
The p4est_connectivity_reorder_newid function exists. | |
#define | P4EST_SEARCH_LOCAL |
The p4est_search_local function replaces p4est_search. More... | |
#define | P4EST_VTK_CELL_DATAV |
We expose the p4est_vtk_write_cell_datav function. | |
#define | p4est_qcoord_compare sc_int32_compare |
#define | P4EST_QCOORD_BITS 32 |
#define | P4EST_MPI_QCOORD sc_MPI_INT |
#define | P4EST_VTK_QCOORD "Int32" |
#define | P4EST_F90_QCOORD INTEGER(KIND=C_INT32_T) |
#define | P4EST_QCOORD_MIN INT32_MIN |
#define | P4EST_QCOORD_MAX INT32_MAX |
#define | P4EST_QCOORD_1 ((p4est_qcoord_t) 1) |
#define | P4EST_QCOORD_ABS(x) ((p4est_qcoord_t) labs ((long) (x))) |
#define | p4est_topidx_compare sc_int32_compare |
#define | P4EST_TOPIDX_BITS 32 |
#define | P4EST_MPI_TOPIDX sc_MPI_INT |
#define | P4EST_VTK_TOPIDX "Int32" |
#define | P4EST_F90_TOPIDX INTEGER(KIND=C_INT32_T) |
#define | P4EST_TOPIDX_MIN INT32_MIN |
#define | P4EST_TOPIDX_MAX INT32_MAX |
#define | P4EST_TOPIDX_FITS_32 1 |
#define | P4EST_TOPIDX_1 ((p4est_topidx_t) 1) |
#define | P4EST_TOPIDX_ABS(x) ((p4est_topidx_t) labs ((long) (x))) |
#define | p4est_locidx_compare sc_int32_compare |
#define | P4EST_LOCIDX_BITS 32 |
#define | P4EST_MPI_LOCIDX sc_MPI_INT |
#define | P4EST_VTK_LOCIDX "Int32" |
#define | P4EST_F90_LOCIDX INTEGER(KIND=C_INT32_T) |
#define | P4EST_LOCIDX_MIN INT32_MIN |
#define | P4EST_LOCIDX_MAX INT32_MAX |
#define | P4EST_LOCIDX_1 ((p4est_locidx_t) 1) |
#define | P4EST_LOCIDX_ABS(x) ((p4est_locidx_t) labs ((long) (x))) |
#define | p4est_gloidx_compare sc_int64_compare |
#define | P4EST_GLOIDX_BITS 64 |
#define | P4EST_MPI_GLOIDX sc_MPI_LONG_LONG_INT |
#define | P4EST_VTK_GLOIDX "Int64" |
#define | P4EST_F90_GLOIDX INTEGER(KIND=C_INT64_T) |
#define | P4EST_GLOIDX_MIN INT64_MIN |
#define | P4EST_GLOIDX_MAX INT64_MAX |
#define | P4EST_GLOIDX_1 ((p4est_gloidx_t) 1) |
#define | P4EST_GLOIDX_ABS(x) ((p4est_gloidx_t) llabs ((long long) (x))) |
#define | P4EST_ASSERT(c) SC_NOOP () |
#define | P4EST_EXECUTE_ASSERT_FALSE(expression) do { (void) (expression); } while (0) |
#define | P4EST_EXECUTE_ASSERT_TRUE(expression) do { (void) (expression); } while (0) |
#define | P4EST_EXECUTE_ASSERT_INT(expression, ival) do { (void) (expression); } while (0) |
#define | P4EST_EXECUTE_ASSERT_TOPIDX(expression, tval) do { (void) (expression); } while (0) |
#define | P4EST_DEBUG_EXECUTE(expression) SC_NOOP () |
#define | P4EST_ALLOC(t, n) |
allocate a t-array with n elements More... | |
#define | P4EST_ALLOC_ZERO(t, n) |
allocate a t-array with n elements and zero More... | |
#define | P4EST_REALLOC(p, t, n) |
reallocate the t-array p with n elements More... | |
#define | P4EST_STRDUP(s) sc_strdup (p4est_package_id, (s)) |
duplicate a string | |
#define | P4EST_FREE(p) sc_free (p4est_package_id, (p)) |
free an allocated array | |
#define | P4EST_GLOBAL_LOG(p, s) SC_GEN_LOG (p4est_package_id, SC_LC_GLOBAL, (p), (s)) |
#define | P4EST_LOG(p, s) SC_GEN_LOG (p4est_package_id, SC_LC_NORMAL, (p), (s)) |
#define | P4EST_GLOBAL_LOGF(p, f, ...) SC_GEN_LOGF (p4est_package_id, SC_LC_GLOBAL, (p), (f), __VA_ARGS__) |
#define | P4EST_LOGF(p, f, ...) SC_GEN_LOGF (p4est_package_id, SC_LC_NORMAL, (p), (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_TRACE(s) P4EST_GLOBAL_LOG (SC_LP_TRACE, (s)) |
#define | P4EST_GLOBAL_LDEBUG(s) P4EST_GLOBAL_LOG (SC_LP_DEBUG, (s)) |
#define | P4EST_GLOBAL_VERBOSE(s) P4EST_GLOBAL_LOG (SC_LP_VERBOSE, (s)) |
#define | P4EST_GLOBAL_INFO(s) P4EST_GLOBAL_LOG (SC_LP_INFO, (s)) |
#define | P4EST_GLOBAL_STATISTICS(s) P4EST_GLOBAL_LOG (SC_LP_STATISTICS, (s)) |
#define | P4EST_GLOBAL_PRODUCTION(s) P4EST_GLOBAL_LOG (SC_LP_PRODUCTION, (s)) |
#define | P4EST_GLOBAL_ESSENTIAL(s) P4EST_GLOBAL_LOG (SC_LP_ESSENTIAL, (s)) |
#define | P4EST_GLOBAL_LERROR(s) P4EST_GLOBAL_LOG (SC_LP_ERROR, (s)) |
#define | P4EST_GLOBAL_TRACEF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_TRACE, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_LDEBUGF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_DEBUG, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_VERBOSEF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_VERBOSE, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_INFOF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_INFO, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_STATISTICSF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_STATISTICS, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_PRODUCTIONF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_PRODUCTION, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_ESSENTIALF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_ESSENTIAL, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_LERRORF(f, ...) P4EST_GLOBAL_LOGF (SC_LP_ERROR, (f), __VA_ARGS__) |
#define | P4EST_GLOBAL_NOTICE P4EST_GLOBAL_STATISTICS |
#define | P4EST_GLOBAL_NOTICEF P4EST_GLOBAL_STATISTICSF |
#define | P4EST_TRACE(s) P4EST_LOG (SC_LP_TRACE, (s)) |
#define | P4EST_LDEBUG(s) P4EST_LOG (SC_LP_DEBUG, (s)) |
#define | P4EST_VERBOSE(s) P4EST_LOG (SC_LP_VERBOSE, (s)) |
#define | P4EST_INFO(s) P4EST_LOG (SC_LP_INFO, (s)) |
#define | P4EST_STATISTICS(s) P4EST_LOG (SC_LP_STATISTICS, (s)) |
#define | P4EST_PRODUCTION(s) P4EST_LOG (SC_LP_PRODUCTION, (s)) |
#define | P4EST_ESSENTIAL(s) P4EST_LOG (SC_LP_ESSENTIAL, (s)) |
#define | P4EST_LERROR(s) P4EST_LOG (SC_LP_ERROR, (s)) |
#define | P4EST_TRACEF(f, ...) P4EST_LOGF (SC_LP_TRACE, (f), __VA_ARGS__) |
#define | P4EST_LDEBUGF(f, ...) P4EST_LOGF (SC_LP_DEBUG, (f), __VA_ARGS__) |
#define | P4EST_VERBOSEF(f, ...) P4EST_LOGF (SC_LP_VERBOSE, (f), __VA_ARGS__) |
#define | P4EST_INFOF(f, ...) P4EST_LOGF (SC_LP_INFO, (f), __VA_ARGS__) |
#define | P4EST_STATISTICSF(f, ...) P4EST_LOGF (SC_LP_STATISTICS, (f), __VA_ARGS__) |
#define | P4EST_PRODUCTIONF(f, ...) P4EST_LOGF (SC_LP_PRODUCTION, (f), __VA_ARGS__) |
#define | P4EST_ESSENTIALF(f, ...) P4EST_LOGF (SC_LP_ESSENTIAL, (f), __VA_ARGS__) |
#define | P4EST_LERRORF(f, ...) P4EST_LOGF (SC_LP_ERROR, (f), __VA_ARGS__) |
#define | P4EST_NOTICE P4EST_STATISTICS |
#define | P4EST_NOTICEF P4EST_STATISTICSF |
Typedefs | |
typedef int32_t | p4est_qcoord_t |
Typedef for quadrant coordinates. | |
typedef int32_t | p4est_topidx_t |
Typedef for counting topological entities (trees, tree vertices). | |
typedef int32_t | p4est_locidx_t |
Typedef for processor-local indexing of quadrants and nodes. | |
typedef int64_t | p4est_gloidx_t |
Typedef for globally unique indexing of quadrants. | |
typedef enum p4est_comm_tag | p4est_comm_tag_t |
Tags for MPI messages. | |
Enumerations | |
enum | p4est_comm_tag { P4EST_COMM_TAG_FIRST = SC_TAG_FIRST , P4EST_COMM_COUNT_PERTREE = SC_TAG_LAST , P4EST_COMM_BALANCE_FIRST_COUNT , P4EST_COMM_BALANCE_FIRST_LOAD , P4EST_COMM_BALANCE_SECOND_COUNT , P4EST_COMM_BALANCE_SECOND_LOAD , P4EST_COMM_PARTITION_GIVEN , P4EST_COMM_PARTITION_WEIGHTED_LOW , P4EST_COMM_PARTITION_WEIGHTED_HIGH , P4EST_COMM_PARTITION_CORRECTION , P4EST_COMM_GHOST_COUNT , P4EST_COMM_GHOST_LOAD , P4EST_COMM_GHOST_EXCHANGE , P4EST_COMM_GHOST_EXPAND_COUNT , P4EST_COMM_GHOST_EXPAND_LOAD , P4EST_COMM_GHOST_SUPPORT_COUNT , P4EST_COMM_GHOST_SUPPORT_LOAD , P4EST_COMM_GHOST_CHECKSUM , P4EST_COMM_NODES_QUERY , P4EST_COMM_NODES_REPLY , P4EST_COMM_SAVE , P4EST_COMM_LNODES_TEST , P4EST_COMM_LNODES_PASS , P4EST_COMM_LNODES_OWNED , P4EST_COMM_LNODES_ALL , P4EST_COMM_TAG_LAST } |
Tags for MPI messages. | |
Functions | |
void | P4EST_GLOBAL_LOGF (int priority, const char *fmt,...) |
void | P4EST_LOGF (int priority, const char *fmt,...) |
void | P4EST_GLOBAL_TRACEF (const char *fmt,...) |
void | P4EST_GLOBAL_LDEBUGF (const char *fmt,...) |
void | P4EST_GLOBAL_VERBOSEF (const char *fmt,...) |
void | P4EST_GLOBAL_INFOF (const char *fmt,...) |
void | P4EST_GLOBAL_STATISTICSF (const char *fmt,...) |
void | P4EST_GLOBAL_PRODUCTIONF (const char *fmt,...) |
void | P4EST_GLOBAL_ESSENTIALF (const char *fmt,...) |
void | P4EST_GLOBAL_LERRORF (const char *fmt,...) |
void | P4EST_TRACEF (const char *fmt,...) |
void | P4EST_LDEBUGF (const char *fmt,...) |
void | P4EST_VERBOSEF (const char *fmt,...) |
void | P4EST_INFOF (const char *fmt,...) |
void | P4EST_STATISTICSF (const char *fmt,...) |
void | P4EST_PRODUCTIONF (const char *fmt,...) |
void | P4EST_ESSENTIALF (const char *fmt,...) |
void | P4EST_LERRORF (const char *fmt,...) |
void | p4est_init (sc_log_handler_t log_handler, int log_threshold) |
Registers p4est with the SC Library and sets the logging behavior. More... | |
int | p4est_is_initialized (void) |
Return whether p4est has been initialized or not. More... | |
int | p4est_have_zlib (void) |
Check for a sufficiently recent zlib installation. More... | |
int | p4est_get_package_id (void) |
Query the package identity as registered in libsc. More... | |
const char * | p4est_version (void) |
Return the full version of p4est. More... | |
int | p4est_version_major (void) |
Return the major version of p4est. More... | |
int | p4est_version_minor (void) |
Return the minor version of p4est. More... | |
Variables | |
int | p4est_package_id |
the libsc package id for p4est (set in p4est_init()) | |
General support types and functions.
#define P4EST_ALLOC | ( | t, | |
n | |||
) |
allocate a t-array with n elements
#define P4EST_ALLOC_ZERO | ( | t, | |
n | |||
) |
allocate a t-array with n elements and zero
#define P4EST_CONN_DISK_PERIODIC |
The p4est_connectivity_new_disk function now accepts a bool arg.
The same holds for p4est_wrap_new_disk.
#define P4EST_REALLOC | ( | p, | |
t, | |||
n | |||
) |
reallocate the t-array p with n elements
#define P4EST_SEARCH_LOCAL |
The p4est_search_local function replaces p4est_search.
The latter function is still available with updated internal semantics. Furthermore, we have added p4est_search_partition to search the parallel partition without accessing any local elements, and p4est_search_all that combines the two.
int p4est_get_package_id | ( | void | ) |
Query the package identity as registered in libsc.
int p4est_have_zlib | ( | void | ) |
Check for a sufficiently recent zlib installation.
void p4est_init | ( | sc_log_handler_t | log_handler, |
int | log_threshold | ||
) |
Registers p4est with the SC Library and sets the logging behavior.
This function is optional. This function must only be called before additional threads are created. If this function is not called or called with log_handler == NULL, the default SC log handler will be used. If this function is not called or called with log_threshold == SC_LP_DEFAULT, the default SC log threshold will be used. The default SC log settings can be changed with sc_set_log_defaults ().
int p4est_is_initialized | ( | void | ) |
Return whether p4est has been initialized or not.
Keep in mind that p4est_init is an optional function but it helps with proper parallel logging.
Currently there is no inverse to p4est_init, and no way to deinit it. This is ok since initialization generally does no harm. Just do not call libsc's finalize function while p4est is still in use.
const char * p4est_version | ( | void | ) |
int p4est_version_major | ( | void | ) |