dtopotools_horiz_okada_and_1d.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:finite_volume_seismic_model 作者: cjvogl 项目源码 文件源码
def dZ_at_t(self, t):
        """
        Interpolate dZ to specified time t and return deformation.
        """
        from matplotlib.mlab import find
        if t <= self.times[0]:
            return self.dZ[0,:,:]
        elif t >= self.times[-1]:
            return self.dZ[-1,:,:]
        else:
            n = max(find(self.times <= t))
            t1 = self.times[n]
            t2 = self.times[n+1]
            dz = (t2-t)/(t2-t1) * self.dZ[n,:,:] + \
                 (t-t1)/(t2-t1) * self.dZ[n+1,:,:]
            return dz
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号