Skip to content

Commit 03406c0

Browse files
committed
mask topo surface before active cells compute
1 parent 5403deb commit 03406c0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

simpeg_drivers/components/topography.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ def active_cells(self, mesh: InversionMesh, data: InversionData) -> np.ndarray:
101101
self.params.active_cells.active_model, mesh.entity
102102
)
103103
else:
104+
topo_surface = self.params.active_cells.topography_object.copy()
105+
topo_surface.mask_by_extent(mesh.entity.extent)
104106
active_cells = active_from_xyz(
105107
mesh.entity,
106108
self.locations,
107109
grid_reference="bottom" if forced_to_surface else "center",
108-
triangulation=getattr(
109-
self.params.active_cells.topography_object, "cells", None
110-
),
110+
triangulation=getattr(topo_surface, "cells", None),
111111
)
112112

113113
active_cells = (mesh.permutation @ active_cells).astype(bool)

0 commit comments

Comments
 (0)