def __init__(self, xlb='outflow', xrb='outflow', odd_reflect_dir=''):
    if ((xlb not in valid) or (xrb not in valid)):
        sys.exit('ERROR: invalid BC')
    self.xlb = xlb
    if (self.xlb == 'reflect'):
        self.xlb = numpy.where((odd_reflect_dir == 'x'), 'reflect-odd', 'reflect-even')
    self.xrb = xrb
    if (self.xrb == 'reflect'):
        self.xrb = numpy.where((odd_reflect_dir == 'x'), 'reflect-odd', 'reflect-even')
    if (((xlb == 'periodic') and (xrb != 'periodic')) or ((xrb == 'periodic') and (xlb != 'periodic'))):
        sys.exit('ERROR: both xlb and xrb must be periodic')
def __init__(self, xlb='outflow', xrb='outflow', odd_reflect_dir=):
    if ((xlb not in valid) or (xrb not in valid)):
        sys.exit('ERROR: invalid BC')
    self.xlb = xlb
    if (self.xlb == 'reflect'):
        self.xlb = numpy.where((odd_reflect_dir == 'x'), 'reflect-odd', 'reflect-even')
    self.xrb = xrb
    if (self.xrb == 'reflect'):
        self.xrb = numpy.where((odd_reflect_dir == 'x'), 'reflect-odd', 'reflect-even')
    if (((xlb == 'periodic') and (xrb != 'periodic')) or ((xrb == 'periodic') and (xlb != 'periodic'))):
        sys.exit('ERROR: both xlb and xrb must be periodic')