Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
477785f5
Commit
477785f5
authored
Jan 15, 2020
by
Stephan Seitz
Browse files
Allow kwargs in fd.Diff.interpolated_access
parent
39fed6f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/fd/derivative.py
View file @
477785f5
...
...
@@ -111,15 +111,15 @@ class Diff(sp.Expr):
def
__str__
(
self
):
return
"D(%s)"
%
self
.
arg
def
interpolated_access
(
self
,
offset
):
def
interpolated_access
(
self
,
offset
,
**
kwargs
):
"""Represents an interpolated access on a spatially differentiated field
Args:
offset (Tuple[sympy.Expr]): Absolute position to determine the value of the spatial derivative
"""
from
pystencils.interpolation_astnodes
import
DiffInterpolatorAccess
assert
isinstance
(
self
.
arg
ument
,
Field
),
"Must be field to enable interpolated accesses"
return
DiffInterpolatorAccess
(
self
.
arg
ument
.
interpolated_access
(
offset
)
,
self
.
target
)
assert
isinstance
(
self
.
arg
.
field
,
Field
),
"Must be field to enable interpolated accesses"
return
DiffInterpolatorAccess
(
self
.
arg
.
field
.
interpolated_access
(
offset
,
**
kwargs
).
symbol
,
self
.
target
,
*
offset
)
class
DiffOperator
(
sp
.
Expr
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment