MathGroup Archive 2004

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

Search the Archive

Re: Re: Garbage collection problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51989] Re: [mg51965] Re: Garbage collection problem
  • From: DrBob <drbob at bigfoot.com>
  • Date: Sat, 6 Nov 2004 02:08:16 -0500 (EST)
  • References: <cm7d0u$lho$1@smc.vnet.net> <200411030626.BAA08435@smc.vnet.net> <cmckmc$i47$1@smc.vnet.net> <200411050720.CAA07046@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

I stand corrected. A stopping test is a good idea in this application.

Bobby

On Fri, 5 Nov 2004 02:20:04 -0500 (EST), D Herring <dherring at at.uiuc.dot.edu> wrote:

>> That's an odd bug; but I kind of doubt StoppingTest is working well for you ANYWAY.
>
> I don't know what you mean by that...  StoppingTest is a bit awkward to
> work with, but I've found ways to manage, and its performing beautifully
> - if you can ignore the memory leak.
>
> Essentially, I have a dynamical system that regularly impacts with a
> rigid surface.  By setting the StoppingTest to halt NDSolve shortly
> *after* the impact has occurred, I can save a lot of simulation time,
> and it makes it easier to find the exact impact point.
>
> I'm essentially doing the following:
>
> (* Expect impact around 0.5; but can happen after 2 *)
> soln=NDSolve[eqn, vars, {t, 0, 3}, StoppingTest->test];
>
> (* Detect where NDSolve stopped *)
> tau=(vars[[1]]/.soln)[[0, 1, 1, 2]]
>
> (* Find the exact surface intersection *)
> tImpact=FindRoot[surface/.soln, {t, tau}];
>
> Because of the highly nonlinear behavior of my system, FindRoot won't
> converge unless I give it a reasonably good estimate of the intersection
> time.  StoppingTest gives me that and stops NDSolve as soon as possible.
>
> If you have any better ideas, I'm all ears.
>
> Thanks,
> Daniel
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: need help with integration
  • Next by Date: Re: Re: Counting Runs
  • Previous by thread: Re: Garbage collection problem
  • Next by thread: Re: Garbage collection problem