octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Irregularly gridded Discrete Laplacian Operator


From: David Bateman
Subject: Irregularly gridded Discrete Laplacian Operator
Date: Wed, 18 Jul 2007 16:47:24 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

In my quest to move the del2 operator from octave-forge I've made it
compatible to Matlab for uniform grids and NDArray's. In particular I
changed the condition on the edge elements to be a linear extrapolation
of the interior elements rather than the nearest neighbor. However,
there is still a discrepancy for irregular grids that makes no sense to
me and I wonder if someone might explain.

The definition for the interior points along an axis of 1D problem for
the octave-forge version of del2 can be written as

D (2:end-1) =  (M(3:end) - 2 * M(2:end  - 1) + M(1:end -2)) ./
(dx(1:end-1) .* dx(2:end)) ./ 2

whereas the equivalent in Matlab appears to be

D(2:end-1) = ((M(3:end) - M(2:end-1)) ./  dx(2:end) + (M(1:end-2) -
M(2:end-1)) ./ dx(1:end-1)) ./ (dx(1:end-1) + dx(2:end))

To my mind neither seems correct. The first looks like its an attempt to
take the geometric mean of the offset to the nearest neighbors, though
it lacks the sqrt to really make it the geometric mean, whereas as the
second has some weird relationship to the arithmetic mean of the offsets
to the neighbors.

Is there a "correct" definition for irregularly gridded discrete
Laplacian operator? Is there any reason to prefer either of the above
definitions?

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]