d02psc computes the solution of a system of ordinary differential equations using interpolation anywhere on an integration step taken by
d02pfc.
d02psc and its associated functions (
d02pfc,
d02pqc,
d02prc,
d02ptc and
d02puc) solve the initial value problem for a firstorder system of ordinary differential equations. The functions, based on Runge–Kutta methods and derived from RKSUITE (see
Brankin et al. (1991)), integrate
where
$y$ is the vector of
$\mathit{n}$ solution components and
$t$ is the independent variable.
d02pfc computes the solution at the end of an integration step. Using the information computed on that step
d02psc computes the solution by interpolation at any point on that step. It cannot be used if
${\mathbf{method}}=\mathrm{Nag\_RK\_7\_8}$ was specified in the call to setup function
d02pqc.
Brankin R W, Gladwell I and Shampine L F (1991) RKSUITE: A suite of Runge–Kutta codes for the initial value problems for ODEs SoftReport 91S1 Southern Methodist University
 NE_ALLOC_FAIL

Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
 NE_BAD_PARAM

On entry, argument $\u27e8\mathit{\text{value}}\u27e9$ had an illegal value.
 NE_INT

On entry, ${\mathbf{lwcomm}}=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: for ${\mathbf{method}}=\mathrm{Nag\_RK\_2\_3}$, ${\mathbf{lwcomm}}\ge 1$.
 NE_INT_2

On entry, ${\mathbf{nwant}}=\u27e8\mathit{\text{value}}\u27e9$ and ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: $1\le {\mathbf{nwant}}\le {\mathbf{n}}$.
 NE_INT_3

On entry, ${\mathbf{lwcomm}}=\u27e8\mathit{\text{value}}\u27e9$, ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$ and ${\mathbf{nwant}}=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: for ${\mathbf{method}}=\mathrm{Nag\_RK\_4\_5}$, ${\mathbf{lwcomm}}\ge {\mathbf{n}}+\mathrm{max}\phantom{\rule{0.125em}{0ex}}({\mathbf{n}},5\times {\mathbf{nwant}})$.
 NE_INT_CHANGED

On entry, ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$, but the value passed to the setup function was ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$.
 NE_INTERNAL_ERROR

An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
 NE_MISSING_CALL

You cannot call this function before you have called the step integrator.
 NE_NO_LICENCE

Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
 NE_PREV_CALL

On entry, a previous call to the setup function has not been made or the communication arrays have become corrupted, or a catastrophic error has already been detected elsewhere.
You cannot continue integrating the problem.
 NE_PREV_CALL_INI

You cannot call this function after the integrator has returned an error.
 NE_RK_INVALID_CALL

You cannot call this function when you have specified, in the setup function, that the range integrator will be used.
 NE_RK_NO_INTERP

${\mathbf{method}}=\mathrm{Nag\_RK\_7\_8}$ in setup, but interpolation is not available for this method. Either use ${\mathbf{method}}=\mathrm{Nag\_RK\_4\_5}$ in setup or use reset function to force the integrator to step to particular points.
The computed values will be of a similar accuracy to that computed by
d02pfc.
Background information to multithreading can be found in the
Multithreading documentation.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementationspecific information.
None.
This example solves the equation
reposed as
over the range
$[0,2\pi ]$ with initial conditions
${y}_{1}=0.0$ and
${y}_{2}=1.0$. Relative error control is used with threshold values of
$\text{1.0e\u22128}$ for each solution component.
d02pfc is used to integrate the problem one step at a time and
d02psc is used to compute the first component of the solution and its derivative at intervals of length
$\pi /8$ across the range whenever these points lie in one of those integration steps. A low order Runge–Kutta method (
${\mathbf{method}}=\mathrm{Nag\_RK\_2\_3}$) is also used with tolerances
${\mathbf{tol}}=\text{1.0e\u22124}$ and
${\mathbf{tol}}=\text{1.0e\u22125}$ in turn so that solutions may be compared.