@@ -59,7 +59,7 @@ class Grid2d:
5959
6060 # pylint: disable=too-many-instance-attributes
6161
62- def __init__ (self , nx , ny , ng = 1 ,
62+ def __init__ (self , nx , ny , * , ng = 1 ,
6363 xmin = 0.0 , xmax = 1.0 , ymin = 0.0 , ymax = 1.0 ):
6464 """
6565 Create a Grid2d object.
@@ -146,7 +146,7 @@ def __init__(self, nx, ny, ng=1,
146146 self .xr2d = ArrayIndexer (d = xr2d , grid = self )
147147 self .yr2d = ArrayIndexer (d = yr2d , grid = self )
148148
149- def scratch_array (self , nvar = 1 ):
149+ def scratch_array (self , * , nvar = 1 ):
150150 """
151151 return a standard numpy array dimensioned to have the size
152152 and number of ghostcells as the parent grid
@@ -198,10 +198,10 @@ class Cartesian2d(Grid2d):
198198 y = y
199199 """
200200
201- def __init__ (self , nx , ny , ng = 1 ,
201+ def __init__ (self , nx , ny , * , ng = 1 ,
202202 xmin = 0.0 , xmax = 1.0 , ymin = 0.0 , ymax = 1.0 ):
203203
204- super ().__init__ (nx , ny , ng , xmin , xmax , ymin , ymax )
204+ super ().__init__ (nx , ny , ng = ng , xmin = xmin , xmax = xmax , ymin = ymin , ymax = ymax )
205205
206206 self .coord_type = 0
207207
@@ -242,7 +242,7 @@ class SphericalPolar(Grid2d):
242242 theta = y
243243 """
244244
245- def __init__ (self , nx , ny , ng = 1 ,
245+ def __init__ (self , nx , ny , * , ng = 1 ,
246246 xmin = 0.2 , xmax = 1.0 , ymin = 0.0 , ymax = 1.0 ):
247247
248248 # Make sure theta is within [0, PI]
@@ -252,7 +252,7 @@ def __init__(self, nx, ny, ng=1,
252252 assert xmin - ng * (xmax - xmin )/ nx >= 0.0 , \
253253 "xmin (r-direction), must be large enough so ghost cell doesn't have negative x."
254254
255- super ().__init__ (nx , ny , ng , xmin , xmax , ymin , ymax )
255+ super ().__init__ (nx , ny , ng = ng , xmin = xmin , xmax = xmax , ymin = ymin , ymax = ymax )
256256
257257 self .coord_type = 1
258258
@@ -332,7 +332,7 @@ class CellCenterData2d:
332332
333333 # pylint: disable=too-many-instance-attributes
334334
335- def __init__ (self , grid , dtype = np .float64 ):
335+ def __init__ (self , grid , * , dtype = np .float64 ):
336336
337337 """
338338 Initialize the CellCenterData2d object.
@@ -608,14 +608,14 @@ def fill_BC(self, name):
608608 except TypeError :
609609 bnd .ext_bcs [self .BCs [name ].yrb ](self .BCs [name ].yrb , "yrb" , name , self , self .ivars )
610610
611- def min (self , name , ng = 0 ):
611+ def min (self , name , * , ng = 0 ):
612612 """
613613 return the minimum of the variable name in the domain's valid region
614614 """
615615 n = self .names .index (name )
616616 return np .min (self .data .v (buf = ng , n = n ))
617617
618- def max (self , name , ng = 0 ):
618+ def max (self , name , * , ng = 0 ):
619619 """
620620 return the maximum of the variable name in the domain's valid region
621621 """
0 commit comments