Moved definition location of AC_nx_min etc. Otherwide DSL does not compile the code correctly!!!

This commit is contained in:
Miikka Vaisala
2019-09-02 18:29:16 +08:00
parent b4cd92da0c
commit f3a36ec276
3 changed files with 9 additions and 7 deletions

View File

@@ -15,6 +15,14 @@ uniform int AC_save_steps;
uniform int AC_bin_steps;
uniform int AC_bc_type;
// Added these here. Otherwise DSL does not recognize them
uniform int AC_nx_min;
uniform int AC_ny_min;
uniform int AC_nz_min;
uniform int AC_nx_max;
uniform int AC_ny_max;
uniform int AC_nz_max;
// Real params
uniform Scalar AC_dt;
// Spacing

View File

@@ -26,7 +26,7 @@ gradients(in VectorField uu)
#if LSINK
Vector
sink_gravity(int3 globalVertexIdx){
int accretion_switch = AC_switch_accretion;
int accretion_switch = int(AC_switch_accretion);
if (accretion_switch == 1){
Vector force_gravity;
const Vector grid_pos = (Vector){(globalVertexIdx.x - AC_nx_min) * AC_dsx,

View File

@@ -78,12 +78,6 @@ typedef struct {
FUNC(AC_mx), \
FUNC(AC_my), \
FUNC(AC_mz), \
FUNC(AC_nx_min), \
FUNC(AC_ny_min), \
FUNC(AC_nz_min), \
FUNC(AC_nx_max), \
FUNC(AC_ny_max), \
FUNC(AC_nz_max), \
FUNC(AC_mxy),\
FUNC(AC_nxy),\
FUNC(AC_nxyz),\