|
[Date Index]
[Thread Index]
[Author Index]
Re: Garbage collection problem
- To: mathgroup at smc.vnet.net
- Subject: [mg51965] Re: Garbage collection problem
- From: D Herring <dherring at at.uiuc.dot.edu>
- Date: Fri, 5 Nov 2004 02:20:04 -0500 (EST)
- References: <cm7d0u$lho$1@smc.vnet.net> <200411030626.BAA08435@smc.vnet.net> <cmckmc$i47$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
> 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
Prev by Date:
[MathGroup]: Descriptive headings
Next by Date:
Re: Counting Runs
Previous by thread:
Re: Re: Garbage collection problem
Next by thread:
Re: Re: Garbage collection problem
|