28#ifndef EXCLUDED_PARTICLE
39 #define EXCLUDED_PARTICLE(index) imove[index] >= 3
42#if defined(LOCAL_MEM_SIZE) && defined(NO_LOCAL_MEM)
43 #error NO_LOCAL_MEM has been set.
78__kernel
void entry(
const __global
int* imove,
79 const __global
vec* r,
80 const __global
float* rho,
81 const __global
float* m,
82 const __global
float* h_var,
83 __global
float* shepard,
87 const usize i = get_global_id(0);
88 const usize it = get_local_id(0);
95 const float h_i = h_var[i];
97 const float conw = 1.f / (h_i * h_i);
99 const float conw = 1.f / (h_i * h_i * h_i);
103 #ifndef LOCAL_MEM_SIZE
104 #define _SHEPARD_ shepard[i]
106 #define _SHEPARD_ shepard_l[it]
107 __local
float shepard_l[LOCAL_MEM_SIZE];
111 const usize c_i = icell[i];
118 const vec_xyz r_ij = r[j].XYZ - r_i;
119 const float q = length(r_ij) / h_i;
131 #ifdef LOCAL_MEM_SIZE
#define BEGIN_NEIGHS(CELL, NPARTS, NCELLS, ICELL, IHOC)
Loop over the neighbours to compute the interactions.
Definition 2D.h:174
#define vec_xyz
Vectors with the minimum number of components.
Definition 2D.h:86
#define END_NEIGHS()
End of the loop over the neighs to compute the interactions.
Definition 2D.h:189
float kernelW(float q)
The kernel value .
Definition CubicSpline2D.hcl:44
Generic/automatic kernel header file.
#define vec
Definition LinkList.hcl.in:57
#define EXCLUDED_PARTICLE(index)
Excluded particles from the Shepard renormalization factor computation.
Definition Shepard.cl:38
__kernel void entry(const __global int *imove, const __global vec *r, const __global float *rho, const __global float *m, __global float *shepard, usize N, LINKLIST_LOCAL_PARAMS)
Shepard factor computation.
Definition Shepard.cl:76
Generic types definition file.
#define LINKLIST_LOCAL_PARAMS
Macro to easily add the parameters to run BEGIN_NEIGHS macro, interacting with the local set of parti...
Definition types.h:106