|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
Go to the source code of this file.
Data Structures | |
| struct | Rcv |
| struct | RcvPid |
| struct | SndRcv |
| struct | MpiBoundary |
| struct | Remote |
Macros | |
| #define | BOUNDARY_TAG(level) (level) |
| #define | COARSEN_TAG(level) ((level) + 64) |
| #define | REFINE_TAG() (128) |
| #define | MOVED_TAG() (256) |
| #define | is_remote(cell) (cell.pid >= 0 && cell.pid != pid()) |
| #define | REMOTE() ((Remote *)&val(remote,0)) |
Variables | |
| int | debug_iteration = -1 |
| static Boundary * | mpi_boundary = NULL |
Definition at line 156 of file tree-mpi.h.
Definition at line 157 of file tree-mpi.h.
Definition at line 724 of file tree-mpi.h.
| #define MOVED_TAG | ( | ) | (256) |
Definition at line 159 of file tree-mpi.h.
| #define REFINE_TAG | ( | ) | (128) |
Definition at line 158 of file tree-mpi.h.
Definition at line 726 of file tree-mpi.h.
References array_append(), i, int, p, and x.
Referenced by locals_pids(), mpi_boundary_update_buffers(), and root_pids().
|
static |
Definition at line 163 of file tree-mpi.h.
References allocated(), b, Rcv::buf, debug_mpi(), dimension, fflush(), foreach_cache_level(), free(), Rcv::halo, i, j, k, l, nodata, Rcv::pid, s, size, v, and x.
Referenced by rcv_pid_receive().
Definition at line 1244 of file tree-mpi.h.
References index, max, min, nr, nt, and x.
Referenced by balance(), mpi_partitioning(), and restore_mpi().
|
static |
Definition at line 34 of file tree-mpi.h.
Referenced by rcv_append(), and rcv_pid_pointer().
Definition at line 1090 of file tree-mpi.h.
References assert, depth, foreach_cell_all(), fp, i, j, l, L0, Layer::len, level, Layer::m, max, Layer::nc, tree, x, X0, and Y0.
Referenced by mpi_boundary_coarsen().
Definition at line 787 of file tree-mpi.h.
References debug_mpi(), depth, fflush(), free(), i, j, k, l, matrix_free(), matrix_new(), npe, qmalloc, rcv_pid_row(), and x.
Referenced by mpi_boundary_update_buffers().
Definition at line 540 of file tree-mpi.h.
References _i, assert, cell(), depth, fopen_prefix(), foreach_halo, fp, i, is_refined, l, leaf, level, Rcv::maxdepth, mpi, mpi_boundary, n, RcvPid::npid, Rcv::pid, RcvPid::rcv, rcv_pid_print(), x, y, and z.
Referenced by apply_bc(), check_snd_rcv_matrix(), mpi_boundary_update_buffers(), and mpi_recv_check().
Definition at line 1200 of file tree-mpi.h.
References _i, border, cell(), flags, GHOSTS, is_refined_check(), level, and x.
Referenced by balance(), mpi_partitioning(), and restore_mpi().
Definition at line 523 of file tree-mpi.h.
References debug_iteration, fname, fp, and x.
Referenced by debug_mpi().
Definition at line 851 of file tree-mpi.h.
Referenced by mpi_boundary_update_buffers().
Definition at line 708 of file tree-mpi.h.
References dimension, dp, scalar::i, Point::i, is_refined, neighbor(), p, point, x, y, and z.
Referenced by locals_pids(), and mpi_boundary_update_buffers().
Definition at line 698 of file tree-mpi.h.
References cell(), is_refined, and x.
Referenced by mpi_boundary_update_buffers(), and restore_mpi().
Definition at line 299 of file tree-mpi.h.
Referenced by rcv_pid_receive(), and rcv_pid_send().
Definition at line 734 of file tree-mpi.h.
References append_pid(), cell(), int, is_local_prolongation(), is_refined, is_remote, p, point, and x.
Referenced by mpi_boundary_update_buffers().
Definition at line 482 of file tree-mpi.h.
References array_free(), b, free(), m(), and snd_rcv_destroy().
Referenced by mpi_boundary_new().
Definition at line 494 of file tree-mpi.h.
References b, l, list, m(), and rcv_pid_sync().
Referenced by mpi_boundary_coarsen(), and mpi_boundary_new().
| void mpi_boundary_new | ( | ) |
Definition at line 508 of file tree-mpi.h.
References add_boundary(), array_new(), _Boundary::destroy, _Boundary::level, mpi, mpi_boundary, mpi_boundary_destroy(), mpi_boundary_level(), mpi_boundary_restriction(), qcalloc, _Boundary::restriction, and snd_rcv_init().
Referenced by init_grid().
Definition at line 1020 of file tree-mpi.h.
Referenced by mpi_boundary_refine().
Definition at line 502 of file tree-mpi.h.
References b, l, list, m(), and rcv_pid_sync().
Referenced by mpi_boundary_new().
Definition at line 860 of file tree-mpi.h.
References _i, append_pid(), cell(), check_snd_rcv_matrix(), coarsen_cell(), debug_mpi(), depth, free(), has_local_child(), i, is_local_prolongation(), is_refined, is_remote, is_root(), l, level, locals_pids(), m(), mpi_boundary, n, npe, p, point, SndRcv::rcv, rcv_pid_append(), rcv_pid_append_pids(), restriction, root_pids(), SndRcv::snd, snd_rcv_free(), t, tree_check(), user, and x.
Referenced by balance(), mpi_boundary_update(), and mpi_partitioning().
Definition at line 1255 of file tree-mpi.h.
References balanced_pid(), cell(), flag_border_cells(), foreach_cell_post(), i, mpi_boundary_update_buffers(), npe, nt, tree, and x.
|
static |
Definition at line 236 of file tree-mpi.h.
References assert, buf, debug_mpi(), fflush(), source, t, tag, and x.
Referenced by mpi_boundary_refine(), rcv_pid_receive(), and receive_tree().
|
static |
Definition at line 293 of file tree-mpi.h.
References x.
Referenced by rcv_pid_receive().
Definition at line 40 of file tree-mpi.h.
References cache_level_append(), cache_level_init(), Rcv::depth, Rcv::halo, j, level, Rcv::maxdepth, point, and x.
Referenced by rcv_pid_append().
Definition at line 72 of file tree-mpi.h.
References Rcv::depth, free(), Rcv::halo, i, CacheLevel::n, CacheLevel::p, and rcv_free_buf().
Referenced by rcv_pid_destroy().
Definition at line 61 of file tree-mpi.h.
References Rcv::buf, free(), Rcv::r, and x.
Referenced by rcv_destroy(), and rcv_pid_wait().
Definition at line 109 of file tree-mpi.h.
References p, point, rcv_append(), and rcv_pid_pointer().
Referenced by mpi_boundary_update_buffers().
Definition at line 114 of file tree-mpi.h.
References a, array_append(), i, int, j, p, and x.
Referenced by mpi_boundary_update_buffers().
Definition at line 145 of file tree-mpi.h.
References free(), i, p, and rcv_destroy().
Referenced by snd_rcv_destroy(), and snd_rcv_free().
Definition at line 81 of file tree-mpi.h.
References RcvPid::name, qcalloc, and strdup().
Referenced by snd_rcv_free(), and snd_rcv_init().
Definition at line 88 of file tree-mpi.h.
References assert, Rcv::buf, cache_level_init(), Rcv::depth, Rcv::halo, i, Rcv::maxdepth, npe, p, Rcv::pid, qmalloc, and x.
Referenced by rcv_pid_append().
Definition at line 139 of file tree-mpi.h.
References fp, i, p, rcv_print(), and x.
Referenced by debug_mpi().
|
static |
Definition at line 313 of file tree-mpi.h.
References apply_bc(), assert, BOUNDARY_TAG, Rcv::buf, depth, dimension, fflush(), Rcv::halo, i, l, list, list_lenb(), m(), mpi_recv_check(), mpi_waitany(), CacheLevel::n, nr, Rcv::pid, s, vectors_lenb(), and x.
Referenced by rcv_pid_sync().
Definition at line 776 of file tree-mpi.h.
References depth, Rcv::halo, i, l, m(), CacheLevel::n, npe, Rcv::pid, and x.
Referenced by check_snd_rcv_matrix().
|
static |
Definition at line 375 of file tree-mpi.h.
References allocated(), assert, b, BOUNDARY_TAG, Rcv::buf, depth, dimension, fflush(), foreach_cache_level(), Rcv::halo, i, j, k, l, list, list_lenb(), m(), CacheLevel::n, nodata, Rcv::pid, Rcv::r, s, v, vectors_lenb(), and x.
Referenced by rcv_pid_sync().
Definition at line 444 of file tree-mpi.h.
References free(), l, list_add(), m(), rcv_pid_receive(), rcv_pid_send(), rcv_pid_wait(), restriction_vertex(), s, vectors_add(), and x.
Referenced by mpi_boundary_level(), and mpi_boundary_restriction().
Definition at line 368 of file tree-mpi.h.
References i, m(), and rcv_free_buf().
Referenced by rcv_pid_sync().
Definition at line 127 of file tree-mpi.h.
References fname, fp, i, p, Rcv::pid, rcv_print(), and x.
Definition at line 53 of file tree-mpi.h.
References Rcv::depth, foreach_cache_level(), fp, Rcv::halo, l, level, CacheLevel::n, Rcv::pid, x, y, and z.
Referenced by rcv_pid_print(), and rcv_pid_write().
Definition at line 1297 of file tree-mpi.h.
References _i, balanced_pid(), cell(), cm, flag_border_cells(), flags, fm, foreach_cell_post(), fp, free(), scalar::i, index, is_root(), leaf, level, list, list_append(), list_concat(), list_len(), mpi_boundary_update(), npe, nt, NewPid::pid, point, refine_cell(), s, size, user, val(), and x.
Definition at line 762 of file tree-mpi.h.
References append_pid(), cell(), int, is_remote, and x.
Referenced by mpi_boundary_update_buffers().
Definition at line 465 of file tree-mpi.h.
References m(), and rcv_pid_destroy().
Referenced by mpi_boundary_destroy().
Definition at line 687 of file tree-mpi.h.
References p, rcv_pid_destroy(), rcv_pid_new(), and x.
Referenced by mpi_boundary_update_buffers().
Definition at line 471 of file tree-mpi.h.
References m(), rcv_pid_new(), s, and x.
Referenced by mpi_boundary_new().
Definition at line 306 of file tree-mpi.h.
Referenced by rcv_pid_receive(), and rcv_pid_send().
If leaves is true only leaves are indexed, otherwise all active cells are indexed.
On the master process (pid() == 0), the function returns the (global) maximum index (and -1 on all other processes).
On a single processor, we would just need something like (for leaves)
In parallel, this is a bit more difficult.
We first compute the size of each subtree.
The maximum index value is the size of the entire tree (i.e. the value of size in the root cell on the master process) minus one.
fixme: doc
Definition at line 1443 of file tree-mpi.h.
References _i, boundary_iterate, cell(), depth, i, index, l, leaves, level, restriction, size, subtree_size(), and x.
| int debug_iteration = -1 |
Definition at line 4 of file tree-mpi.h.
Referenced by fopen_prefix().
Definition at line 154 of file tree-mpi.h.
Referenced by debug_mpi(), mpi_boundary_coarsen(), mpi_boundary_new(), mpi_boundary_refine(), and mpi_boundary_update_buffers().