本文整理汇总了Python中PISM.enthSystemCtx方法的典型用法代码示例。如果您正苦于以下问题:Python PISM.enthSystemCtx方法的具体用法?Python PISM.enthSystemCtx怎么用?Python PISM.enthSystemCtx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PISM
的用法示例。
在下文中一共展示了PISM.enthSystemCtx方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import enthSystemCtx [as 别名]
def __init__(self, Mz, dt):
self.Lz = 1000.0
self.z = np.linspace(0, self.Lz, Mz)
param = PISM.GridParameters()
param.Lx = 1e5
param.Ly = 1e5
param.z = PISM.DoubleVector(self.z)
param.Mx = 3
param.My = 3
param.Mz = Mz
param.ownership_ranges_from_options(1)
self.dt = dt
self.grid = PISM.IceGrid(ctx.ctx, param)
grid = self.grid
self.enthalpy = PISM.model.createEnthalpyVec(grid)
self.strain_heating = PISM.model.createStrainHeatingVec(grid)
self.u, self.v, self.w = PISM.model.create3DVelocityVecs(grid)
self.sys = PISM.enthSystemCtx(grid.z(), "energy.enthalpy",
grid.dx(), grid.dy(), self.dt,
config,
self.enthalpy,
self.u, self.v, self.w,
self.strain_heating,
EC)
# zero ice velocity:
self.reset_flow()
# no strain heating:
self.reset_strain_heating()
示例2: __init__
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import enthSystemCtx [as 别名]
def __init__(self, prefix, Mz, dt, Lz=1000.0):
self.Lz = Lz
self.z = np.linspace(0, self.Lz, Mz)
param = PISM.GridParameters()
param.Lx = 1e5
param.Ly = 1e5
param.z = PISM.DoubleVector(self.z)
param.Mx = 3
param.My = 3
param.Mz = Mz
param.ownership_ranges_from_options(1)
self.dt = dt
self.grid = PISM.IceGrid(ctx.ctx, param)
grid = self.grid
self.enthalpy = PISM.model.createEnthalpyVec(grid)
self.strain_heating = PISM.model.createStrainHeatingVec(grid)
self.strain_heating.set(0.0)
self.u, self.v, self.w = PISM.model.create3DVelocityVecs(grid)
self.u.set(0.0)
self.v.set(0.0)
self.w.set(0.0)
self.sys = PISM.enthSystemCtx(grid.z(), prefix,
grid.dx(), grid.dy(), self.dt,
config,
self.enthalpy,
self.u, self.v, self.w,
self.strain_heating,
EC)