Skip to content

Commit

Permalink
misc: make builtin grid unit spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Nov 17, 2024
1 parent 3c8edd9 commit 918c100
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devito/builtins/initializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def fset(f, g):
# Create the padded grid:
objective_domain = ObjectiveDomain(lw)
shape_padded = tuple([np.array(s) + 2*l for s, l in zip(shape, lw)])
grid = dv.Grid(shape=shape_padded, subdomains=objective_domain)
extent_padded = tuple([s-1 for s in shape_padded])
grid = dv.Grid(shape=shape_padded, subdomains=objective_domain,
extent=extent_padded)

f_c = dv.Function(name='f_c', grid=grid, space_order=2*max(lw), dtype=dtype)
f_o = dv.Function(name='f_o', grid=grid, dtype=dtype)
Expand Down

0 comments on commit 918c100

Please sign in to comment.