提交 08e79f2b 编辑于 作者: Mijian Xu's avatar Mijian Xu 😷
浏览文件

Update mgpro.py

上级 f2bffb0b
流水线 #744 已失败 ,包含阶段
in 1 minute 和 1 second
...@@ -120,8 +120,8 @@ class mgmat(object): ...@@ -120,8 +120,8 @@ class mgmat(object):
grad = np.diff(data_expand, axis=1)[self.row_begin: self.row_end + 1, self.col_begin: self.col_end + 1] grad = np.diff(data_expand, axis=1)[self.row_begin: self.row_end + 1, self.col_begin: self.col_end + 1]
grad /= self.dx grad /= self.dx
elif degree == 'mod': elif degree == 'mod':
ns = -np.diff(data_expand, axis=0)[self.row_begin: self.row_end + 1, self.col_begin: self.col_end + 1] ns = -np.diff(data_expand, axis=0)[self.row_begin: self.row_end + 1, self.col_begin: self.col_end + 1] / self.dy
we = np.diff(data_expand, axis=1)[self.row_begin: self.row_end + 1, self.col_begin: self.col_end + 1] we = np.diff(data_expand, axis=1)[self.row_begin: self.row_end + 1, self.col_begin: self.col_end + 1] / self.dx
grad = np.sqrt(ns**2 + we**2) grad = np.sqrt(ns**2 + we**2)
elif degree == '45': elif degree == '45':
grad = np.zeros_like(data_expand) grad = np.zeros_like(data_expand)
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册