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

quadrature points

+1 vote

Hi,

is there a way to extract the quadrature points?
Specifically, is there a way to extract the coordinates for the quadrature points associated with the VectorFunctionSpace like:

Quad = VectorFunctionSpace(mesh, "Quadrature", 2)

Thanks!

asked Mar 21, 2016 by lee FEniCS User (1,170 points)

1 Answer

+1 vote
 
Best answer

Hi, consider

from dolfin import *

mesh = UnitSquareMesh(10, 10)
gdim = mesh.geometry().dim()
V = VectorFunctionSpace(mesh, 'Quadrature', 2)
# Quad points
xq = V.dofmap().tabulate_all_coordinates(mesh).reshape((-1, gdim))
# You might want to remove the duplicates
xq0 = xq[V.sub(0).dofmap().dofs()]  
answered Mar 22, 2016 by MiroK FEniCS Expert (80,920 points)
selected Apr 5, 2016 by johannr

Thanks Mirok! That works !!

...