本文整理汇总了Python中surface.Surface.write方法的典型用法代码示例。如果您正苦于以下问题:Python Surface.write方法的具体用法?Python Surface.write怎么用?Python Surface.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类surface.Surface
的用法示例。
在下文中一共展示了Surface.write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from surface import Surface [as 别名]
# 或者: from surface.Surface import write [as 别名]
def main(argv):
sim_start_time = clock()
# check if config is given as parameter
if len(sys.argv) < 2:
usage()
exit()
cfg_file = sys.argv[1]
srf_file = os.path.splitext(cfg_file)[0] + '.srf'
par.LoadConfig(sys.argv[1])
init_sputtering()
dtime = par.TIME_STEP
dt = dtime
time = 0
end_time = par.TOTAL_TIME
surface_start = Surface(par.XMAX, par.XMIN, par.DELTA_X)
surface = Surface(par.XMAX, par.XMIN, par.DELTA_X)
while time < end_time:
advance(surface, dt)
surface.write(srf_file, time, surface.x.size, end_time, dtime)
time, dt = timestep(dtime, time, end_time)
surface.write(srf_file, time, surface.x.size, end_time, dtime)
sim_end_time = clock()
print("Execution time:" + str(sim_end_time - sim_start_time) + "s")
if par.PLOT_SURFACE:
surface_start.plot('OF Start', '-+r')
surface.plot('OF Stop','-+b')