Skip to content
Snippets Groups Projects
Commit d9f5dbd7 authored by Martin Bauer's avatar Martin Bauer
Browse files

new lbm module: creation functions for kernels

parent 181a8e76
No related merge requests found
...@@ -83,9 +83,9 @@ class Field: ...@@ -83,9 +83,9 @@ class Field:
the outer loop loops over dimension 2, the second outer over dimension 1, and the inner loop the outer loop loops over dimension 2, the second outer over dimension 1, and the inner loop
over dimension 0. Also allowed: the strings 'numpy' (0,1,..d) or 'reverseNumpy' (d, ..., 1, 0) over dimension 0. Also allowed: the strings 'numpy' (0,1,..d) or 'reverseNumpy' (d, ..., 1, 0)
""" """
if layout == 'numpy' or layout.lower() == 'c': if isinstance(layout, str) and (layout == 'numpy' or layout.lower() == 'c'):
layout = tuple(range(spatialDimensions)) layout = tuple(range(spatialDimensions))
elif layout == 'reverseNumpy' or layout.lower() == 'f': elif isinstance(layout, str) and (layout == 'reverseNumpy' or layout.lower() == 'f'):
layout = tuple(reversed(range(spatialDimensions))) layout = tuple(reversed(range(spatialDimensions)))
if len(layout) != spatialDimensions: if len(layout) != spatialDimensions:
raise ValueError("Layout") raise ValueError("Layout")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment