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

Go to the source code of this file.

Macros

#define _BOTTOM   (2*point.j - GHOSTS)
 
#define _TOP   (_BOTTOM + 1)
 
#define _LEFT   (2*point.i - GHOSTS)
 
#define _RIGHT   (_LEFT + 1)
 
#define _BACK   (2*point.k - GHOSTS)
 
#define _FRONT   (_BACK + 1)
 
#define STACKSIZE   20
 
#define _push(b, c, d, e, f)
 
#define _pop()
 

Functions

is a stack based implementation ofrecursive (). It is about 12% slower than the recursive *version and 60% slower than simple array traversal. **This article was useful
 
macro2 for (int _i=0;_i< _N;_i++)
 
macro2 foreach_cell_all ()
 
macro2 foreach_cell_post_root (bool condition, Point root)
 
macro2 foreach_cell_post (bool condition)
 
macro2 foreach_cell_post_all (bool condition)
 
macro2 foreach_cell_restore (ivec d=Dimensions, int rootlevel=0)
 

Macro Definition Documentation

◆ _BACK

#define _BACK   (2*point.k - GHOSTS)

◆ _BOTTOM

#define _BOTTOM   (2*point.j - GHOSTS)

◆ _FRONT

#define _FRONT   (_BACK + 1)

◆ _LEFT

#define _LEFT   (2*point.i - GHOSTS)

◆ _pop

#define _pop ( )
Value:
{ point.level = stack[_s].l; \
point.i = stack[_s].i; point.j = stack[_s].j; \
stage = stack[_s].stage; _s--; }
int x
Definition common.h:76
Point point
Definition conserving.h:86
int stack
Definition include.c:991
int level
Definition linear.h:23
int i
Definition linear.h:23

◆ _push

#define _push (   b,
  c,
  d,
  e,
  f 
)
Value:
{ _s++; stack[_s].l = b; \
stack[_s].i = c; stack[_s].j = d; \
stack[_s].stage = f; }
scalar f[]
The primary fields are:
Definition two-phase.h:56
double d[2]
Definition embed.h:383
size *double * b
scalar c
Definition vof.h:57

◆ _RIGHT

#define _RIGHT   (_LEFT + 1)

◆ _TOP

#define _TOP   (_BOTTOM + 1)

◆ STACKSIZE

#define STACKSIZE   20

Function Documentation

◆ for()

macro2 for ( )

Definition at line 127 of file foreach_cell.h.

References GHOSTS, and x.

◆ foreach_cell_all()

macro2 foreach_cell_all ( )

Definition at line 142 of file foreach_cell.h.

References dimension, GHOSTS, Period, and x.

Referenced by balance(), check_depth(), foreach_tree(), is_newpid(), tree_check(), and update_cache_f().

Here is the caller graph for this function:

◆ foreach_cell_post()

macro2 foreach_cell_post ( bool  condition)

Definition at line 256 of file foreach_cell.h.

References foreach_cell_post_root(), GHOSTS, and x.

Referenced by balance(), mpi_partitioning(), and restore_mpi().

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

◆ foreach_cell_post_all()

macro2 foreach_cell_post_all ( bool  condition)

Definition at line 271 of file foreach_cell.h.

References dimension, foreach_cell_post_root(), GHOSTS, and x.

Referenced by is_newpid().

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

◆ foreach_cell_post_root()

macro2 foreach_cell_post_root ( bool  condition,
Point  root 
)

Definition at line 157 of file foreach_cell.h.

References _BACK, _BOTTOM, _FRONT, _LEFT, _pop, _push, _RIGHT, _TOP, allocated(), Grid::depth, grid, i, Point::i, j, k, l, Point::level, point, stack, STACKSIZE, and x.

Referenced by foreach_cell_post(), and foreach_cell_post_all().

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

◆ foreach_cell_restore()

macro2 foreach_cell_restore ( ivec  d = Dimensions,
int  rootlevel = 0 
)

Definition at line 308 of file foreach_cell.h.

References d, GHOSTS, and x.

◆ recursive()

is a stack based implementation of * recursive ( )

Definition at line 7 of file foreach_cell.h.

References _BOTTOM, _LEFT, _RIGHT, _TOP, Grid::depth, grid, Point::level, point, recursive(), and x.

Referenced by recursive().

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