当前位置: 首页>>代码示例>>Python>>正文


Python Output.print_restart方法代码示例

本文整理汇总了Python中Output.print_restart方法的典型用法代码示例。如果您正苦于以下问题:Python Output.print_restart方法的具体用法?Python Output.print_restart怎么用?Python Output.print_restart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Output的用法示例。


在下文中一共展示了Output.print_restart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: range

# 需要导入模块: import Output [as 别名]
# 或者: from Output import print_restart [as 别名]
# Time Marching on Here
for i_step in range(2,TotalStep+1,1):
# Runge-Kutta Marching Algorithm Begins
    for j in range(0,stage,1):
        for m in range(0,j+1,1):
# Compute inviscid fluc for all volume elements
                F_inv, G_inv, H_inv, = Flux.compute_inv_flux(n_ele, Q + (dt * RK_a[j, k]*RK_k[m,0:n_ele, 0:8]), inertia, k)

                RK_k[j, 0:n_ele, 0:8] = Flux.Total_Inv_Flux(Ele_Coor, Ele_E_Nei, Ele_W_Nei, Ele_F_Nei, Ele_B_Nei, Ele_N_Nei, Ele_S_Nei, F_inv, G_inv, H_inv, \
                                        Ele_E_Nor, Ele_W_Nor, Ele_F_Nor, Ele_B_Nor, Ele_N_Nor, Ele_S_Nor,\
                                        Ele_E_Area,Ele_W_Area,Ele_F_Area,Ele_B_Area,Ele_N_Area,Ele_S_Area, Ele_Vol, n_ele,\
                                        Ele_E_Coor,Ele_W_Coor,Ele_F_Coor,Ele_B_Coor,Ele_N_Coor,Ele_S_Coor,\
                                        rho, p_inf, u_inf, v_inf, w_inf, ox_inf, oy_inf, oz_inf, inertia, k, Q + (dt * RK_a[j, k]*RK_k[m,0:n_ele, 0:8]))

#                print "There is no much mode for viscous (Vis_Mode = 1) nor invisicid (Vis_Mode = 0). The current value of Vis_Mode is", Vis_Mode


    for l in range(0,stage,1):
        Q[0:n_ele, 0:8] = Q[0:n_ele, 0:8] + (dt * RK_b[l] * RK_k[l, 0:n_ele, 0:8])
# Runge-Kutta Marching Algorithm Ends

# How often does the restart file get generated. Default is every 1000 steps.
    if math.fmod(i_step-1,1000) == 0:
        OP.print_restart(Q, n_ele, Re)
        OP.print_output(Q, n_ele, inertia, k, i_step, coord, n_pt, ijk)
# Time Indicator
    print "===================================================================="
    print "This is the", i_step, "-th step. It has been", (time.time() - start_time), "seconds"        
 
print("--- %s seconds ---" % (time.time() - start_time))
开发者ID:jikembo,项目名称:MCT_FVM,代码行数:32,代码来源:Main.py


注:本文中的Output.print_restart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。