Skip to content

Commit 58850b3

Browse files
committed
examples: Introduce acoustic-elastic coupling example
1 parent 0c27423 commit 58850b3

3 files changed

Lines changed: 578 additions & 22 deletions

File tree

devito/finite_differences/differentiable.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def time_order(self):
6464
@cached_property
6565
def grid(self):
6666
grids = {getattr(i, 'grid', None) for i in self._args_diff} - {None}
67+
grids = {g.root for g in grids}
6768
if len(grids) > 1:
6869
warning("Expression contains multiple grids, returning first found")
6970
try:

devito/types/basic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ def grid(self):
709709

710710
def _infer_dims(self):
711711
grids = {getattr(c, 'grid', None) for c in self.flat()} - {None}
712+
grids = {g.root for g in grids}
712713
dimensions = {d for c in self.flat()
713714
for d in getattr(c, 'dimensions', ())} - {None}
714715
# If none of the components are devito objects, returns a sympy Matrix

examples/userapi/07_functions_on_subdomains.ipynb

Lines changed: 576 additions & 22 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)