Skip to content

Commit

Permalink
fix: don't adapt quadrature with R/H ratio, it doesn't seem to make a…
Browse files Browse the repository at this point in the history
… difference
  • Loading branch information
jokasimr committed Sep 17, 2024
1 parent 7dceab7 commit 00de9f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scippneutron/absorption/cylinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ def volume(self):

def _select_quadrature_points(self, kind):
if kind == 'expensive':
x, w = leggauss(max(round(10 * (self.height / self.radius).value), 10))
x, w = leggauss(10)
quad = _cylinder_quadrature_from_product(
quadratures.disk254_cheb,
dict(x=x, weights=w), # noqa: C408
)
elif kind == 'medium':
x, w = leggauss(max(round(10 * (self.height / self.radius).value), 5))
x, w = leggauss(8)
# Would be nice to have a medium size Chebychev quadrature on the disk,
# but I only found the large one for now.
quad = _cylinder_quadrature_from_product(
quadratures.disk54,
dict(x=x, weights=w), # noqa: C408
)
elif kind == 'cheap':
x, w = leggauss(max(round(5 * (self.height / self.radius).value), 5))
x, w = leggauss(5)
quad = _cylinder_quadrature_from_product(
quadratures.disk12,
dict(x=x, weights=w), # noqa: C408
Expand Down

0 comments on commit 00de9f8

Please sign in to comment.