Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Here is a toy example:

currentTimeStep = 0;
pfun = ParametricNDSolveValue[
          {y'[t] == a y[t], y[0] == 1}, y, {t, 0, 10000}, {a},
          StepMonitor :> (currentTimeStep = t;), MaxSteps -> 100000

As you can see from the value of currentTimeStep, the variable is most of the time left without a numerical value. Is there a way to look at the current status of computation when using ParameticNDSolveValue?

share|improve this question
I filed this as a bug. Thanks. – user21 May 8 '13 at 8:08

1 Answer 1

up vote 2 down vote accepted

@ruebenko confirmed that this is a bug.

Here's a workaround:

currentTimeStep = 0;

monitor[t_?NumericQ] := (currentTimeStep = t; 1)

pfun = ParametricNDSolveValue[{y'[t] == a monitor[t] y[t], y[0] == 1},
    y, {t, 0, 10000}, {a}, MaxSteps -> 100000];


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.