def bessel_i(self, o, nup, fp): nu, f = o.ufl_operands if not (nup is None or isinstance(nup, Zero)): error("Differentiation of bessel function w.r.t. nu is not supported.") if isinstance(nu, Zero): op = bessel_I(1, f) else: op = 0.5 * (bessel_I(nu-1, f) + bessel_I(nu+1, f)) return op * fp
def bessel_i(self, o, nup, fp): nu, f = o.ufl_operands if not (nup is None or isinstance(nup, Zero)): error("Differentiation of bessel function w.r.t. nu is not supported.") if isinstance(nu, Zero): op = bessel_I(1, f) else: op = 0.5 * (bessel_I(nu - 1, f) + bessel_I(nu + 1, f)) return op * fp
def bessel_i(self, o, nu, x): nu, dummy = nu if not (dummy is None or isinstance(dummy, Zero)): error("Differentiation of bessel function w.r.t. nu is not supported.") f, fp = x o = self.reuse_if_possible(o, nu, f) if nu == 0: op = bessel_I(1, f) else: op = 0.5 * (bessel_I(nu-1, f) + bessel_I(nu+1, f)) return (o, op*fp)
def bessel_i(self, o, nu, x): nu, dummy = nu if not (dummy is None or isinstance(dummy, Zero)): error( "Differentiation of bessel function w.r.t. nu is not supported." ) f, fp = x o = self.reuse_if_possible(o, nu, f) if nu == 0: op = bessel_I(1, f) else: op = 0.5 * (bessel_I(nu - 1, f) + bessel_I(nu + 1, f)) return (o, op * fp)