AQUAgpusph 4.1.2
|
Mirroring process for the symmetry boundary condition. More...
#include "resources/Scripts/types/types.h"
Functions | |
__kernel void | drop (__global int *imove, __global vec *r, unsigned int N, vec symmetry_r, vec symmetry_n, vec domain_max) |
Remove the particles at the other side of the mirror. | |
__kernel void | detect (const __global int *imove, const __global vec *r_in, __global unsigned int *imirror, unsigned int N, vec symmetry_r, vec symmetry_n) |
Detect the particles to be mirrored. | |
vec_xyz | reflection (vec_xyz u, vec_xyz n) |
__kernel void | feed (__global int *imove, __global int *iset, __global unsigned int *imirror, __global unsigned int *imirror_invperm, __global float *m, __global vec *normal, __global vec *tangent, __global vec *r_in, __global vec *u_in, __global vec *dudt_in, __global float *rho_in, __global float *drhodt_in, unsigned int N, unsigned int nbuffer, vec symmetry_r, vec symmetry_n) |
Mirror the particles marked with a flag imirror = 1. | |
Mirroring process for the symmetry boundary condition.
__kernel void detect | ( | const __global int * | imove, |
const __global vec * | r_in, | ||
__global unsigned int * | imirror, | ||
unsigned int | N, | ||
vec | symmetry_r, | ||
vec | symmetry_n | ||
) |
Detect the particles to be mirrored.
The mirroring particles (the ones close enough to the symmetry plane) will be marked with imirror = 1.
imove | Moving flags.
|
r_in | Position \( \mathbf{r} \). |
imirror | 0 if the particle has not been mirrored, 1 otherwise. |
N | Number of particles. |
symmetry_r | Position of the symmetry plane. |
symmetry_n | Normal of the symmetry plane. It is assumed as normalized. |
__kernel void drop | ( | __global int * | imove, |
__global vec * | r, | ||
unsigned int | N, | ||
vec | symmetry_r, | ||
vec | symmetry_n, | ||
vec | domain_max | ||
) |
Remove the particles at the other side of the mirror.
imove | Moving flags.
|
r | Position \( \mathbf{r} \). |
N | Number of particles. |
symmetry_r | Position of the symmetry plane. |
symmetry_n | Normal of the symmetry plane. It is assumed as normalized. |
domain_max | Top-right-back corner of the computational domain. |
__kernel void feed | ( | __global int * | imove, |
__global int * | iset, | ||
__global unsigned int * | imirror, | ||
__global unsigned int * | imirror_invperm, | ||
__global float * | m, | ||
__global vec * | normal, | ||
__global vec * | tangent, | ||
__global vec * | r_in, | ||
__global vec * | u_in, | ||
__global vec * | dudt_in, | ||
__global float * | rho_in, | ||
__global float * | drhodt_in, | ||
unsigned int | N, | ||
unsigned int | nbuffer, | ||
vec | symmetry_r, | ||
vec | symmetry_n | ||
) |
Mirror the particles marked with a flag imirror = 1.
imove | Moving flags.
|
iset | Index of the set of particles. |
imirror | 0 if the particle should not be mirrored, 1 otherwise. |
imirror_invperm | Permutation to find the index of the particle in the list of particles to become split. |
m | Mass, \( m \). |
normal | Normal, \( \mathbf{n} \). |
tangent | Tangent, \( \mathbf{t} \). |
r_in | Position \( \mathbf{r} \). |
u_in | Velocity \( \mathbf{u} \). |
dudt_in | Velocity rate of change \( \frac{d \mathbf{u}}{d t} \). |
rho_in | Density \( \rho \). |
drhodt_in | Density rate of change \( \frac{d \rho}{d t} \). |
N | Number of particles. |
nbuffer | Number of available buffer particles. |
symmetry_r | Position of the symmetry plane. |
symmetry_n | Normal of the symmetry plane. It is assumed as normalized. |
Reflection vector.
The deflection vector is defined as follows:
\( \mathbf{v}(\mathbf{u}, \mathbf{n}) = -2 \left( \mathbf{u} \cdot \mathbf{n} \right) \mathbf{n} \)
where \(\mathbf{u}\) is the vector to become deflected, \(\mathbf{n}\) is the reflection plane normal, and \(\mathbf{v}\) is the deflection vector, which added to the original vector returns its reflected version.