示例#1
0
def phasesweep_parallel(phaselist, system, params):
    for phase in phaselist:
        pid = os.fork()

        if pid == 0:
            params.phase = phase
            print("Current phase: ", params.phase)
            dirname_phase = 'phase_{:1.2f}'.format(params.phase)
            mkdir_chdir(dirname_phase)
            sbe_solver(system, params)

            return 0
示例#2
0
def chirp_phasesweep(chirplist, phaselist, system, params):

    for chirp in chirplist:
        params.chirp = chirp
        print("Current chirp: ", params.chirp)
        dirname_chirp = 'chirp_{:1.3f}'.format(params.chirp)
        mkdir_chdir(dirname_chirp)

        for phase in phaselist:
            params.phase = phase
            print("Current phase: ", params.phase)
            dirname_phase = 'phase_{:1.2f}'.format(params.phase)
            mkdir_chdir(dirname_phase)
            sbe_solver(system, params)
            os.chdir('..')

        os.chdir('..')
示例#3
0
def run(system):

    sbe_solver(system, params)

    return 0
示例#4
0
def run(system):
    params.solver = 'nband'
    sbe_solver(system, params)

    return 0
示例#5
0
def run(system):

    E0 = 1e-1  # MV/cm
    sigma = 20  # fs
    params.electric_field_function = make_gaussian(E0, sigma)
    sbe_solver(system, params)