[Dune] Multilinear interpolation in Dune?

Andreas Dedner a.s.dedner at warwick.ac.uk
Tue Jun 2 12:27:59 CEST 2015


Overall it depends on what you want to do with the interpolation.

Perhaps doing the following would work quite easily:
Use YaspGrid<5> (or SPGrid). Wrap it with a GeometryGrid and provide the 
values
you want to interpolate as coordinate function. Then the geometry method 
on an entity
of the GeometryGrid should give you your multilinear interpolation.

If of course you want to find the value of the interpolation given a 
global (v,w,x,y,z) coordinate this
will involve a search in Yasp/SPGrid to find the right entity...

I would imagine that using that package is going to be more efficient 
for most applications.
Andreas

On 02/06/15 11:23, Aleksejs Fomins wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear Atgeirr,
>
> If I understand correctly, you want to find a linear function for 5d coordinate, given 6 example mappings.
>
> I suppose that such functionality should be provided by dune-geometry module, specifically multilinear geometry.
>
> If for some reason this does not work, you can also simply stack all of your sample coordinates into a Dune::FieldMatrix and invert it, that would be your interpolatory mapping.
>
> Hope this helps,
> Aleksejs
>
>
>
> On 02/06/15 11:51, Atgeirr Rasmussen wrote:
>> Dear Dune!
>>
>> We have a need for multilinear interpolation (5d), and I thought perhaps it already exists in Dune,
>> however I could not find any such feature (I looked briefly in dune-common). If this exists already
>> we would prefer to use it, otherwise we are considering the following library:
>>
>> http://rncarpio.github.io/linterp/
>>
>> So have I missed something, perhaps in a different module than dune-common?
>>
>> Yours,
>> Atgeirr Flø Rasmussen
>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iQIcBAEBAgAGBQJVbYQfAAoJEDkNM7UOEwMZvVMQAIUjl5z/8Eaf9h9ijDAyicQx
> smexipPbfJOxRP8jZ+/Ybp7z1tjEj+aan2RH9IdPquX5Sup9dS854o8MW64Az/nd
> k3YqtByiHDwG+tUg6tCSDUmFQjlugX+n0y4rRR1TSjIH9UAYfjAW7t0bKiYhKGiB
> yCfHrMpzsEwvZ6+kJ53O+pjvkqVgHQdg3voW/yW7SbQKN6a8eZvFZXCTkJyWQo6T
> UbrgcWDy+FYmcjYOT5vuYoMp0NMeKyoCSYqU3Fmhh2+ie4zbB0Z6ASpIoUYhIWGG
> t1v1RtFeGpo5aQuUZu+FJQESUwXWeo658TBWpR1IakpD0tdRa4yJdeBMYxRLfG++
> +UuvVdiGfryK+le4Cl3rYdmjyITfMM8arffbh/1x+oxGLy5sK6IsWNx+54va7fqu
> M+gYGO9vGpTz56l/qCLpcOYBWc/MlnjnkUU5wyyTw7Gv0pW0h4qjRNNpkjSEstqu
> 7N2EEi2yrMf2Le+3f/BfenUXwACfu8bHQ+65PxcR3Rj/PRq4In6wOJysz56Lx5yi
> B2yVVo4yXZrJl666tVoP8q6QTUgS1a731ZyZd41npRM1Q96b795qjYoVF0jmglFC
> ES2URHfI+a40jqPjw9+LrIztJ+lAlm8aoyOrpUH79bI/f7D+69s2oyOMyfUCONmM
> TgxYG1BLE2NfTliGqD71
> =OHfP
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list