def allocate_psi ( s ): s.apply_direction = list_replace( s.apply_direction, 0, '' ) CpmlNonKappa.allocate_psi( s ) if myrank <= s.f_end_rank: s.apply_direction = list_replace( s.apply_direction, 0, 'f' ) elif myrank >= s.b_start_rank: s.apply_direction = list_replace( s.apply_direction, 0, 'b' ) else: s.apply_direction = list_replace( s.apply_direction, 0, '' ) s.allocate_psix( s.Npmlx )
def allocate_psi(s): s.apply_direction = list_replace(s.apply_direction, 0, '') CpmlNonKappa.allocate_psi(s) if myrank <= s.f_end_rank: s.apply_direction = list_replace(s.apply_direction, 0, 'f') elif myrank >= s.b_start_rank: s.apply_direction = list_replace(s.apply_direction, 0, 'b') else: s.apply_direction = list_replace(s.apply_direction, 0, '') s.allocate_psix(s.Npmlx)
S.epr_x[50:101, 50:100, :] = epr S.epr_y[50:100, 50:101, :] = epr S.epr_z[50:100, 50:100, :] = epr S.set_coeff() Drude.pfreq_x[50:101, 50:100, :] = pfreq Drude.pfreq_y[50:100, 50:101, :] = pfreq Drude.pfreq_z[50:100, 50:100, :] = pfreq Drude.gamma_x[50:101, 50:100, :] = gamma Drude.gamma_y[50:100, 50:101, :] = gamma Drude.gamma_z[50:100, 50:100, :] = gamma Drude.set_coeff() Cpml.set_space(S) Cpml.allocate_psi() Cpml.allocate_coeff() #-------------------------------------------------------------------- print '-' * 47 print 'N(%d, %d, %d)' % (S.Nx, S.Ny, S.Nz) print 'dx = %g' % S.dx print 'dt = %g' % S.dt print 'Npml = %g' % Cpml.Npml print '' S.print_memory_usage() Drude.print_memory_usage() Cpml.print_memory_usage() print '-' * 47 #--------------------------------------------------------------------
S.epr_x[50:101,50:100,:] = epr S.epr_y[50:100,50:101,:] = epr S.epr_z[50:100,50:100,:] = epr S.set_coeff() Drude.pfreq_x[50:101,50:100,:] = pfreq Drude.pfreq_y[50:100,50:101,:] = pfreq Drude.pfreq_z[50:100,50:100,:] = pfreq Drude.gamma_x[50:101,50:100,:] = gamma Drude.gamma_y[50:100,50:101,:] = gamma Drude.gamma_z[50:100,50:100,:] = gamma Drude.set_coeff() Cpml.set_space( S ) Cpml.allocate_psi() Cpml.allocate_coeff() #-------------------------------------------------------------------- print '-'*47 print 'N(%d, %d, %d)' % (S.Nx, S.Ny, S.Nz) print 'dx = %g' % S.dx print 'dt = %g' % S.dt print 'Npml = %g' % Cpml.Npml print '' S.print_memory_usage() Drude.print_memory_usage() Cpml.print_memory_usage() print '-'*47 #--------------------------------------------------------------------