I'm studying some new numerical integration algorithms using NDSolve
Method Framework to specify them. When I try to set WorkingPrecision
option to other value than MachinePrecision
I get the following error message:
NDSolve::bdstep: The Step function for Method -> CRK4 returned {0.03529465924388010,0.07025569022824054}, which is not an acceptable form. >>
Here I apply the first CRK4
definition from the official tutorial for the Van der Pol equation:
Needs["DifferentialEquations`NDSolveProblems`"];
system =
NDSolveProblem[
{{Y1'[T] == Y2'[T], Y2'[T] == -Y1[T] + 2 (1 - Y1[T]^2) Y2[T]},
{Y1[0] == 0, Y2[0] == 2}, {Y1[T], Y2[T]}, {T, 0, 30}, {}, {}, {}}];
vars = system["DependentVariables"];
time = system["TimeData"];
sol1 =
Flatten[vars /. NDSolve[system, Method -> CRK4, WorkingPrecision -> 16]]
I have little experience working with Wolfram Mathematica and I will be very grateful to get a clue how to fix this issue.