Thank you very much for the answer! I was unsure that the cell iteration order is stable, that helps a lot!
Regarding the mesh, I'm not sure I use the correct terms, but for two solvers I'm going to use the same "starting" mesh but with different refinement (two solvers having their own mesh refinement loops). It seems that in this case VectorTools::interpolate_to_different_mesh has to be used, am I right? Best regards, Alexander Kiselyov On Fri, 2022-07-15 at 13:36 -0600, Wolfgang Bangerth 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/34306f4d638c6a38d97fb767a2003d7c775a714f.camel%40gmail.com.