Hi everyone. In the context of AMR, I want to compute an error estimator of the kind
\[
\eta_K = ||f - g||^2_{L^2(K)}
\]
for each cell \(K\).
I have a CellFunction<std::valarray<double>>
that contains values of \(f\) and a VertexFunction<std::valarray<double>>
that contains values of \(g\).
I read of the trick of integrating with a DG
test function, and this is what I would like to do. To this end, I thought I could interpolate the CellFunction
into a DG0
space and the VertexFunction
into a CG1
space. Is this possible?
Suppose I manage to do this and eventually obtain the vector with the integrals I want, how do I later match each vector entry to the corresponding cell index?
I will later need to put everything into another CellFunction
.
Is there a better way to do this?