Commit 99dbe3bd authored by Ryan Gutenkunst's avatar Ryan Gutenkunst
Browse files

5D bug fixes (but still one lurking)

parent ffc05e7f
......@@ -138,7 +138,7 @@ def _inject_mutations_5D(phi, dt, xx, yy, zz, aa, bb, theta0, frozen1, frozen2,
phi[0,0,0,1,0] += dt/aa[1] * theta0/2 * 32/((aa[2] - aa[0]) * xx[1] * yy[1] * zz[1] * bb[1])
# Population 5
if not frozen5:
phi[0,0,0,0,1] += dt/aa[1] * theta0/2 * 32/((bb[2] - bb[0]) * xx[1] * yy[1] * zz[1] * aa[1])
phi[0,0,0,0,1] += dt/bb[1] * theta0/2 * 32/((bb[2] - bb[0]) * xx[1] * yy[1] * zz[1] * aa[1])
return phi
def _compute_dt(dx, nu, ms, gamma, h):
......@@ -651,9 +651,9 @@ def five_pops(phi, xx, T, nu1=1, nu2=1, nu3=1, nu4=1, nu5=1,
m31=0, m32=0, m34=0, m35=0, m41=0, m42=0, m43=0, m45=0,
m51=0, m52=0, m53=0, m54=0,
gamma1=0, gamma2=0, gamma3=0, gamma4=0, gamma5=0,
h1=0.5, h2=0.5, h3=0.5, h4=0.5, h5=0,
h1=0.5, h2=0.5, h3=0.5, h4=0.5, h5=0.5,
theta0=1, initial_t=0, frozen1=False, frozen2=False,
frozen3=False, frozen4=False, frozen5=0,
frozen3=False, frozen4=False, frozen5=False,
enable_cuda_const=False):
"""
Integrate a 5-dimensional phi foward.
......
......@@ -316,7 +316,7 @@ void implicit_5Da(double *phi, double *xx, double *yy, double *zz, double *aa, d
tridiag_premalloc(a, b, c, r, temp, O);
for(ll = 0; ll < O; ll++)
phi[ii*M*N*O*P + jj*N*O*P + kk*O*P + ll*P + mm] = temp[kk];
phi[ii*M*N*O*P + jj*N*O*P + kk*O*P + ll*P + mm] = temp[ll];
}
}
}
......@@ -393,7 +393,7 @@ void implicit_5Db(double *phi, double *xx, double *yy, double *zz, double *aa, d
if((xx[ii]==0) && (yy[jj]==0) && (zz[kk] == 0) && (aa[ll] == 0) && (Mfirst <= 0))
b[0] += (0.5/nu5 - Mfirst)*2./db[0];
if((xx[ii]==1) && (yy[jj]==1) && (zz[kk] == 1) && (aa[ll] == 1) && (Mlast >= 0))
b[P-1] += -(-0.5/nu5 - Mlast)*2./db[O-2];
b[P-1] += -(-0.5/nu5 - Mlast)*2./db[P-2];
tridiag_premalloc(a, b, c, r, &phi[ii*M*N*O*P + jj*N*O*P + kk*O*P + ll], P);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment