[Dune] Multilinear interpolation in Dune?

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Jun 2 14:32:51 CEST 2015


Hi Atgeirr,

if regularly structured means a_i = h_a * i + c_a, b_j = h_b * j + c_b, ... for 
some constant values h_a, h_b, ..., and c_a, c_b, ... the task should easily be 
doable using SPGrid. Simply set up a Q^1-Lagrange function from you vertex data. 
To implement the global evaluation in a point x, simply use the hierarchic 
search to find the entity e containing x. Then localize the function to this 
entity and evaluate it in the point e.geometry().local( x ).

Note 1: The hierarchic search is specialized for SPGrid. Instead of iterating 
over the grid, it will use the Cartesian structure to compute the entity 
containing x. In 5d, this is something like 5 multiplications (by h^-1) followed 
by 5 integer conversions.

Note 2: For such a simple task, I would not abuse the multilinear geometry but 
use a Q^1-Lagrange function directly.

Best,

Martin


On 06/02/2015 12:30 PM, Atgeirr Rasmussen wrote:
>
> 2. juni 2015 kl. 12:10 skrev Aleksejs Fomins <aleksejs.fomins at lspr.ch>:
>>
>> Could you please briefly describe the task you are trying to solve. What is the expected input and output?
>
> We have a function of 5 variables, f(a, b, c, d, e), that is given at regularly structured nodes: we are given the value
> of f at f(a_i, b_j, c_k, d_l, e_m) for each a_i and each b_j and so on.
>
> The output sought is then the multilinear interpolation of f at some arbitrary point.
>
>> Are you trying to fit a 5d linear space to 6 coordinates?
>
>
> I do not quite see what you mean by this, but I do not think so.
>
>
> Atgeirr
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>

-- 
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 mailing list