This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

quadrature weights

0 votes

This is a follow-up to the quadrature points question: How can I get the quadrature weights of Quad on the mesh?

Quad = VectorFunctionSpace(mesh, "Quadrature", 2)
asked Feb 1, 2017 by meigel FEniCS User (1,520 points)

1 Answer

+1 vote
 
Best answer

The quadrature schemes are handled by FFC. For a given shape, degree and scheme you can get the points and weights as follows:

from ffc.quadrature_schemes import create_quadrature

shape = "tetrahedron"
degree = 2
scheme="default"

(points, weights) = create_quadrature(shape, degree, scheme)
answered Feb 17, 2017 by finsberg FEniCS User (2,360 points)
selected Feb 19, 2017 by meigel
...