Total number of gauss point

Hello,

I would like to get the total number of integration points of the full domain or, at least, for a cell. I saw that I can use the basix or create a mesh based on “Quadrature” space.
It seems that V.tabulate_dof_coordinates() corresponds to nodal dof. I wonder if there is a way to extract the total number of gauss points directly from the “CG” domain I create.

import ufl
from dolfinx import log, io, mesh, fem, cpp, plot
from mpi4py import MPI

#Geometry & mesh
comm = MPI.COMM_WORLD
msh = mesh.create_rectangle(comm, [[0.,0.],[1.,1.]], [2,2], mesh.CellType.quadrilateral)

FE_vector = ufl.VectorElement("CG",msh.ufl_cell(),1)
V_u       = fem.FunctionSpace(msh,FE_vector)
FE_scalar = ufl.FiniteElement("CG",msh.ufl_cell(), 1) 
V_alpha   = fem.FunctionSpace(msh,FE_scalar)

len(V_alpha.tabulate_dof_coordinates()) #=9

Thank you for the help !

Best regards,
Lamia

The number of Gauss-points used depends on the variational form.
DOLFINx uses ufl to estimate the quadrature degree of the variational form, see:

This is in turn sent to basix which tabulates at the relevant points.

You can use basix directly to investigate the default quadrature of any order, see:Creating and using a quadrature rule — Basix 0.4.3.0 documentation

You can also by-pass the basix/ufl workflow by supplying your own quadrature rule:

1 Like

Thank you very much for the detailed answer ! I managed to get it !