Skip to content

Commit

Permalink
Add correct fix for gauge index rounding (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandli authored Oct 6, 2024
1 parent 4a47d63 commit b049ac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyclaw/geometry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
r"""
"""
Module defining Pyclaw geometry objects.
"""

Expand Down Expand Up @@ -398,7 +398,7 @@ def add_gauges(self,gauge_coords):
# Check if gauge belongs to this grid:
if all(self.lower[n]<=gauge[n]<self.upper[n] for n in range(self.num_dim)):
# Set indices relative to this grid
gauge_index = [int(round((gauge[n]-self.lower[n])/self.delta[n]))
gauge_index = [int((gauge[n]-self.lower[n])//self.delta[n])
for n in range(self.num_dim)]
gauge_file_name = 'gauge'+'_'.join(str(coord) for coord in gauge)+'.txt'
self.gauge_file_names.append(gauge_file_name)
Expand Down

0 comments on commit b049ac4

Please sign in to comment.