From 591a4c407549c6e4fac83dbfcd5ab5f027e9a71a Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Thu, 5 Apr 2018 11:13:47 +0200
Subject: [PATCH] lbmpy notebook cleanup Part1

---
 __init__.py                    | 4 ++--
 boundaries/boundaryhandling.py | 2 +-
 parallel/blockiteration.py     | 4 ++--
 slicing.py                     | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/__init__.py b/__init__.py
index b81bc4fe4..e13647ef8 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,6 +1,6 @@
 from pystencils.field import Field, FieldType
 from pystencils.data_types import TypedSymbol
-from pystencils.slicing import makeSlice
+from pystencils.slicing import make_slice
 from pystencils.kernelcreation import create_kernel, create_indexed_kernel
 from pystencils.display_utils import show_code, to_dot
 from pystencils.assignment_collection import AssignmentCollection
@@ -9,7 +9,7 @@ from pystencils.sympyextensions import SymbolCreator
 
 __all__ = ['Field', 'FieldType',
            'TypedSymbol',
-           'makeSlice',
+           'make_slice',
            'create_kernel', 'create_indexed_kernel',
            'show_code', 'to_dot',
            'AssignmentCollection',
diff --git a/boundaries/boundaryhandling.py b/boundaries/boundaryhandling.py
index cdc8620ad..d0e669bf6 100644
--- a/boundaries/boundaryhandling.py
+++ b/boundaries/boundaryhandling.py
@@ -101,7 +101,7 @@ class BoundaryHandling:
         Sets boundary using either a rectangular slice, a boolean mask or a combination of both
 
         :param boundary_obj: instance of a boundary object that should be set
-        :param slice_obj: a slice object (can be created with makeSlice[]) that selects a part of the domain where
+        :param slice_obj: a slice object (can be created with make_slice[]) that selects a part of the domain where
                           the boundary should be set. If none, the complete domain is selected which makes only sense
                           if a maskCallback is passed. The slice can have ':' placeholders, which are interpreted
                           depending on the 'includeGhostLayers' parameter i.e. if it is True, the slice extends
diff --git a/parallel/blockiteration.py b/parallel/blockiteration.py
index 12ef85f29..b8c1b9e67 100644
--- a/parallel/blockiteration.py
+++ b/parallel/blockiteration.py
@@ -43,9 +43,9 @@ def sliced_block_iteration(blocks, slice_obj=None, inner_ghost_layers=1, outer_g
 
     Args:
         blocks: walberla block data structure
-        slice_obj: a slice (i.e. rectangular sub-region), can be created with makeSlice[]
+        slice_obj: a slice (i.e. rectangular sub-region), can be created with make_slice[]
         inner_ghost_layers: how many ghost layers are included in the local slice and the optional index arrays
-        outer_ghost_layers: slices can have relative coordinates e.g. makeSlice[0.2, :, :]
+        outer_ghost_layers: slices can have relative coordinates e.g. make_slice[0.2, :, :]
                           when computing absolute values, the domain size is needed. This parameter
                           specifies how many ghost layers are taken into account for this operation.
         dim: set to 2 for pseudo 2D simulation (i.e. where z coordinate of blocks has extent 1)
diff --git a/slicing.py b/slicing.py
index 9d3e432e6..389d1ddd3 100644
--- a/slicing.py
+++ b/slicing.py
@@ -7,7 +7,7 @@ class SliceMaker(object):
         return item
 
 
-makeSlice = SliceMaker()
+make_slice = SliceMaker()
 
 
 class SlicedGetter(object):
@@ -85,7 +85,7 @@ def shift_slice(slices, offset):
 def slice_from_direction(direction_name, dim, normal_offset=0, tangential_offset=0):
     """
     Create a slice from a direction named by compass scheme:
-        i.e. 'N' for north returns same as makeSlice[:, -1]
+        i.e. 'N' for north returns same as make_slice[:, -1]
         the naming is:
             - x: W, E (west, east)
             - y: S, N (south, north)
@@ -95,9 +95,9 @@ def slice_from_direction(direction_name, dim, normal_offset=0, tangential_offset
     :param direction_name: name of direction as explained above
     :param dim: dimension of the returned slice (should be 2 or 3)
     :param normal_offset: the offset in 'normal' direction: e.g. slice_from_direction('N',2, normalOffset=2)
-                         would return makeSlice[:, -3]
+                         would return make_slice[:, -3]
     :param tangential_offset: offset in the other directions: e.g. slice_from_direction('N',2, tangentialOffset=2)
-                         would return makeSlice[2:-2, -1]
+                         would return make_slice[2:-2, -1]
     """
     if tangential_offset == 0:
         result = [slice(None, None, None)] * dim
-- 
GitLab