From 575226c2cb0af8fb5423f4038c314b9593a4864e Mon Sep 17 00:00:00 2001 From: HarukiST Date: Fri, 20 Sep 2024 09:51:28 +0900 Subject: [PATCH] use positive definit Jacobian J=h/|Bp| --- hypnotoad/core/mesh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypnotoad/core/mesh.py b/hypnotoad/core/mesh.py index bf727411..74617935 100644 --- a/hypnotoad/core/mesh.py +++ b/hypnotoad/core/mesh.py @@ -1029,7 +1029,7 @@ def calcMetric(self): self.g13 = -self.I * self.g11 self.g23 = -self.dphidy / self.hy**2 - self.J = self.hy / self.Bpxy + self.J = self.hy / numpy.abs(self.Bpxy) self.g_11 = 1.0 / self.g11 + (self.I * self.Rxy) ** 2 self.g_22 = self.hy**2 + (self.Rxy * self.dphidy) ** 2 @@ -1062,7 +1062,7 @@ def calcMetric(self): - self.Rxy * numpy.abs(self.Bpxy) * self.I * self.tanBeta / self.hy ) - self.J = self.hy / self.Bpxy + self.J = self.hy / numpy.abs(self.Bpxy) self.g_11 = ( 1.0 / (self.Rxy * self.Bpxy * self.cosBeta) ** 2