#--------------------------------------------------------------------
Nx, Ny, Nz = 242, 200, 32
node_Nx_list = [82, 82, 82]
dx = 10e-9
tmax = 1000
Ncore = 8

Npml = 15

# output data
pt1 = (None, None, Nz / 2)
pt2 = (None, None, Nz / 2)
spartial_step = (1, 1, 1)

#--------------------------------------------------------------------
Output_ez = OutputMpi('Ez', node_Nx_list, pt1, pt2, spartial_step)
Output_ex = OutputMpi('Ex', node_Nx_list, pt1, pt2, spartial_step)

Output_ez_yz = OutputMpi('Ez', node_Nx_list, (Nx / 2, None, None),
                         (Nx / 2, None, None), spartial_step)
Output_ez_yz_2 = OutputMpi('Ez', node_Nx_list, (Nx / 2, 10, None),
                           (Nx / 2, 100, None), spartial_step)
#Output_ez_yz_2 = OutputMpi( 'Ez', node_Nx_list, (Nx/2, 10, 20), (Nx/2, 100, 20), spartial_step )
output_list = [Output_ez, Output_ex, Output_ez_yz, Output_ez_yz_2]

#--------------------------------------------------------------------
if myrank is not server:
    S = Dielectric(node_Nx_list[myrank - 1], Ny, Nz, dx, Ncore)

    S.allocate_main()
    S.allocate_coeff()
from kufdtd.dim3.mpi import *

#--------------------------------------------------------------------
Nx, Ny, Nz = 242, 200, 64
node_Nx_list = [82, 82, 82]
dx = 10e-9
tmax = 1000
Ncore = 8
Npml = 15
pml_apply_direction = ( 'fb', 'fb', 'fb' )
wavelength = 600e-9

#Cpml = CpmlNonKappa( Npml, ('fb','fb','fb') )

Output_ey = OutputMpi( 'Ey', node_Nx_list, (None, None, Nz/2), (None, None, Nz/2), (1, 1, 1) ) 
output_list = [Output_ey]

Src = TfsfMpi( node_Nx_list, (50, 50, 20), (180, 150, 40), ('fb','fb','fb'), wavelength, ['normal', 'x'], 0 )
src_list = [Src]

#--------------------------------------------------------------------
if myrank is not server:
	S = Dielectric( node_Nx_list[myrank-1], Ny, Nz, dx, Ncore )
	S.allocate_main()
	S.allocate_coeff()
	S.set_coeff()

	Cpml = CpmlNonKappaMpi( node_Nx_list, Npml, pml_apply_direction )
	Cpml.set_space( S )
	Cpml.allocate_psi()
예제 #3
0
    (1400e-9, 600e-9, 450e-9),
    250e-9,
    #(1400e-9, 1000e-9, 250e-9), (1400e-9, 1000e-9, 450e-9), 500e-9,
    ['drude', 1.0, 9.97094e15, 4.22253e14])
#['drude', 1.0, 9.89371231e15, 2.7804167234e14] )	by jongho
cylinder3 = Cylinder('c3', (1400e-9, 1400e-9, 250e-9),
                     (1400e-9, 1400e-9, 450e-9), 350e-9,
                     ['dielectric', 1.5**2, 0, 0])
cylinder4 = Cylinder('c4', (1400e-9, 1400e-9, 250e-9),
                     (1400e-9, 1400e-9, 450e-9), 250e-9,
                     ['dielectric', 1e30, 0, 0])
#structure_list = [cylinder2]
structure_list = [cylinder1, cylinder2, cylinder3, cylinder4]

#--------------------------------------------------------------------
Output_ey = OutputMpi('Ey', (None, None, 35), (None, None, 35), (1, 1, 1))
#(None, 100, None), (None, 100, None), (1, 1, 1) )
output_list = [Output_ey]

Src = TfsfMpi((50, 20, 20), (200, 180, 50), ('fb', 'fb', 'fb'), wavelength,
              ['normal', 'x'], 0)
src_list = [Src]

#--------------------------------------------------------------------
Nx, Ny, Nz = sc.int32(sc.ceil(sc.array(space_dim, 'f') / dx - 1e-3))
node_length_x_list = calc_node_length_x_list(space_dim[0])
node_Nx_list = sc.int32(sc.array(node_length_x_list, 'f') / dx)

if myrank is not server:
    node_length_x = node_length_x_list[myrank - 1]
    node_Nx = node_Nx_list[myrank - 1]
#--------------------------------------------------------------------
Nx, Ny, Nz = 242, 200, 32
node_Nx_list = [82, 82, 82]
dx = 10e-9
tmax = 1000
Ncore = 8

Npml = 15

# output data
pt1 = (None, None, Nz/2)
pt2 = ( None, None, Nz/2 )
spartial_step = ( 1, 1, 1 )

#--------------------------------------------------------------------
Output_ez = OutputMpi( 'Ez', node_Nx_list, pt1, pt2, spartial_step ) 
Output_ex = OutputMpi( 'Ex', node_Nx_list, pt1, pt2, spartial_step ) 

Output_ez_yz = OutputMpi( 'Ez', node_Nx_list, (Nx/2, None, None), (Nx/2, None, None), spartial_step ) 
Output_ez_yz_2 = OutputMpi( 'Ez', node_Nx_list, (Nx/2, 10, None), (Nx/2, 100, None), spartial_step ) 
#Output_ez_yz_2 = OutputMpi( 'Ez', node_Nx_list, (Nx/2, 10, 20), (Nx/2, 100, 20), spartial_step ) 
output_list = [Output_ez, Output_ex, Output_ez_yz, Output_ez_yz_2]

#--------------------------------------------------------------------
if myrank is not server:
	S = Dielectric( node_Nx_list[myrank-1], Ny, Nz, dx, Ncore )

	S.allocate_main()
	S.allocate_coeff()
	S.set_coeff()