If I have a function evaluated in the quadrature function space, how can I then interpolate the values to a different function space for instance, DG0.
You cannot. A quadrature function space are point evaluations. They do not have an underlying polynomial that can be used as the basis on a single cell.
You can project a quadrature function into any space though.
I see.
How would I project a quadrature function into another space? Also what is the difference between projecting and interpolating?
See for instance: https://fenicsproject.org/qa/6832/what-is-the-difference-between-interpolate-and-project/ or any introduction to Finite element methods.
For instance
Introduction to finite element methods
For projection see for instance Where to find 'project'-function in dolfinx? - #2 by nate
1 Like