[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Looking for developers
From:       Stefano Borini <munehiro () ferrara ! linux ! it>
Date:       2003-08-31 22:40:45
[Download RAW message or body]

On Sun, Aug 31, 2003 at 09:36:34AM -0700, James Richard Tyrer wrote:
> I noticed that you are using Richardson extrapolation.

right.

> 
> This reminds me that I promised: larrosa@kde.org that I would explain this 
> to him.  No, I didn't forget, I just didn't get it done.
> 
> Any who, my question is do you know of a web source that explains this?
> 
> What I always did was use: h/n where n was 1, 2, 4, & 8 then used linear 
> regression to fit it to:
> 
> 	I = m*(1/n) + b
> 
> and use b for the value of I for that step (which corresponds n going to 
> infinity).  But, a more rigorous explanation would be nice.

in the case of kmonodim, it's based on the assumption you can use more
(or less) points for the grid, and then extrapolate to a more correct
value. There's no forced coefficient. You can achieve a good result even
choosing 1.5 times the reference points, or whichever value. Kmonodim
gets this value every time, but the extrapolation is done using a system
with a more large grid by a factor of 2. Using the richardson
extrapolation in this case reduces the error to a o(delta^4), instead of
o(delta^2), IIRC.

the code is here (from model.cpp)


    Eigenvalue *e, *ered;

    double alpha = m_richardson->delta() / m_system->delta();
    double alpha2 = alpha*alpha;

    for (i = 0; i < m_system->eigenNumber(); i++) {
        e = m_system->eigenvalue(i);
        ered = m_richardson->eigenvalue(i);
        e->setExtrapolatedEigenvalue( (alpha2*e->eigenvalue() - ered->eigenvalue()) / (alpha2 - 1) );
    }


delta is the difference from grid point to grid point in the x array (so
it's x[i+1] - x[i]) in the case of two different grids: the richardson
one (m_richardson) and the reference one (m_system).

the extrapolated value for each eigenvalue is given by the formula

(alpha2*e->eigenvalue() - ered->eigenvalue()) / (alpha2 - 1)

I've no formal description of the procedure at hand, since there are
assumptions about the mathematical details, but i have at my office and
can submit it tomorrow morning (GMT+1 ;) ). Although very linear I'm
currently too tired to reget it from scratch :)



 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic