Skip to content

Commit

Permalink
Numba implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanadhikari committed Mar 16, 2021
1 parent 5997e8e commit bdce491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions input.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ Nt = 200 ; 500 (25*Nmft) number of time steps (25 per mean-free time)
Nsim = 2 ; 3 number of simulations to run

[options]
plotRealTime = False ; True ;set to false while using Numba
plotFigure = False
useNumba = False ;
plotRealTime = True ; True ;set to false while using Numba
plotFigure = True
useNumba = True ;
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def main():
Nt = int(params['time']['Nt']) # number of time steps (25 per mean-free time)
Nz = int(params['grid']['Nz'])


lambda_mfp = 1/(np.sqrt(2)*np.pi*n0) # mean free path ~= 225
Lz = Nz*lambda_mfp # height of box ~= 2250.8
Kn = lambda_mfp / Lz # Knudsen number = 0.1
Expand All @@ -59,6 +58,7 @@ def main():

# vector for recording v_y(z=0)
if useNumba:
print("!!You have chhosen Numba, no live graphics will be plotted.")
vy0,Nt,uw = dmscpyNumba(uw,Tw,n0,N,Nsim,Ncell,Nmft,Nt,Nz,Lz,Kn,tau,dt,dz,vol,Ne)
else:
vy0,Nt,uw = dmscpy(uw,Tw,n0,N,Nsim,Ncell,Nmft,Nt,Nz,Lz,Kn,tau,dt,dz,vol,Ne,plotRealTime)
Expand Down

0 comments on commit bdce491

Please sign in to comment.