def __init__(self, f1, f2): """ f1 - first functor. f2 - second functor. """ self.f1 = f1 self.f2 = f2 self.n = -1 self._func_id = _cantera.func_newcombo(40, f1.func_id(), f2.func_id())
def __init__(self, typ, f1, f2): self._own = 1 self._func_id = 0 self._typ = typ if type(f1) == types.IntType: f1 = Const(f1) if type(f2) == types.IntType: f2 = Const(f2) self.f1 = f1 self.f2 = f2 self.f1._own = 0 self.f2._own = 0 self._func_id = _cantera.func_newcombo(typ, f1.func_id(), f2.func_id())
def __init__(self, f1, f2): """ f1 - first functor. f2 - second functor. """ if type(f1) == types.FloatType: self.f1 = Const(f1) else: self.f1 = f1 if type(f2) == types.FloatType: self.f2 = Const(f2) else: self.f2 = f2 self.n = -1 self._func_id = _cantera.func_newcombo(30, self.f1.func_id(), self.f2.func_id())