Skip to content

Commit

Permalink
Reorder init for ball monitor class
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 authored Jan 14, 2025
1 parent 62dfbce commit dc0a7b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions movement/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def __init__(self, dim, centre, radius, amplitude, width):
:arg width: the width of the transition region
:type width: :class:`float`
"""
super().__init__(dim)
assert len(centre) == self.dim
assert len(centre) == dim
assert radius > 0
assert amplitude > 0
assert width > 0
super().__init__(dim)
self.centre = ufl.as_vector([Constant(c) for c in centre])
self.radius = Constant(radius)
self.amplitude = Constant(amplitude)
Expand Down

0 comments on commit dc0a7b1

Please sign in to comment.