Skip to content

Commit

Permalink
Revert "Correctly use the floor instead of rounding to determine gaug…
Browse files Browse the repository at this point in the history
…e cell index"
  • Loading branch information
mandli authored Oct 5, 2024
1 parent 1df8ef6 commit faa57af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyclaw/geometry.py
Original file line number Diff line number Diff line change
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((gauge[n]-self.lower[n])//self.delta[n]))
gauge_index = [int(round((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 faa57af

Please sign in to comment.