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
Tom Harke
pystencils
Commits
609c4b08
Commit
609c4b08
authored
Oct 09, 2019
by
Martin Bauer
Browse files
Substitutions inside field accesses
parent
9f76ea1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/field.py
View file @
609c4b08
...
...
@@ -646,6 +646,12 @@ class Field(AbstractField):
"""
return
Field
.
Access
(
self
.
field
,
self
.
offsets
,
idx_tuple
,
dtype
=
self
.
dtype
)
def
_eval_subs
(
self
,
old
,
new
):
return
Field
.
Access
(
self
.
field
,
tuple
(
sp
.
sympify
(
a
).
subs
(
old
,
new
)
for
a
in
self
.
offsets
),
tuple
(
sp
.
sympify
(
a
).
subs
(
old
,
new
)
for
a
in
self
.
index
),
dtype
=
self
.
dtype
)
@
property
def
is_absolute_access
(
self
)
->
bool
:
"""Indicates if a field access is relative to the loop counters (this is the default) or absolute"""
...
...
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