def updateH(s): if s.participant: Tfsf.updateH(s)
def updateE(s, tstep): if s.participant: Tfsf.updateE(s, tstep)
def updateH( s ): if s.participant: Tfsf.updateH( s )
def updateE( s, tstep ): if s.participant: Tfsf.updateE( s, tstep )
#-------------------------------------------------------------------- Nx, Ny, Nz = 200, 200, 64 dx = 10e-9 tmax = 1000 Ncore = 8 Npml = 15 wavelength = 600e-9 Cpml = CpmlNonKappa(Npml, ('fb', 'fb', 'fb')) Output_ey = Output('Ey', (None, None, Nz / 2), (None, None, Nz / 2)) output_list = [Output_ey] Src = Tfsf((50, 50, 20), (150, 150, 40), ('fb', 'fb', 'fb'), wavelength, ['normal', 'x'], 0) src_list = [Src] #-------------------------------------------------------------------- S = Dielectric(Nx, Ny, Nz, dx, Ncore) S.allocate_main() S.allocate_coeff() S.set_coeff() Cpml.set_space(S) Cpml.allocate_psi() Cpml.allocate_coeff() for output in output_list: output.set_space(S)
#-------------------------------------------------------------------- Nx, Ny, Nz = 200, 200, 64 dx = 10e-9 tmax = 1000 Ncore = 8 Npml = 15 wavelength = 600e-9 Cpml = CpmlNonKappa( Npml, ('fb','fb','fb') ) Output_ey = Output( 'Ey', (None, None, Nz/2), (None, None, Nz/2) ) output_list = [Output_ey] Src = Tfsf( (50, 50, 20), (150, 150, 40), ('fb','fb','fb'), wavelength, ['normal', 'x'], 0 ) src_list = [Src] #-------------------------------------------------------------------- S = Dielectric( Nx, Ny, Nz, dx, Ncore ) S.allocate_main() S.allocate_coeff() S.set_coeff() Cpml.set_space( S ) Cpml.allocate_psi() Cpml.allocate_coeff() for output in output_list: output.set_space( S ) for src in src_list: src.set_space( S )