Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a bug that caused incorrect evolution if Planck mass not set to 1.

  • Loading branch information...
commit aba0518f15e2cc2c97f0a11dca51068d0461e80a 1 parent 9eb5baa
Jani Sainio authored
View
6 cuda_templates/kernel_H3.cu
@@ -167,7 +167,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
//Dyf = smid_data[threadIdx.y+1][threadIdx.x] - smid_data[threadIdx.y-1][threadIdx.x];
//Dzf = sup_data[threadIdx.y][threadIdx.x] - sdwn_data[threadIdx.y][threadIdx.x];
- // f_coeff[2] = dt*2*mpl^2*0.25*a(t)^2/(dx^2)
+ // f_coeff[2] = dt*2*mpl^-2*0.25*a(t)^2/(dx^2)
piu11_m[in_idx] += f_coeff[2]*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1])*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1]);
piu12_m[in_idx] += f_coeff[2]*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1])*(smid_data[threadIdx.y+1][threadIdx.x] - smid_data[threadIdx.y-1][threadIdx.x]);
@@ -264,7 +264,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
//Dyf = smid_data[threadIdx.y+1][threadIdx.x] - smid_data[threadIdx.y-1][threadIdx.x];
//Dzf = sup_data[threadIdx.y][threadIdx.x] - sdwn_data[threadIdx.y][threadIdx.x];
- // f_coeff[2] = dt*2*mpl^2*0.25*a(t)^2/(dx^2)
+ // f_coeff[2] = dt*2*mpl^-2*0.25*a(t)^2/(dx^2)
piu11_m[in_idx] += f_coeff[2]*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1])*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1]);
piu12_m[in_idx] += f_coeff[2]*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1])*(smid_data[threadIdx.y+1][threadIdx.x] - smid_data[threadIdx.y-1][threadIdx.x]);
@@ -353,7 +353,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
//Dyf = smid_data[threadIdx.y+1][threadIdx.x] - smid_data[threadIdx.y-1][threadIdx.x];
//Dzf = sup_data[threadIdx.y][threadIdx.x] - sdwn_data[threadIdx.y][threadIdx.x];
- // f_coeff[2] = dt*2*mpl^2*0.25*a(t)^2/(dx^2)
+ // f_coeff[2] = dt*2*mpl^-2*0.25*a(t)^2/(dx^2)
piu11_m[in_idx] += f_coeff[2]*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1])*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1]);
piu12_m[in_idx] += f_coeff[2]*(smid_data[threadIdx.y][threadIdx.x+1] - smid_data[threadIdx.y][threadIdx.x-1])*(smid_data[threadIdx.y+1][threadIdx.x] - smid_data[threadIdx.y-1][threadIdx.x]);
View
12 cuda_templates/kernel_H3_new.cu
@@ -269,7 +269,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
Dzf = c1_coeff[0]*(up[0] - down[0]) +
c1_coeff[1]*(up[1] - down[1]);
- // f_coeff[3] = dt*2*mpl^2*2*a(t)^2/(dx^2)
+ // f_coeff[3] = dt*2*mpl^-2*2*a(t)^2/(dx^2)
piu11_m[out_idx] += f_coeff[3]*(Dxf*Dxf);
piu12_m[out_idx] += f_coeff[3]*(Dxf*Dyf);
@@ -286,7 +286,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
s_data[threadIdx.y + ({{ radiusm1 }})][threadIdx.x + {{ radius_c }}]);
Dzf = c1_coeff[0]*(up[0] - down[0]);
- // f_coeff[3] = dt*2*mpl^2*2*a(t)^2/(dx^2)
+ // f_coeff[3] = dt*2*mpl^-2*2*a(t)^2/(dx^2)
piu11_m[out_idx] += f_coeff[3]*(Dxf*Dxf);
piu12_m[out_idx] += f_coeff[3]*(Dxf*Dyf);
@@ -463,7 +463,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
Dzf = c1_coeff[0]*(up[0] - down[0]) +
c1_coeff[1]*(up[1] - down[1]);
- // f_coeff[3] = dt*2*mpl^2*2*a(t)^2/(dx^2)
+ // f_coeff[3] = dt*2*mpl^-2*2*a(t)^2/(dx^2)
piu11_m[out_idx] += f_coeff[3]*(Dxf*Dxf);
piu12_m[out_idx] += f_coeff[3]*(Dxf*Dyf);
@@ -480,7 +480,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
s_data[threadIdx.y + ({{ radiusm1 }})][threadIdx.x + {{ radius_c }}]);
Dzf = c1_coeff[0]*(up[0] - down[0]);
- // f_coeff[3] = dt*2*mpl^2*2*a(t)^2/(dx^2)
+ // f_coeff[3] = dt*2*mpl^-2*2*a(t)^2/(dx^2)
piu11_m[out_idx] += f_coeff[3]*(Dxf*Dxf);
piu12_m[out_idx] += f_coeff[3]*(Dxf*Dyf);
@@ -661,7 +661,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
Dzf = c1_coeff[0]*(up[0] - down[0]) +
c1_coeff[1]*(up[1] - down[1]);
- // f_coeff[3] = dt*2*mpl^2*2*a(t)^2/(dx^2)
+ // f_coeff[3] = dt*2*mpl^-2*2*a(t)^2/(dx^2)
piu11_m[out_idx] += f_coeff[3]*(Dxf*Dxf);
piu12_m[out_idx] += f_coeff[3]*(Dxf*Dyf);
@@ -678,7 +678,7 @@ __global__ void {{ kernel_name_c }}({{ type_name_c }} *sumterm_w{% for i in rang
s_data[threadIdx.y + ({{ radiusm1 }})][threadIdx.x + {{ radius_c }}]);
Dzf = c1_coeff[0]*(up[0] - down[0]);
- // f_coeff[3] = dt*2*mpl^2*2*a(t)^2/(dx^2)
+ // f_coeff[3] = dt*2*mpl^-2*2*a(t)^2/(dx^2)
piu11_m[out_idx] += f_coeff[3]*(Dxf*Dxf);
piu12_m[out_idx] += f_coeff[3]*(Dxf*Dyf);
View
16 integrator/symp_integrator.py
@@ -908,8 +908,8 @@ def __init__(self, model, lat, V, a_in, fields0, pis0, steps = 1000000,
+ model.rho_m0)
self.rho_in = self.rho
self.rho_hom = self.rho
- self.H = np.sqrt(lat.mpl**2.*self.rho/3.)
- self.H_in = np.sqrt(lat.mpl**2.*self.rho_in/3.)
+ self.H = np.sqrt((lat.mpl**-2.)*self.rho/3.)
+ self.H_in = np.sqrt((lat.mpl**-2.)*self.rho_in/3.)
self.H_list = [self.H]
self.p = -6.*lat.VL_reduced*self.H*self.a**2.
@@ -1180,7 +1180,7 @@ def add_to_lists_hom(self, lat):
def adjust_p(self, lat):
"""Use this only after initialization of the fields at t=t_in to
include also the energy density of the perturbations in p"""
- H = np.sqrt(self.rho/3.)
+ H = np.sqrt((lat.mpl**-2.)*self.rho/3.)
self.p = -6*lat.VL_reduced*H*self.a**2.
def adjust_fields(self, lat):
@@ -1747,8 +1747,8 @@ def reinit(self, model, lat, V, a, fields0, pis0, init_m = 'defrost_cpu'):
+ model.rho_m0)
self.rho_in = self.rho
- self.H = np.sqrt(lat.mpl**2.*self.rho/3.)
- self.H_in = np.sqrt(lat.mpl**2.*self.rho_in/3.)
+ self.H = np.sqrt((lat.mpl**-2.)*self.rho/3.)
+ self.H_in = np.sqrt((lat.mpl**-2.)*self.rho_in/3.)
self.H_list = [self.H]
@@ -2685,7 +2685,7 @@ def calc_rho_pres(lat, V, sim, rp_list, cuda_param_rp, cuda_args,
"Energy density fraction of interaction terms:"
omega_int = rho_inter/rho_tot
- Fried_1 = a**2.*((sim.H)**2.- lat.mpl**2.*rho_tot/3.0)
+ Fried_1 = a**2.*((sim.H)**2.- (lat.mpl**-2.)*rho_tot/3.0)
num_error_rel = Fried_1/(a**2.*sim.H**2.)
@@ -2812,7 +2812,7 @@ def calc_rho_pres_back(lat, V, sim, print_Q, flush=True):
sim.H = (-p/(6*a**2.*lat.VL_reduced))
Fried_1 = a**2.*((sim.H)**2. -
- lat.mpl**2.*(rho0)/3.0)
+ (lat.mpl**-2.)*(rho0)/3.0)
num_error_rel = Fried_1/(a**2.*sim.H**2.)
if print_Q == True:
@@ -2848,7 +2848,7 @@ def calc_rho_pres_hom(lat, V, sim, print_Q, flush=True):
sim.H_hom = (-p/(6*a**2.*lat.VL_reduced))
Fried_1 = a**2.*((sim.H_hom)**2. -
- lat.mpl**2.*(rho0)/3.0)
+ (lat.mpl**-2.)*(rho0)/3.0)
num_error_rel = Fried_1/(a**2.*sim.H_hom**2.)
if flush:
View
10 lattice.py
@@ -459,7 +459,7 @@ def __init__(self, lat, model, dV_list = None, d2V_list = None,
self.tmp_terms = '0.0'
"Potential function V_{i} of field i in CUDA form used in H3 part:"
- if self.v_l != None and automatic:
+ if len(self.v_l)>0 and automatic:
self.V_i_H3 = [V_calc(self.v_l[i], n, self.f_list, i+1,
self.power_list, self.C_list, self.D_list,
'H3', deriv_n=0,multiplier='4')
@@ -486,7 +486,7 @@ def __init__(self, lat, model, dV_list = None, d2V_list = None,
"""Potential function V_{i} of field i in CUDA form used in rho and
pressure kernels:"""
- if self.v_l != None and automatic:
+ if len(self.v_l)>0 and automatic:
self.V_i_rp = [V_calc(self.v_l[i], n, self.f_list, i+1,
self.power_list, self.C_list, self.D_list,
'rp', deriv_n=0)
@@ -512,7 +512,7 @@ def __init__(self, lat, model, dV_list = None, d2V_list = None,
self.D_list, 'H3', deriv_n=2)
for i in xrange(lat.fields)]
- if self.v_l != None and automatic:
+ if len(self.v_l)>0 and automatic:
self.V_pd_i = [V_calc(self.v_l[i] , n, self.f_list, i+1,
self.power_list, self.C_list, self.D_list,
'pd', multiplier = '4')
@@ -598,8 +598,8 @@ def f_array(self, lat, a, dt):
of the scalar fields when using 'defrost' discretization
and the fourth is used when 'hlattice' dicretization is used."""
return np.array([a, a*dt*lat.dx**(-2.),
- 0.5*lat.mpl**2*a**2.*dt*lat.dx**(-2.),
- 2*lat.mpl**2*a**2.*dt*lat.dx**(-2.)],
+ 0.5*(lat.mpl**-2)*a**2.*dt*lat.dx**(-2.),
+ 2*(lat.mpl**-2)*a**2.*dt*lat.dx**(-2.)],
dtype = lat.prec_real)
def gw_array(self, lat, a, dt):
View
5 main_program.py
@@ -16,15 +16,16 @@
"""
"Necessary constants defined in the model file:"
-#from models.chaotic import *
+from models.chaotic import *
#from models.chaotic_massless import *
#from models.curvaton import *
#from models.curvaton_si import *
#from models.curvaton_single import *
#from models.oscillon import *
-from models.q_ball import *
+#from models.q_ball import *
#from models.AD import *
#from models.AD2 import *
+#from models.infl2 import *
"Create a model:"
model = Model()
View
2  models/AD2.py
@@ -13,7 +13,7 @@ class Model:
def __init__(self):
- self.model_name = 'Affleck-Dine mechanism'
+ self.model_name = 'Affleck-Dine mechanism gauge'
"Model parameters and values:"
Please sign in to comment.
Something went wrong with that request. Please try again.