From d534aa06c4de535d92eb9e98e341ed31fd5ef789 Mon Sep 17 00:00:00 2001 From: Mark Bakker Date: Tue, 16 Apr 2024 19:14:41 +0200 Subject: [PATCH 1/2] test if Rconv=5 Strangely enough, Rconv=7 is too large for large order. Not clear why that wasn't a problem in the past. --- timml/besselaesnumba/besselaesnumba.py | 8 ++++---- timml/constant.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/timml/besselaesnumba/besselaesnumba.py b/timml/besselaesnumba/besselaesnumba.py index 78997b14..46e9877d 100644 --- a/timml/besselaesnumba/besselaesnumba.py +++ b/timml/besselaesnumba/besselaesnumba.py @@ -121,7 +121,7 @@ def potbeslsho(x, y, z1, z2, labda, order, ilap, naq): lstype = 1 # Radius of convergence - Rconv = 7.0 + Rconv = 5.0 # if (ilap==1) : # istart = 1 @@ -183,7 +183,7 @@ def disbeslsho(x, y, z1, z2, labda, order, ilap, naq): rv = np.zeros((2, naq)) # Radius of convergence - Rconv = 7.0 + Rconv = 5.0 # lstype = 1 means line-sink lstype = 1 @@ -267,7 +267,7 @@ def potbesldho(x, y, z1, z2, labda, order, ilap, naq): rv = np.zeros(naq) # Radius of convergence - Rconv = 7.0 + Rconv = 5.0 # lstype=2 means line-doublet lstype = 2 @@ -334,7 +334,7 @@ def disbesldho(x, y, z1, z2, labda, order, ilap, naq): # and mod.Helmholtz potentials in remaining spots rv = np.zeros((2, naq)) # Radius of convergence - Rconv = 7.0 + Rconv = 5.0 # lstype=2 means line-doublet lstype = 2 diff --git a/timml/constant.py b/timml/constant.py index a7463609..aab5daa6 100644 --- a/timml/constant.py +++ b/timml/constant.py @@ -153,7 +153,7 @@ def equation(self): mat[0:, ieq : ieq + e.nunknowns] += e.potinflayers( self.xc[icp], self.yc[icp], self.layers ).sum(0) - ieq += e.nunknowns + ieq += e.nunknowns # I decreased the tab here # else: # mat[0, ieq:ieq+e. nunknowns] += -1 else: From 26b6d687437db5e0287196eafd5ee8618df4013a Mon Sep 17 00:00:00 2001 From: Mark Bakker Date: Tue, 16 Apr 2024 19:18:13 +0200 Subject: [PATCH 2/2] Set Rconv based on order If order > 5, Rconv =5. Otherwise it is 7 --- timml/besselaesnumba/besselaesnumba.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/timml/besselaesnumba/besselaesnumba.py b/timml/besselaesnumba/besselaesnumba.py index 46e9877d..4c1cef62 100644 --- a/timml/besselaesnumba/besselaesnumba.py +++ b/timml/besselaesnumba/besselaesnumba.py @@ -121,7 +121,10 @@ def potbeslsho(x, y, z1, z2, labda, order, ilap, naq): lstype = 1 # Radius of convergence - Rconv = 5.0 + if order > 5: + Rconv = 5.0 + else: + Rconv = 7.0 # if (ilap==1) : # istart = 1 @@ -183,7 +186,10 @@ def disbeslsho(x, y, z1, z2, labda, order, ilap, naq): rv = np.zeros((2, naq)) # Radius of convergence - Rconv = 5.0 + if order > 5: + Rconv = 5.0 + else: + Rconv = 7.0 # lstype = 1 means line-sink lstype = 1 @@ -267,7 +273,10 @@ def potbesldho(x, y, z1, z2, labda, order, ilap, naq): rv = np.zeros(naq) # Radius of convergence - Rconv = 5.0 + if order > 5: + Rconv = 5.0 + else: + Rconv = 7.0 # lstype=2 means line-doublet lstype = 2 @@ -334,7 +343,10 @@ def disbesldho(x, y, z1, z2, labda, order, ilap, naq): # and mod.Helmholtz potentials in remaining spots rv = np.zeros((2, naq)) # Radius of convergence - Rconv = 5.0 + if order > 5: + Rconv = 5.0 + else: + Rconv = 7.0 # lstype=2 means line-doublet lstype = 2