Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'question about NDSolve`Reinitiliaze' topicStudent Support Forum > General > Archives > "question about NDSolve`Reinitiliaze"

Help | Reply To Topic
Author Comment/Response
Charlie Brummitt
06/28/06 12:54pm

I would like to solve the same PDE up to t = .5 over and over thousands of times, but with different initial conditions each time. I am trying to use NDSolve`Reinitialize to do this (so that it is fast). However, the Help Browser isn't very clear on NDSolve`Reinitialize. (To see it go to Help Browser -> NDSolve -> Advanced Documentation -> NDSolve`StateData -> Reinitialize).

Let's say I have a state that I have solved up to t = 0.5 (using NDSolve`Iterate[state, 0.5]). Now I would like to re-initialize the state to a different initial condition, which happens to be another interpolating function plus a very small number (like 10^-10). Here is my code:

NDSolve`Reinitialize[state, {u[x, 0] == otherInterpolatingFunction + 10^-10}];

I've done some tests before and after this statement, and it seems this statement is not really re-initializing it, but instead the initial condition remains the same. I also tried using VI's trick to combine the 'otherInterpolatingFunction' + 10^-10 into one function, but that didn't seem to fix it either.

Another related question about NDSolve`Reinitialize: After I re-initialize the state, does it automatically iterate out to t = 0.5 (which is where the state had already evaluated out to before the re-intialization)? This seems to be another problem I saw in my tests. After re-initializing the state, when I typed 'state' and then Shift+Enter it said the state was still evaluated out to t = 0.5 -- but I just re-initialized it!

Essentially, NDSolve`Reinitialize doesn't seem to be re-initializing. Does anyone have any experience with NDSolve`Reinitialize?

URL: ,
Help | Reply To Topic