예제 #1
0
 def updateE(s, tstep):
     if s.participant: Tfsf.updateE(s, tstep)
예제 #2
0
figure()

imsh = imshow(transpose(sc.ones((S.Nx, S.Ny), 'f')),
              cmap=cm.jet,
              vmin=-0.05,
              vmax=0.05,
              origin='lower',
              interpolation='bilinear')
colorbar()

#--------------------------------------------------------------------
from time import *
t0 = time()
for tstep in xrange(1, tmax + 1):
    S.updateE()
    Cpml.updateE()
    Src.updateE(tstep)

    S.updateH()
    Cpml.updateH()
    Src.updateH()

    if tstep / 20 * 20 == tstep:
        print_elapsed_time(t0, time(), tstep)

        imsh.set_array(transpose(Output_ey.get_data()))
        png_str = './png/%.6d.png' % tstep
        savefig(png_str)

print_elapsed_time(t0, time(), tstep)
예제 #3
0
	def updateE( s, tstep ):
		if s.participant: Tfsf.updateE( s, tstep )
imsh = imshow( 
		transpose( sc.ones( (S.Nx,S.Ny), 'f' ) ),
			cmap=cm.jet,
			vmin=-0.05, vmax=0.05,
			origin='lower',
			interpolation='bilinear')
colorbar()


#--------------------------------------------------------------------
from time import *
t0 = time()
for tstep in xrange( 1, tmax+1 ):
	S.updateE()
	Cpml.updateE()
	Src.updateE( tstep )

	S.updateH()
	Cpml.updateH()
	Src.updateH()
	
	if tstep/20*20 == tstep:
		print_elapsed_time( t0, time(), tstep )
		
		imsh.set_array( transpose( Output_ey.get_data() ) )
		png_str = './png/%.6d.png' % tstep
		savefig(png_str) 
		

print_elapsed_time( t0, time(), tstep )