| |
 |
|
|
Science Forum Index » Math - Numerical Analysis Forum » Starting up a multistep ODE solver method...
Page 1 of 1
|
| Author |
Message |
| SzH... |
Posted: Mon Jun 02, 2008 10:22 am |
|
|
|
Guest
|
Readers of this newsgroup might find my question quite trivial.
Please pardon my ignorance and be gentle with the answers---my
education in these matters is clearly lacking ...
The question:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
Thank you for any replies,
Szabolcs |
|
|
| Back to top |
|
| Fred... |
Posted: Mon Jun 02, 2008 11:27 am |
|
|
|
Guest
|
On Jun 2, 1:22 pm, SzH <szhor... at (no spam) gmail.com> wrote:
Quote: Readers of this newsgroup might find my question quite trivial.
Please pardon my ignorance and be gentle with the answers---my
education in these matters is clearly lacking ...
The question:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
Thank you for any replies,
Szabolcs
Usually the Adams methods are implemented with a variable order. Thus
they start with a first order method and rapidly increase both the
order and the stepsize. There is a chance that using a Runge-Kutta
method would get a marginally faster start, but I know of no methods
that use this approach.
Fred |
|
|
| Back to top |
|
| SzH... |
Posted: Mon Jun 02, 2008 10:30 pm |
|
|
|
Guest
|
On Jun 3, 12:27 am, Fred <fred.kr... at (no spam) gmail.com> wrote:
Quote: On Jun 2, 1:22 pm, SzH <szhor... at (no spam) gmail.com> wrote:
Readers of this newsgroup might find my question quite trivial.
Please pardon my ignorance and be gentle with the answers---my
education in these matters is clearly lacking ...
The question:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
Thank you for any replies,
Szabolcs
Usually the Adams methods are implemented with a variable order. Thus
they start with a first order method and rapidly increase both the
order and the stepsize. There is a chance that using a Runge-Kutta
method would get a marginally faster start, but I know of no methods
that use this approach.
Fred
Thanks for the reply! Are there any freely available books/lecture
notes that explain/clarify this? |
|
|
| Back to top |
|
| Ken... |
Posted: Tue Jun 03, 2008 12:19 am |
|
|
|
Guest
|
On Jun 3, 9:30 am, SzH <szhor... at (no spam) gmail.com> wrote:
Quote: On Jun 3, 12:27 am, Fred <fred.kr... at (no spam) gmail.com> wrote:
On Jun 2, 1:22 pm, SzH <szhor... at (no spam) gmail.com> wrote:
Readers of this newsgroup might find my question quite trivial.
Please pardon my ignorance and be gentle with the answers---my
education in these matters is clearly lacking ...
The question:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
Thank you for any replies,
Szabolcs
Usually the Adams methods are implemented with a variable order. Thus
they start with a first order method and rapidly increase both the
order and the stepsize. There is a chance that using a Runge-Kutta
method would get a marginally faster start, but I know of no methods
that use this approach.
Fred
Thanks for the reply! Are there any freely available books/lecture
notes that explain/clarify this?- Hide quoted text -
- Show quoted text -
There are many classic texts around, for example
SHAMPINE, L. F. & GORDON, M. K. (1975) Computer solution of ordinary
differential equations : the initial value problem, San Francisco, W.
H. Freeman.
LAMBERT, J. D. (1991) Numerical methods for ordinary differential
systems : the initial value problem, Chichester ; New York, Wiley.
Ken |
|
|
| Back to top |
|
| widmar... |
Posted: Thu Jun 05, 2008 7:10 pm |
|
|
|
Guest
|
SzH wrote:
Quote:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
What you gain is the efficiency - AB4 is four times more efficient than
RK4 which can make a huge difference when derivative evaluation is
expensive and/or long term integration or when multiple evaluations (per
step) are not even possible. Whatever startup method you choose is
inconsequential in comparison.
---
sdx - modeling, simulation.
http://www.sdynamix.com |
|
|
| Back to top |
|
| SzH... |
Posted: Thu Jun 05, 2008 9:26 pm |
|
|
|
Guest
|
On Jun 6, 3:10 am, widmar <j... at (no spam) sdynamix.com> wrote:
Quote: SzH wrote:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
What you gain is the efficiency - AB4 is four times more efficient than
RK4 which can make a huge difference when derivative evaluation is
expensive and/or long term integration or when multiple evaluations (per
step) are not even possible. Whatever startup method you choose is
inconsequential in comparison.
You are right---this is a pretty obvious advantage of AB4, but I
didn't think about this ... Thanks for the reply! |
|
|
| Back to top |
|
| Fred... |
Posted: Fri Jun 06, 2008 11:03 am |
|
|
|
Guest
|
On Jun 6, 12:26 am, SzH <szhor... at (no spam) gmail.com> wrote:
Quote: On Jun 6, 3:10 am, widmar <j... at (no spam) sdynamix.com> wrote:
SzH wrote:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
What you gain is the efficiency - AB4 is four times more efficient than
RK4 which can make a huge difference when derivative evaluation is
expensive and/or long term integration or when multiple evaluations (per
step) are not even possible. Whatever startup method you choose is
inconsequential in comparison.
You are right---this is a pretty obvious advantage of AB4, but I
didn't think about this ... Thanks for the reply!
As a fanatic partisan of the Adams class of methods, I feel I should
reply. You only get that advantage of a factor of 4 if stability is
not an issue. With the Adams Bashforth method, it almost always will
be. Also the starting process may take little of the time in a long
integration, but any errors you make in the start are likely to haunt
you for the rest of the integration. Finally one should not overlook
the fact that RK methods (inherently) require less overhead than
multistep methods, and this will matter for most moderately sized
problems.
I have written codes for both types of methods, which can be found
under "Ordinary Differeential Equations (14.1 and 14.2)" at
http://mathalacarte.com/c/math77_head.html.
Fred |
|
|
| Back to top |
|
| SzH... |
Posted: Sat Jun 07, 2008 6:51 am |
|
|
|
Guest
|
On Jun 6, 3:10 am, widmar <j... at (no spam) sdynamix.com> wrote:
Quote: What you gain is the efficiency - AB4 is four times more efficient than
RK4 which can make a huge difference when derivative evaluation is
expensive and/or long term integration
I did a very naive experiment, any comments are most welcome (I'd like
to learn more about these things).
I experimented a bit with the simplest possible test problem: x'(t) x(t), x(0) = 1, t = 0..1. I found that the error in the solution
obtained with AB4 is about 40 times larger than RK4's error. In the
following table the first column is the number of steps taken, and the
second is the proportion of AB4's and RK4's error in x(1):
8 23.8577
16 32.4909
32 37.0676
64 39.4262
128 40.6227
256 41.1979
512 41.5851
1024 43.9545
(I used the exact solution for the first 4 points for AB4.)
This means that to make AB4's error as small as RK4's, we need
40^(1/4) = 2.5 times more function evaluations, so in this case AB4 is
only 1.6 times (not 4 times) more efficient than RK4.
I have a naive question: What happens in the case of more complicated
ODEs? Will RK4 keep this advantage?
Quote: or when multiple evaluations (per
step) are not even possible.
Another question: When is it not possible to do multiple evaluation
in one step? |
|
|
| Back to top |
|
| Peter Spellucci... |
Posted: Sun Jun 08, 2008 3:00 am |
|
|
|
Guest
|
In article <48488079.EF5F0CEF at (no spam) sdynamix.com>,
widmar <jrw at (no spam) sdynamix.com> writes:
Quote: SzH wrote:
What is the proper way to start up a linear multistep ODE solver
method, for example an Adams--Bashforth method?
These methods require more than one starting value. I remember that
the starting points must be accurate enough in order for the method to
yield a high-order solution. (E.g. if the a 4th order Adams--
Bashforth is started with a simple Euler method, then the global error
of the approximate solution will be only 1st order, unless I am
mistaken.) Some web tutorials recommend generating the first few
points with a Runge--Kutta method. But if we do this, what will be
the advantage of a 4th order Adams--Bashforth over the 4th order
Runge--Kutta used for starting it? What do we gain by using AB if RK
needed to be implemented anyway?
What you gain is the efficiency - AB4 is four times more efficient than
RK4 which can make a huge difference when derivative evaluation is
expensive and/or long term integration or when multiple evaluations (per
step) are not even possible. Whatever startup method you choose is
inconsequential in comparison.
---
sdx - modeling, simulation.
http://www.sdynamix.com
this is true only if the ode is non stiff at all, since the stability
boundary of AB4 (you use really true AB4, not ABM4 in PECE mode??)
is -0.3 on the real axis , whereas RK4 has -2.8: hence,
if the eqution has a component of only little stiffness, steps taken by
AB4 might by 9 times smaller than those of RK4 and the advantage has
changed into a disadvantage. much better for ABM4
(use Adams-Moulton 4, replace the implicit part by the AB4 predictor
(evaluate f) and evaluate at the corrector again): 2 derivative values for each step,
stability bound is -1.4 , so for the same stiffness you get the same
efficiency as RK4 , butfor nonstiff cases it is faster by a factor of two.
that the start up plays no role is also not generally true: if the ode is
not dissoative, start up errors may persist through the whole solution
concerning automatic startup all has been said already: you prescribe
the bound of the local error
yes: the l o c a l error
and a variable order and variable stepsize
technique will take the job.
hth
peter |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Sun Oct 12, 2008 8:13 am
|
|