From 5f33af50597f497faee7e61cfd60edd77b3ca6a7 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 5 Jul 2014 14:26:23 -0500 Subject: [PATCH] Implement a simplistic mass-matrix-based quadrature on warp-and-blend element groups --- meshmode/discretization/poly_element.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/meshmode/discretization/poly_element.py b/meshmode/discretization/poly_element.py index c15a1b1..bbaff47 100644 --- a/meshmode/discretization/poly_element.py +++ b/meshmode/discretization/poly_element.py @@ -25,13 +25,9 @@ THE SOFTWARE. import numpy as np #import numpy.linalg as la -from pytools import memoize_method, memoize_method_nested -from meshmode.discretization import Discretization +from pytools import memoize_method from meshmode.mesh import SimplexElementGroup as _MeshSimplexElementGroup -import pyopencl as cl - -import loopy as lp import modepy as mp __doc__ = """ @@ -124,7 +120,9 @@ class PolynomialWarpAndBlendElementGroup(PolynomialSimplexElementGroupBase): @property @memoize_method def weights(self): - raise NotImplementedError() + return np.dot( + mp.mass_matrix(self.basis(), self.unit_nodes), + np.ones(len(self.basis()))) # }}} -- GitLab