From 32556518ba1fda404877d23ec70a3dd59775f6a2 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Mon, 27 Jan 2020 13:55:33 +0100 Subject: [PATCH] Add remaining parameters from DataHandling.add_array to DataHandling.add_arrays --- .../datahandling/datahandling_interface.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pystencils/datahandling/datahandling_interface.py b/pystencils/datahandling/datahandling_interface.py index 75586f637..272f1660c 100644 --- a/pystencils/datahandling/datahandling_interface.py +++ b/pystencils/datahandling/datahandling_interface.py @@ -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) -- GitLab