Ejemplo n.º 1
0
 def __init__(self, typ, n, coeffs=[]):
     """
     The constructor is
     meant to be called from constructors of subclasses of Func1.
     See: Polynomial, Gaussian, Arrhenius, Fourier, Const,
     PeriodicFunction """
     self.n = n
     self.coeffs = asarray(coeffs, 'd')
     self._func_id = _cantera.func_new(typ, n, self.coeffs)
Ejemplo n.º 2
0
 def __init__(self, typ, n, coeffs=[]):
     """
     The constructor is
     meant to be called from constructors of subclasses of Func1.
     See: Polynomial, Gaussian, Arrhenius, Fourier, Const,
     PeriodicFunction """
     self.n = n
     self._own = 1
     self._func_id = 0
     self._typ = typ
     self.coeffs = asarray(coeffs,'d')
     self._func_id = _cantera.func_new(typ, n, self.coeffs)
Ejemplo n.º 3
0
 def __init__(self, typ, n, coeffs=[]):
     """
     The constructor is meant to be called from constructors of subclasses
     of Func1: :class:`Polynomial`, :class:`Gaussian`, :class:`Arrhenius`,
     :class:`Fourier`, :class:`Const`, :class:`PeriodicFunction`.
     """
     self.n = n
     self._own = 1
     self._func_id = 0
     self._typ = typ
     if _cantera.nummod == 'numpy':
         self.coeffs = array(coeffs, dtype=float, ndmin=1)
     else:
         self.coeffs = asarray(coeffs, 'd')
     self._func_id = _cantera.func_new(typ, n, self.coeffs)
Ejemplo n.º 4
0
 def __init__(self, typ, n, coeffs=[]):
     """
     The constructor is meant to be called from constructors of subclasses
     of Func1: :class:`Polynomial`, :class:`Gaussian`, :class:`Arrhenius`,
     :class:`Fourier`, :class:`Const`, :class:`PeriodicFunction`.
     """
     self.n = n
     self._own = 1
     self._func_id = 0
     self._typ = typ
     if _cantera.nummod == "numpy":
         self.coeffs = array(coeffs, dtype=float, ndmin=1)
     else:
         self.coeffs = asarray(coeffs, "d")
     self._func_id = _cantera.func_new(typ, n, self.coeffs)