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


Python timing.stats函数代码示例

本文整理汇总了Python中yade.timing.stats函数的典型用法代码示例。如果您正苦于以下问题:Python stats函数的具体用法?Python stats怎么用?Python stats使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: fluxtest

def fluxtest():  
   global once,errors,QinOk
   no=0
   
   QinOk=Qin-deltabubble
   error=QinOk-total2
   if error>toleranceWarning:
      print("Warning: difference between total water volume flowing through bottom wall and water loss due to air bubble generations",QinOk," vs. total water volume flowing inside dry or partially saturated cells",total2)
   if error>toleranceCritical:
      print("The difference is more, than the critical tolerance!")
      errors+=1         
   file.write(str(O.time-timeini)+" "+str(total2)+" "+str(QinOk)+" "+str(error)+"\n") 
   
   for ii in range(nvoids):
     if flow.getCellLabel(ii)==0:
         no=1
   if once==0:
      if no==0:
         imbtime=O.time-timeini
         print(imbtime,voidvol,total2,QinOk)
         if voidvol-total2>toleranceWarning:
           print("Warning: initial volume of dry voids",voidvol," vs. total water volume flowing inside dry or partially saturated cells",total2)
         if voidvol-total2>toleranceCritical:
           print("The difference is more, than the critical tolerance!")
           errors+=1
         print(errors)
         file.write(str(imbtime)+" "+str(voidvol)+" "+str(total2)+" "+str(QinOk)+" "+str(errors)+"\n") 
         once=1
         timing.stats()
         if (errors):
            resultStatus+=1
开发者ID:yade,项目名称:trunk,代码行数:31,代码来源:check_TwoPhaseFlowEngine_PressureInjection.py

示例2: stopUnloading

def stopUnloading():
    if abs(O.forces.f(plate.id)[2]) == 0:
        # O.tags can be used to retrieve unique identifiers of the simulation
        # if running in batch, subsequent simulation would overwrite each other's output files otherwise
        # d (or description) is simulation description (composed of parameter values)
        # while the id is composed of time and process number
        # plot.saveDataTxt(O.tags['d.id'] + '.txt')
        plot.saveDataTxt('data'+ O.tags['id'] +'.txt')
        print timing.stats()
        O.pause()
开发者ID:Kubeu,项目名称:trunk,代码行数:10,代码来源:LOedometricDeform.py

示例3: ValueError

elif geom=='l3a':
	loop=InteractionLoop([Ig2_Sphere_Sphere_L3Geom(approxMask=63)],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_L3Geom_FrictPhys_ElPerfPl()])
else: raise ValueError('geom must be one of sc, d3d, l3, l3a (not %s)'%geom)


O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),
	loop,
	NewtonIntegrator(damping=.6),
]
O.dt=0.5*PWaveTimeStep()
try:
	from yade import qt
	qt.View()
except: pass

O.cell.velGrad=Matrix3(-.1,.03,0, 0,-.1,0, 0,0,-.1)
O.saveTmp()
#O.run(10000,True);
#rrr=qt.Renderer(); rrr.intrAllWire,rrr.intrGeom=True,False

if runningInBatch():
	O.timingEnabled=True
	O.run(300000,True)
	O.timingEnabled
	from yade import timing
	timing.stats()
	

开发者ID:bcharlas,项目名称:trunk,代码行数:28,代码来源:periodic-geom-compare.py


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