# -------------------------------------------------------------------- S = DielectricIf(Nx, Ny, Nz, dx) S.allocate_main_in_dev() S.initmem_main_in_dev() S.allocate_coeff_in_dev() S.allocate_coeff() S.set_coeff() S.memcpy_htod_coeff() S.set_kernel_parameters() S.prepare_kernels() # -------------------------------------------------------------------- Src = Source(S) Src.prepare_kernels() # -------------------------------------------------------------------- print "-" * 47 print "N(%d, %d, %d)" % (S.Nx, S.Ny, S.Nz) print "dx = %g" % S.dx print "dt = %g" % S.dt print "" S.print_main_kernel_parameters() print "-" * 47 # -------------------------------------------------------------------- # Output Ez = sc.zeros((Nx, Ny, Nz), "f")
#-------------------------------------------------------------------- S = DielectricIf(Nx, Ny, Nz, dx) S.allocate_main_in_dev() S.initmem_main_in_dev() S.allocate_coeff_in_dev() S.allocate_coeff() S.set_coeff() S.memcpy_htod_coeff() S.prepare_kernels() #-------------------------------------------------------------------- Src = Source(S) Src.prepare_kernels() #-------------------------------------------------------------------- print '-' * 47 print 'N(%d, %d, %d)' % (S.Nx, S.Ny, S.Nz) print 'dx = %g' % S.dx print 'dt = %g' % S.dt print '' S.print_main_kernel_parameters() print '-' * 47 #-------------------------------------------------------------------- # Output Ez = sc.zeros((Nx, Ny, Nz), 'f') '''