MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A problem with derivative InterpolatingFunction from NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94755] Re: A problem with derivative InterpolatingFunction from NDSolve
  • From: dh <dh at metrohm.com>
  • Date: Tue, 23 Dec 2008 06:58:47 -0500 (EST)
  • References: <giikd0$9nt$1@smc.vnet.net>


Hi Olfa,

I am running version 7 on Vista. That's the ouput I get:

alf= 1.



00   17559440



01   17553672



02   17569560



alf= 0.95



10   17433072



11   17416904



12   17429664

Memory seems to be pretty stable,

Faniel





bar at ANTYSPAM.ap.krakow.pl wrote:

> When i use an iteration with a derivative  InterpolatingFunction

> Mathematica uses more than enough  memory ( memory icreases in every steps)

> 

> This is the sample:

> --------------

> For[jj = 0, jj < 2, 

>   alf = N[1 - jj/20];

>   Print["alf= ", alf];

>   dj = 1/200;

>   For[j = 0, j < 3, 

>     ni = N[1.2 + j dj];

>     start = 0;

>     tmax = 4000;

>     eq1 = u1''[t] + 5 alf u1[t] + ni u2[t] == 0;

>     eq2 = u2''[t] + 3 u2[t] == 0;

>     sol = 

>       NDSolve[{eq1, eq2, u1[0] == 1, u1'[0] == 0, u2[0] == 1, 

>           u2'[0] == 0}, {u1, u2}, {t, 0, tmax}, MaxSteps -> Infinity];

>     U1[t_] := Evaluate[u1[t] /. sol][[1]];

>     U2[t_] := Evaluate[u2[t] /. sol][[1]];

>     F[t_] := U1[t] + U2[t];

>     (*POINCARE ** ** ** ** **********)

>     lista = {};

>     start = 1500.;

>     T = 2 Pi/ni;

>     nt = 400;

>     AppendTo[lista, {U1[100], U1'[100]}];

>     Print[jj, j, "   ", MemoryInUse[]];

>     j++];

>   jj++]

> ---------------------

> 

> When I try U1[t] in place of U1'[t]

> everything's ok  (MemoryInUse gives the same

> in all steps)

> 

>  Clear[u1,u2,U1,U2] doesn't help.

> 

> Any suggestions ?

> 

> 

> Regards, Olaf

> 

> 

> 

> 

> 




  • Prev by Date: Airy pattern
  • Next by Date: Re: How to crop Graphics3D in V7?
  • Previous by thread: Airy pattern
  • Next by thread: Re: A problem with derivative InterpolatingFunction from NDSolve