[dune-fem] Interpolation of discrete function over a different grid
Martin Nolte
nolte at mathematik.uni-freiburg.de
Wed Oct 7 14:18:05 CEST 2015
Hi Marco,
have a look at 'dune/fem/space/common/interpolate.hh'. It does exactly the
same for Lagrange functions.
As the grids differ, you evaluate df1 in global coordinates. Please note that
in general every evaluation requires a grid traversal due to the
HierarchicSearch used internally. If grid2 is SPGrid, you may safely use this
approach, because SPGrid specializes the HierarchicSearch utility in an
efficient manner.
Depending on your problem, you might want to invest additional development
time at this point.
Best,
Martin
On 10/07/2015 01:36 PM, Agnese, Marco wrote:
> Hi!
>
> I have a discrete function df1 defined over grid1 and a discrete function df2 over grid2. The domain is the same but grid1 != grid2.
> I want to interpolate df1 onto grid2 and store the value into df2. Which is the correct way to do it?
>
> Right now I am looping trough the entities of grid2, evaluating df1 in its Lagrange points and storing the result in the correct place of df2.
> But this approach is not very general. Moreover, since the access to Lagrange points is going to be removed, it won't be possible to do this in the future so I am looking to a better solution. Any suggestions?
>
> Thank you very much,
> cheers,
> Marco.
> _______________________________________________
> dune-fem mailing list
> dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem
>
--
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>
Universität Freiburg phone: +49-761-203-5630
Abteilung für angewandte Mathematik fax: +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany
More information about the dune-fem
mailing list