Commit 08e79f2b authored by Mijian Xu's avatar Mijian Xu 😷

Update mgpro.py

parent f2bffb0b
Pipeline #744 failed with stage
in 1 minute and 1 second
......@@ -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 /= self.dx
elif degree == 'mod':
ns = -np.diff(data_expand, axis=0)[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]
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] / self.dx
grad = np.sqrt(ns**2 + we**2)
elif degree == '45':
grad = np.zeros_like(data_expand)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment