Skip to content

Commit

Permalink
create TensorProductQuadrature by default instead of Quadrature in TP…
Browse files Browse the repository at this point in the history
… element groups
  • Loading branch information
a-alveyblanc committed Oct 11, 2024
1 parent 75c8fa8 commit 4c66332
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions meshmode/discretization/poly_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,14 @@ def basis_obj(self):

@memoize_method
def quadrature_rule(self):
basis = self._basis
nodes = self._nodes
basis = self._basis.bases[0]
nodes = self.unit_nodes_1d
mass_matrix = mp.mass_matrix(basis, nodes)
weights = np.dot(mass_matrix,
np.ones(len(basis.functions)))
return mp.Quadrature(nodes, weights, exact_to=self.order)
quads = (mp.Quadrature(nodes, weights, exact_to=self.order),)*self.dim

return mp.TensorProductQuadrature(quads)

@property
@memoize_method
Expand Down

0 comments on commit 4c66332

Please sign in to comment.