CosmoGRaPH v0.0
particles_macros.h
1 #ifndef COSMO_PARTICLES_MACROS
2 #define COSMO_PARTICLES_MACROS
3 
4 #define PARTICLES_INTERPOLATION(var) \
5  linearInterpolation( \
6  corner_pp_in[0][0][0].var, corner_pp_in[0][0][1].var, corner_pp_in[0][1][0].var, corner_pp_in[0][1][1].var, \
7  corner_pp_in[1][0][0].var, corner_pp_in[1][0][1].var, corner_pp_in[1][1][0].var, corner_pp_in[1][1][1].var, \
8  x_d \
9  )
10 
11 #define PARTICLES_ROUND(val) ((idx_t)( (val) + 0.5))
12 
13 #define DER(field) (derivative(x_idx, y_idx, z_idx, a+1, field))
14 
15 #define PARTICLES_PARALLEL_LOOP(pr) \
16  typename particle_vec::iterator pr; \
17  _Pragma("omp parallel for default(shared) private(pr)") \
18  for(pr = particles->begin(); pr < particles->end(); ++pr) \
19 
20 #endif