Thank you very much, Jean-Paul! I have totally forgot that deal.II has
a wiki in addition to doxygen documentation!

Best regards,
Alexander Kiselyov

On Fri, 2022-07-15 at 22:51 +0200, Jean-Paul Pelteret wrote:
> Hi Alexander,
> 
> The answer that Wolfgang gave is the one that you want to follow. But
> I can give some input into your one question.
> 
> > The problem here is the step 3: somehow I need to specify the same
> > geometric cell for two FEValues with different finite element
> > systems while preserving the ability to use get_function_values.
> > Surprisingly, there doesn't seem to be any obvious way to
> > convert CellAccessor given
> > by Triangulation::active_cell_iterators() to TriaIterator<DoFCellAc
> > cessor> needed for a "full reinit”.
> 
> There is, actually. Its a common question to which you can find the
> answer here:
> https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#can-i-convert-triangulation-cell-iterators-to-dofhandler-cell-iterators
> 
> Having seen enough people ask this, I decided to open a PR to wrap
> this in a convenience function. (see 
> https://github.com/dealii/dealii/pull/14143 ). This might simplify
> things in the future.
> 
> Best,
> Jean-Paul
> 
> 
> 
> > On 15. Jul 2022, at 21:36, Wolfgang Bangerth
> > <bange...@colostate.edu> wrote:
> > 
> > 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:
> >                 bange...@colostate.edu
> >                           www:
> > http://www.math.colostate.edu/~bangerth/
> > 
> > -- 
> > The deal.II project is located at http://www.dealii.org/
> > For mailing list/forum options, see
> > https://groups.google.com/d/forum/dealii?hl=en
> > --- You received this message because you are subscribed to the
> > Google Groups "deal.II User Group" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to dealii+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/dealii/917cdbad-e6f6-dc39-84ba-af7829952022%40colostate.edu
> > .
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google
> Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/ECF6D7FD-C3D4-4264-A4D9-8F5DF53FC492%40gmail.com
> .

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f3a7ef7134bf8f67264ea78d79ca937b75bf2376.camel%40gmail.com.

Reply via email to