I recall that it is possible to specify which independent variable is the "time" variable in NDSolve, but I can't find it documented anywhere. Does anyone recall how it works?

I'm getting the following error because (I believe) NDSolve is confused about which is the time variable:

NDSolve::bcedge: Boundary condition [...] is not specified on a single edge 
of the boundary of the computational domain.

I think this is because my initial condition is inside (not an extremum of) the (time) domain of the interpolating function that specifies it.


TemporalVariable is an option of NDSolve`MethodOfLines. Therefore, it does not work directly as an option in NDSolve, and should be called in the following manner:

Method ->
    "TemporalVariable" -> t

However, this did not solve my problem (see the comments).

  • 3
    $\begingroup$ It will increase your chances for getting an answer if you post an example differential equation that has this problem. I don't recall how to do this, but I might try to figure out if there's an equation to test on. Otherwise this is the place to search for advanced NDSolve functionality like this. $\endgroup$ – Szabolcs Jun 27 '14 at 3:41
  • 1
    $\begingroup$ It looks like it's a sub-option called TemporalVariable, check the link from my previous comment, I found it there. Based on it you should be able to figure out how to use it precisely (I'm not sure). $\endgroup$ – Szabolcs Jun 27 '14 at 3:45
  • $\begingroup$ @Szabolcs, thanks. I will edit and show how TemporalVariable is used. However, it didn't fix my problem. I'm trying to figure out how to post it, but has six coupled pdes, boundary conditions, and initial conditions that are large InterpolatingFunctions. I saved the equations to an m-file that was nearly 50 MB. Maybe I'll be able to find a more minimal MWE. $\endgroup$ – Rico Picone Jun 27 '14 at 15:21
  • 3
    $\begingroup$ Just a suggestion: how to specify the temporal variable is a good question and it is not that easy to find in the documentation. If you are willing to edit this question and make it clearly about this topic, then post an answer yourself with a short example, people will definitely appreciate it. There will be people searching for this. You can still ask another question about your actual practical problem. Of course you don't have to do this, but if you do, future visitors will definitely find it useful ;) $\endgroup$ – Szabolcs Jun 27 '14 at 15:45
  • $\begingroup$ Thanks for the edit, @Szabolcs. If I get some more time I'll do what you suggest. $\endgroup$ – Rico Picone Jun 30 '14 at 2:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.