Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions simpeg_drivers/components/factories/survey_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@
if local_index is not None:
receiver_indices = list(set(receiver_indices).intersection(local_index))

if len(receiver_indices) == 0:
continue

Check warning on line 298 in simpeg_drivers/components/factories/survey_factory.py

View check run for this annotation

Codecov / codecov/patch

simpeg_drivers/components/factories/survey_factory.py#L298

Added line #L298 was not covered by tests

receivers = ReceiversFactory(self.params).build(
locations=receiver_locations,
local_index=receiver_entity.cells[receiver_indices],
Expand Down
2 changes: 1 addition & 1 deletion simpeg_drivers/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def get_containing_cells(
locations = data.drape_locations(np.unique(data.locations, axis=0))
xi = np.searchsorted(mesh.nodes_x, locations[:, 0]) - 1
yi = np.searchsorted(mesh.nodes_y, locations[:, -1]) - 1
inds = xi * mesh.shape_cells[1] + yi
inds = xi + yi * mesh.shape_cells[0]

else:
raise TypeError("Mesh must be 'TreeMesh' or 'TensorMesh'")
Expand Down