[vtkusers] interpolating using RungaKutta4

Berk Geveci berklist at nycap.rr.com
Thu Aug 26 13:35:06 EDT 2004


On Thu, 2004-08-26 at 13:18, tom fogal wrote:
> Berk,
> 
> Thanks for your reply. I added a switch on the return value of
> ComputeNextStep(), and it is coming back with 0.
> 
> I tried stepping through the code as you suggested. It appears to be
> working fine, I am thinking that perhaps I am using too small a
> timestep to notice the difference? Lines 146 -> 149 read:
> 
>     xnext[i] = xprev[i] + delT*(this->Derivs[i]/6.0 +
>                                 this->NextDerivs[0][i]/3.0 +
>                                 this->NextDerivs[1][i]/3.0 +
>                                 this->NextDerivs[2][i]/6.0);
> 
> delT is reasonably large (0.5), but all of this->Derivs and
> this->NextDerivs are neglible: (-1.<something>e-15 or so). So my guess
> is the reason I am not seeing much change is a combination of a weak
> field and a small timestep?

Possible. Look at the values this->FunctionSet->FunctionValues() returns
(in the second argument) to get a feel for what the vector field is like.





More information about the vtkusers mailing list