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
Jonas Plewinski
pystencils
Commits
63de9997
Commit
63de9997
authored
Aug 15, 2019
by
Stephan Seitz
Browse files
Add KernelFunction.fields_written
parent
69f779ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/astnodes.py
View file @
63de9997
...
...
@@ -212,6 +212,10 @@ class KernelFunction(Node):
"""Set of Field instances: fields which are accessed inside this kernel function"""
return
set
(
o
.
field
for
o
in
self
.
atoms
(
ResolvedFieldAccess
))
def
fields_written
(
self
):
assigments
=
self
.
atoms
(
SympyAssignment
)
return
{
a
.
lhs
.
field
for
a
in
assigments
if
isinstance
(
a
.
lhs
,
ResolvedFieldAccess
)}
def
get_parameters
(
self
)
->
Sequence
[
'KernelFunction.Parameter'
]:
"""Returns list of parameters for this function.
...
...
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