Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
balance.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NewPid
 

Macros

#define NEWPID()   ((NewPid *)&val(newpid,0,0,0))
 

Functions

if TRASH define is_newpid ()(!isnan(val(newpid
 
if TRASH define &&NewPid *& val (newpid, 0, 0, 0)) -> pid > 0) @else @ define is_newpid()(((NewPid *)&val(newpid, 0, 0, 0)) ->pid > 0) @endif Array *linear_tree(size_t size, scalar newpid)
 
macro2 foreach_tree (Array *t, size_t size, scalar *list, scalar newpid=newpid)
 
Arrayneighborhood (scalar newpid, int nextpid, FILE *fp)
 
static void send_tree (Array *a, int to, MPI_Request *r)
 
static void receive_tree (int from, scalar newpid, FILE *fp)
 
static void wait_tree (Array *a, MPI_Request *r)
 
static void check_flags ()
 
trace bool balance ()
 
void mpi_boundary_update (scalar *list)
 

Variables

struct { 
 
   int   min 
 
   bool   leaves 
 
   int   npe 
 
mpi 
 

Macro Definition Documentation

◆ NEWPID

#define NEWPID ( )    ((NewPid *)&val(newpid,0,0,0))

Definition at line 10 of file balance.h.

Function Documentation

◆ balance()

trace bool balance ( )

Definition at line 202 of file balance.h.

References _i, active, array_free(), array_new(), assert, balanced_pid(), border, boundary_iterate, cell(), check_flags(), clamp(), coarse(), coarsen_cell_recursive(), depth, fflush(), flag_border_cells(), flags, foreach_cell_all(), foreach_cell_post(), fp, free_children(), grid, is_newpid(), is_prolongation, l, leaf, level, lfopen(), max, Grid::maxdepth, mpi, mpi_boundary_update_buffers(), Grid::n, neighborhood(), NEWPID, nl, npe, nt, output_cells(), point, receive_tree(), send_tree(), t, Grid::tn, tree, wait_tree(), x, y, z, z_indexing(), and zn.

Referenced by mpi_boundary_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_flags()

static void check_flags ( )
static

Definition at line 180 of file balance.h.

References _i, allocated(), assert, cell(), i, user, and x.

Referenced by balance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ foreach_tree()

macro2 foreach_tree ( Array t,
size_t  size,
scalar list,
scalar  newpid = newpid 
)

Definition at line 67 of file balance.h.

References _i, alloc_children(), assert, c, cell(), foreach_cell_all(), is_newpid(), leaf, list, NEWPID, point, refine_cell(), size, t, user, and x.

Referenced by receive_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_newpid()

if TRASH define is_newpid ( )

References a, array_append(), array_new(), assert, cell(), foreach_cell_all(), foreach_cell_post_all(), is_refined_check(), leaf, level, NEWPID, size, user, and x.

Referenced by balance(), foreach_tree(), and neighborhood().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mpi_boundary_update()

void mpi_boundary_update ( scalar list)

Definition at line 396 of file balance.h.

References balance(), boundary, grid, list, mpi_boundary_update_buffers(), s, set_dirty_stencil(), Grid::tn, and x.

Referenced by restore_mpi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ neighborhood()

Array * neighborhood ( scalar  newpid,
int  nextpid,
FILE fp 
)

Definition at line 97 of file balance.h.

References _i, cell(), datasize, fp, is_newpid(), is_refined, NEWPID, user, x, y, and z.

Referenced by balance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive_tree()

static void receive_tree ( int  from,
scalar  newpid,
FILE fp 
)
static

Definition at line 146 of file balance.h.

References a, assert, c, cell(), datasize, foreach_tree(), fp, free(), leaf, MOVED_TAG, mpi_recv_check(), NEWPID, tree, x, y, and z.

Referenced by balance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_tree()

static void send_tree ( Array a,
int  to,
MPI_Request r 
)
static

Definition at line 137 of file balance.h.

References a, MOVED_TAG, tree, and x.

Referenced by balance().

Here is the caller graph for this function:

◆ val()

if TRASH define &&NewPid *& val ( newpid  ,
,
,
 
) -> pid > 0) @else @ define is_newpid() (((NewPid *)&val(newpid,0,0,0))->pid > 0) @endif Array * linear_tree (size_t size, scalar newpid)

Definition at line 13 of file balance.h.

Referenced by args(), assemble_node(), box_boundary_level(), box_boundary_level_normal(), colormap_color(), display_control_update(), embed_flux(), embed_gradient(), embed_interpolate(), if(), init_const_scalar(), init_const_vector(), interpolate(), new_const_scalar(), new_const_vector(), refine_injection(), reset(), restore_mpi(), restriction_embed_linear(), and zarea().

Here is the caller graph for this function:

◆ wait_tree()

static void wait_tree ( Array a,
MPI_Request r 
)
static

Definition at line 173 of file balance.h.

References a, and x.

Referenced by balance().

Here is the caller graph for this function:

Variable Documentation

◆ leaves

bool leaves

Definition at line 193 of file balance.h.

Referenced by sizes(), subtree_size(), and z_indexing().

◆ min

◆ [struct]

struct { ... } mpi
Initial value:
= {
1,
true
}

Referenced by balance(), debug_mpi(), mpi_boundary_new(), mpi_boundary_refine(), and timer_timing().

◆ npe