Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
32556518
Commit
32556518
authored
Jan 27, 2020
by
Stephan Seitz
Browse files
Add remaining parameters from DataHandling.add_array to DataHandling.add_arrays
parent
39209309
Pipeline
#21425
passed with stage
in 29 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils/datahandling/datahandling_interface.py
View file @
32556518
...
...
@@ -62,7 +62,15 @@ class DataHandling(ABC):
pystencils field, that can be used to formulate symbolic kernels
"""
def
add_arrays
(
self
,
description
:
str
,
dtype
=
np
.
float64
)
->
Tuple
[
Field
]:
def
add_arrays
(
self
,
description
:
str
,
dtype
=
np
.
float64
,
ghost_layers
:
Optional
[
int
]
=
None
,
layout
:
Optional
[
str
]
=
None
,
cpu
:
bool
=
True
,
gpu
:
Optional
[
bool
]
=
None
,
alignment
=
False
,
field_type
=
FieldType
.
GENERIC
)
->
Tuple
[
Field
]:
"""Adds multiple arrays using a string description similar to :func:`pystencils.fields`
...
...
@@ -86,7 +94,15 @@ class DataHandling(ABC):
names
=
[]
for
name
,
indices
in
_parse_part1
(
description
):
names
.
append
(
name
)
self
.
add_array
(
name
,
values_per_cell
=
indices
,
dtype
=
dtype
)
self
.
add_array
(
name
,
values_per_cell
=
indices
,
dtype
=
dtype
,
ghost_layers
=
ghost_layers
,
layout
=
layout
,
cpu
=
cpu
,
gpu
=
gpu
,
alignment
=
alignment
,
field_type
=
field_type
)
return
(
self
.
fields
[
n
]
for
n
in
names
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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