Skip to content
Snippets Groups Projects
Commit d983013c authored by Jan Hönig's avatar Jan Hönig
Browse files

Introducing backwards compatibility for `create_data_handling`

parent 6539ac97
No related branches found
No related tags found
No related merge requests found
Pipeline #34254 passed
import warnings
from typing import Tuple, Union
from .datahandling_interface import DataHandling
......@@ -34,6 +36,12 @@ def create_data_handling(domain_size: Tuple[int, ...],
parallel: if True a parallel domain is created using walberla - each MPI process gets a part of the domain
default_ghost_layers: default number of ghost layers if not overwritten in 'add_array'
"""
if isinstance(default_target, str):
new_target = Target[default_target.upper()]
warnings.warn(f'Target "{default_target}" as str is deprecated. Use {new_target} instead',
category=DeprecationWarning)
default_target = new_target
if parallel:
assert not opencl_queue, "OpenCL is only supported for SerialDataHandling"
if wlb is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment