Re: Timing progress bar
- To: mathgroup at smc.vnet.net
- Subject: [mg120554] Re: Timing progress bar
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Fri, 29 Jul 2011 04:40:59 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201107281155.HAA04128@smc.vnet.net>
On Thu, 28 Jul 2011, Berthold Hamburger wrote:
> Hi,
>
> Is there any possibility to get visible feedback about the progress of a
> calculation via the Timing function? Something like a progress bar or "%
> completed".
>
> Thanks
>
> Berthold
>
>
Berthold,
here are two examples with NDSolve:
tEnd = 100;
ProgressIndicator[Dynamic[currentTime], {0, tEnd}]
currentTime = 0;
NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0,
u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, tEnd}, {x, 0, 5},
EvaluationMonitor :> (currentTime = t;)]
showStatus[status_] :=
LinkWrite[$ParentLink,
SetNotebookStatusLine[FrontEnd`EvaluationNotebook[],
ToString[status]]];
clearStatus[] := showStatus[""];
clearStatus[]
(* look in the lower left of the FrontEnd *)
NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0,
u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, 10}, {x, 0, 5},
EvaluationMonitor :> showStatus["t = " <> ToString[CForm[t]]]]
Oliver
- References:
- Timing progress bar
- From: "Berthold Hamburger" <b-hamburger@artinso.com>
- Timing progress bar