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


Python SimpleIOAscii.filename方法代码示例

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


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

示例1: SimpleIOAscii

# 需要导入模块: from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii [as 别名]
# 或者: from spatialdata.spatialdb.SimpleIOAscii.SimpleIOAscii import filename [as 别名]
Syy = mask1*(b22*(Szz+Pf)-0*Pf) + ~mask1*Szz
Sxx = mask1*(b33*(Szz+Pf)-0*Pf) + ~mask1*Szz
Sxy = mask1*(-b23*(Szz+Pf)) + ~mask1*0.0

Syz = 0.0*z
Sxz = 0.0*z

writer = SimpleIOAscii()
writer.inventory.filename = "empty"
writer._configure()


# ----------------------------------------------------------------------
# Initial stresses in domain
writer.filename("%s_initial_stress.spatialdb" % sim)
dataOut = {'points': points,
           'coordsys': cs,
           'data_dim': 1,
           'values': [{'name': 'stress-xx', 
                       'units': 'Pa',
                       'data': Sxx},
                      {'name': 'stress-yy', 
                       'units': 'Pa',
                       'data': Syy},
                      {'name': 'stress-zz', 
                       'units': 'Pa',
                       'data': Szz},
                      {'name': 'stress-xy', 
                       'units': 'Pa',
                       'data': Sxy},
开发者ID:geodynamics,项目名称:pylith_benchmarks,代码行数:32,代码来源:create_stresses.py

示例2: CSCart

# 需要导入模块: from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii [as 别名]
# 或者: from spatialdata.spatialdb.SimpleIOAscii.SimpleIOAscii import filename [as 别名]
coefStatic[mask1] = 1.0e+6
mask1 = points[:,1] >= +14.999e+3
coefStatic[mask1] = 1.0e+6
mask1 = points[:,2] <= -14.999e+3
coefStatic[mask1] = 1.0e+6


cs = CSCart()
cs._configure()
cs.initialize()

writer = SimpleIOAscii()
writer.inventory.filename = "empty"
writer._configure()

writer.filename("friction_main.spatialdb")
dataOut = {'points': points,
           'coordsys': cs,
           'data_dim': 2,
           'values': [{'name': 'static-coefficient', 
                       'units': 'None',
                       'data': coefStatic},
                      {'name': 'dynamic-coefficient', 
                       'units': 'None',
                       'data': coefDyn},
                      {'name': 'slip-weakening-parameter', 
                       'units': 'm',
                       'data': d0},
                      {'name': 'cohesion', 
                       'units': 'Pa',
                       'data': cohesion},
开发者ID:geodynamics,项目名称:pylith_benchmarks,代码行数:33,代码来源:create_friction.py

示例3: CSCart

# 需要导入模块: from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii [as 别名]
# 或者: from spatialdata.spatialdb.SimpleIOAscii.SimpleIOAscii import filename [as 别名]
coefStatic = data[:,9]
coefDyn = data[:,10]
d0 = data[:,11]
cohesion = data[:,12]
weakTime = data[:,13]


cs = CSCart()
cs._configure()
cs.initialize()

writer = SimpleIOAscii()
writer.inventory.filename = "empty"
writer._configure()

writer.filename("%s_tractions.spatialdb" % sim)
dataOut = {'points': points,
           'coordsys': cs,
           'data_dim': 2,
           'values': [{'name': 'traction-shear-leftlateral', 
                       'units': 'Pa',
                       'data': tractionShearHoriz},
                      {'name': 'traction-shear-updip',
                       'units': 'Pa',
                       'data': tractionShearVert},
                      {'name': 'traction-normal',
                       'units': 'Pa',
                       'data': tractionNormal},
                      ],
           }
开发者ID:geodynamics,项目名称:pylith_benchmarks,代码行数:32,代码来源:create_spatialdb.py


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