AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Functions
Mirror.cl File Reference

Mirroring process for the symmetry boundary condition. More...

#include "resources/Scripts/types/types.h"
Include dependency graph for Mirror.cl:

Functions

unsigned int cell (vec r, vec r_min, float h, uivec4 n_cells)
 Compute the cell where the particle is allocated.
 
__kernel void mirror (__global vec *r, __global int *imirrored, __global unsigned int *icell, unsigned int N, vec portal_in_r, vec portal_out_r, vec portal_n, vec r_min, float h, uivec4 n_cells)
 Compute the mirrored position of the fluid particles.
 

Detailed Description

Mirroring process for the symmetry boundary condition.

Function Documentation

◆ cell()

unsigned int cell ( vec  r,
vec  r_min,
float  h,
uivec4  n_cells 
)

Compute the cell where the particle is allocated.

Parameters
rPosition \( \mathbf{r} \)
r_minMinimum of r (considering all the particles).
n_cellsNumber of cells at each direction, and the total number of allocated cells.
Here is the call graph for this function:

◆ mirror()

__kernel void mirror ( __global vec r,
__global int *  imirrored,
__global unsigned int *  icell,
unsigned int  N,
vec  portal_in_r,
vec  portal_out_r,
vec  portal_n,
vec  r_min,
float  h,
uivec4  n_cells 
)

Compute the mirrored position of the fluid particles.

The mirrored particles (the ones close enough to the out portal plane) will be marked with imirrored = 1.

Parameters
rPosition \( \mathbf{r} \)
imirrored0 if the particle has not been mirrored, 1 otherwise.
icellCell where each particle is allocated.
NNumber of particles
portal_in_rIn portal infinite plane position
portal_out_rOut portal infinite plane position
portal_nPortal infinite planes normal
r_minMinimum of r.
n_cellsNumber of cells at each direction, and the total number of allocated cells.
Here is the call graph for this function: