To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit b5b48e62 authored by Cyrill Mast's avatar Cyrill Mast
Browse files

minor Bugfixes

parent 76ccac01
Pipeline #88439 failed with stages
in 2 minutes and 38 seconds
......@@ -136,7 +136,7 @@ class ARF(BaseYosioka, BaseARF, BaseSphereFrequencyComposite):
out[3] *= 2 * pi * self.R_0 * self.xlambda * self.rho_f
out[4] *= (-2 * pi * (self.k_f ** 2) *
(self.R_0 ** 2) * (self.xlambda ** 2) * self.rho_f)
print(out)
# (44)
return sum(out)
......
......@@ -450,7 +450,7 @@ class BaseYosioka(BaseSphereFrequencyComposite):
self._compute_K_n(n)
return self._K_n.value[n]
def _compute_M_n(self, N: int):
def _compute_M_n(self, N: int) -> None:
"""
Compute M_n according to (42)
"""
......@@ -461,7 +461,7 @@ class BaseYosioka(BaseSphereFrequencyComposite):
out *= sp.jn(n, self.k_s * self.R_0)
self._M_n.value.append(out)
def _compute_K_n(self, N: int):
def _compute_K_n(self, N: int) -> None:
"""
Compute K_n according to (43)
"""
......
......@@ -257,8 +257,7 @@ class ScatteringField(BaseYosioka, BaseScattering):
"""
# (18) & (29)
coeff = self.legendre_coeffs(lambda n:
self.field.A_in(n)
* self.A_n(n)
self.A_n(n)
* sp.hn(n, self.k_f * self.r))
out = exp(1j * (self.omega * self.t))
......@@ -267,7 +266,6 @@ class ScatteringField(BaseYosioka, BaseScattering):
def _compute_d_Phi_s_dr(self) -> complex:
coeff = self.legendre_coeffs(lambda n:
self.field.A_in(n) *
self.A_n(n)
* self.k_f *
sp.d_hn(n, self.k_f * self.r))
......@@ -278,7 +276,6 @@ class ScatteringField(BaseYosioka, BaseScattering):
def _compute_d_Phi_s_dtheta(self) -> complex:
coeff = self.legendre_coeffs(lambda n:
self.field.A_in(n) *
self.A_n(n)
* sp.hn(n, self.k_f * self.r))
......@@ -302,7 +299,6 @@ class ScatteringField(BaseYosioka, BaseScattering):
"""
# (19) & (30)
coeff = self.legendre_coeffs(lambda n:
self.field.A_in(n) *
self.B_n(n)
* sp.jn(n, self.k_s * self.r))
......@@ -313,8 +309,7 @@ class ScatteringField(BaseYosioka, BaseScattering):
def _compute_d_Phi_star_dr(self) -> complex:
coeff = self.legendre_coeffs(lambda n:
self.field.A_in(n)
* self.B_n(n)
self.B_n(n)
* self.k_s *
sp.d_jn(n, self.k_s * self.r))
......@@ -325,8 +320,7 @@ class ScatteringField(BaseYosioka, BaseScattering):
def _compute_d_Phi_star_dtheta(self) -> complex:
coeff = self.legendre_coeffs(lambda n:
self.field.A_in(n)
* self.B_n(n)
self.B_n(n)
* sp.jn(n, self.k_s * self.r))
out = exp(1j * (self.omega * self.t))
......
......@@ -148,11 +148,15 @@ class TestYosiokaARF(BaseTest):
def test_arf(self) -> None:
n = 0
while n < 1:
self.change_and_assign()
# self.change_and_assign()
sol = []
for key in self.cls_dict:
sol.append(self.cls_dict[key].acoustic_radiation_force())
print(key + ": {}".format(
self.cls_dict[key].acoustic_radiation_force()))
print("")
self.assertAlmostEqual(sol[0], sol[2], msg=True)
n += 1
......
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