def apply(self, u): a0 = 2 a1 = 1 a = sympy.Matrix([a0, a1, 0]) return integrate(lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate( lambda x: 2 * pi ** 2 * sin(pi * x[0]) * sin(pi * x[1]) + a0 * pi * cos(pi * x[0]) * sin(pi * x[1]) + a1 * pi * sin(pi * x[0]) * cos(pi * x[1]), dV, )
def apply(self, u): a0 = 2 a1 = 1 a = sympy.Matrix([a0, a1, 0]) return integrate( lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate( lambda x: 2 * pi**2 * sin(pi * x[0]) * sin(pi * x[1]) + a0 * pi * cos(pi * x[0]) * sin(pi * x[1]) + a1 * pi * sin(pi * x[ 0]) * cos(pi * x[1]), dV, )
def apply(self, u): a0 = 2 a1 = 1 a = numpy.array([a0, a1, 0]) def rhs(x): z = pi / 2 * (x[0]**2 + x[1]**2) return (2 * pi * (sin(z) + z * cos(z)) - a0 * pi * x[0] * sin(z) - a1 * pi * x[1] * sin(z)) return integrate(lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate(rhs, dV)
def apply(self, u): a0 = 2 a1 = 1 a = numpy.array([a0, a1, 0]) def rhs(x): z = pi / 2 * (x[0] ** 2 + x[1] ** 2) return ( 2 * pi * (sin(z) + z * cos(z)) - a0 * pi * x[0] * sin(z) - a1 * pi * x[1] * sin(z) ) return integrate(lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate( rhs, dV )
def apply(self, u): a0 = 2 a1 = 1 a2 = 3 a = Matrix([a0, a1, a2]) def rhs(x): z = pi / 2 * (x[0]**2 + x[1]**2 + x[2]**2) return (+2 * pi * (1.5 * sin(z) + z * cos(z)) - a0 * pi * x[0] * sin(z) - a1 * pi * x[1] * sin(z) - a2 * pi * x[2] * sin(z)) out = integrate(lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate(rhs, dV) return out
def apply(self, u): a0 = 2 a1 = 1 a2 = 3 a = Matrix([a0, a1, a2]) def rhs(x): z = pi / 2 * (x[0] ** 2 + x[1] ** 2 + x[2] ** 2) return ( +2 * pi * (1.5 * sin(z) + z * cos(z)) - a0 * pi * x[0] * sin(z) - a1 * pi * x[1] * sin(z) - a2 * pi * x[2] * sin(z) ) out = integrate(lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate( rhs, dV ) return out
def apply(self, u): a = numpy.array([2, 1, 0]) return integrate(lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS) - integrate(lambda x: 1.0, dV)
def apply(self, u): a = numpy.array([2, 1, 0]) return integrate( lambda x: -n_dot_grad(u(x)) + n_dot(a) * u(x), dS ) - integrate(lambda x: 1.0, dV)