On 7/15/22 08:36, Alexander Kiselyov wrote:
>
> Which tools could be used to overcome this problem? Or is my approach
> deficient in general?
Alexander:
You want to evaluate the solution obtained on one DoFHandler at quadrature
points so that you can form the right hand side for a system that lives on a
different DoFHandler (but if I understand correctly, the same mesh).
In that case, just use two different FEValues objects. You will just iterate
through the cells of the two DoFHandler objects in synch (the order of cells
in a DoFHandler is the same as in a triangulation, so they will always point
to the same cells), re-init the two FEValues objects on these two cells, and
then use one via get_function_values() to obtain the values of the previous
solution, and the other to obtain the values of shape functions of the other
DoFHandler. Your right hand side is then simply the product of the two, summed
over the quadrature points.
Using this scheme, you never need the (expensive) function
VectorTools::interpolate_to_different_mesh.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/