<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>D03PDF/D03PDA : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/D03/d03pdf.pdf">D03PDF/D03PDA (PDF version)</a></div><div><a class="chap" href="d03conts.xml">D03 Chapter Contents</a></div><div><a class="chapint" href="d03intro.xml">D03 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>D03PDF/D03PDA</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> 
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocspecification');"><span class="htmltocplus" id="tocspecificationplus">+</span><span class="htmltocminus" id="tocspecificationminus">&#8722;</span></span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
<div class="htmltocitem" id="tocspecification">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routFspec">2.1&#160;&#160;<b>Specification for D03PDF</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#routAspec">2.2&#160;&#160;<b>Specification for D03PDA</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">D03PDF/D03PDA integrates a system of linear or nonlinear parabolic partial differential equations (PDEs) in one space variable.  The spatial discretization is performed using a Chebyshev <m:math><m:msup><m:mi>C</m:mi><m:mn>0</m:mn></m:msup></m:math>&#160;collocation method, and the method of lines is employed to reduce the PDEs to a system of ordinary differential equations (ODEs).  The resulting system is solved using a backward differentiation formula method.</div><div class="paramtext">D03PDA is a version of D03PDF that has additional parameters in order to make it safe for use in multithreaded applications (see <a class="sec" href="#parameters">Section 5</a>).</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2><h3 class="standard"><a class="sec" name="routFspec" id="routFspec"/>2.1&#160;&#160;Specification for D03PDF</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;D03PDF&#160;(</td><td class="tdfspec2"><a class="arg" href="#NPDE">NPDE</a>, <a class="arg" href="#M">M</a>, <a class="arg" href="#TS">TS</a>, <a class="arg" href="#TOUT">TOUT</a>, <a class="arg" href="#PDEDEF">PDEDEF</a>, <a class="arg" href="#BNDARY">BNDARY</a>, <a class="arg" href="#U">U</a>, <a class="arg" href="#NBKPTS">NBKPTS</a>, <a class="arg" href="#XBKPTS">XBKPTS</a>, <a class="arg" href="#NPOLY">NPOLY</a>, <a class="arg" href="#NPTS">NPTS</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#UINIT">UINIT</a>, <a class="arg" href="#ACC">ACC</a>, <a class="arg" href="#RSAVE">RSAVE</a>, <a class="arg" href="#LRSAVE">LRSAVE</a>, <a class="arg" href="#ISAVE">ISAVE</a>, <a class="arg" href="#LISAVE">LISAVE</a>, <a class="arg" href="#ITASK">ITASK</a>, <a class="arg" href="#ITRACE">ITRACE</a>, <a class="arg" href="#IND">IND</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, M, NBKPTS, NPOLY, NPTS, LRSAVE, ISAVE(LISAVE), LISAVE, ITASK, ITRACE, IND, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">TS, TOUT, U(NPDE,NPTS), XBKPTS(NBKPTS), X(NPTS), ACC, RSAVE(LRSAVE)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">PDEDEF, BNDARY, UINIT</td></tr></table><h3 class="standard"><a class="sec" name="routAspec" id="routAspec"/>2.2&#160;&#160;Specification for D03PDA</h3>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;D03PDA&#160;(</td><td class="tdfspec2"><a class="arg" href="#NPDE">NPDE</a>, <a class="arg" href="#M">M</a>, <a class="arg" href="#TS">TS</a>, <a class="arg" href="#TOUT">TOUT</a>, <a class="arg" href="#PDEDEF">PDEDEF</a>, <a class="arg" href="#BNDARY">BNDARY</a>, <a class="arg" href="#U">U</a>, <a class="arg" href="#NBKPTS">NBKPTS</a>, <a class="arg" href="#XBKPTS">XBKPTS</a>, <a class="arg" href="#NPOLY">NPOLY</a>, <a class="arg" href="#NPTS">NPTS</a>, <a class="arg" href="#X">X</a>, <a class="arg" href="#UINIT">UINIT</a>, <a class="arg" href="#ACC">ACC</a>, <a class="arg" href="#RSAVE">RSAVE</a>, <a class="arg" href="#LRSAVE">LRSAVE</a>, <a class="arg" href="#ISAVE">ISAVE</a>, <a class="arg" href="#LISAVE">LISAVE</a>, <a class="arg" href="#ITASK">ITASK</a>, <a class="arg" href="#ITRACE">ITRACE</a>, <a class="arg" href="#IND">IND</a>, <a class="arg" href="#IUSER">IUSER</a>, <a class="arg" href="#RUSER">RUSER</a>, <a class="arg" href="#CWSAV">CWSAV</a>, <a class="arg" href="#LWSAV">LWSAV</a>, <a class="arg" href="#IWSAV">IWSAV</a>, <a class="arg" href="#RWSAV">RWSAV</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, M, NBKPTS, NPOLY, NPTS, LRSAVE, ISAVE(LISAVE), LISAVE, ITASK, ITRACE, IND, IUSER(*), IWSAV(505), IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">TS, TOUT, U(NPDE,NPTS), XBKPTS(NBKPTS), X(NPTS), ACC, RSAVE(LRSAVE), RUSER(*), RWSAV(1100)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LWSAV(100)</td></tr><tr><td class="tdfspec1">CHARACTER*80</td><td class="tdfspec2">CWSAV(10)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">PDEDEF, BNDARY, UINIT</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D03PDF/D03PDA integrates the system of parabolic equations:

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:munderover><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mi>j</m:mi></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>t</m:mi></m:mrow>
 </m:mfrac><m:mo>+</m:mo><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msup><m:mi>x</m:mi><m:mrow><m:mo>-</m:mo><m:mi>m</m:mi></m:mrow></m:msup><m:mfrac other="display">
 <m:mo>&#8706;</m:mo><m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac><m:mfenced separators=""><m:msup><m:mi>x</m:mi><m:mi>m</m:mi></m:msup><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:mfenced><m:mtext>, &#8195;</m:mtext><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mtext>, &#8195;</m:mtext><m:mi>a</m:mi><m:mo>&#8804;</m:mo><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mi>b</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>&#8805;</m:mo><m:msub><m:mi>t</m:mi><m:mn>0</m:mn></m:msub><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

where <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;depend on <m:math><m:mi>x</m:mi></m:math>, <m:math><m:mi>t</m:mi></m:math>, <m:math><m:mi>U</m:mi></m:math>, <m:math><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;and the vector <m:math><m:mi>U</m:mi></m:math>&#160;is the set of solution values

<div class="formula-eqn"><a name="eqn2" id="eqn2"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
 <m:mi>U</m:mi>
 <m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced>
 <m:mo>=</m:mo>
 <m:msup>
  <m:mfenced separators="" open="[" close="]"><m:mrow>
    <m:msub>
     <m:mi>U</m:mi>
     <m:mn>1</m:mn>
    </m:msub>
    <m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced>
   </m:mrow><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mrow>
    <m:msub>
     <m:mi>U</m:mi>
     <m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction>
    </m:msub>
    <m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced>
   </m:mrow></m:mfenced>
  <m:mi mathvariant="normal">T</m:mi>
 </m:msup>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (2)
     </td></tr></table></div>

and the vector <m:math><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;is its partial derivative with respect to <m:math><m:mi>x</m:mi></m:math>.  Note that <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;must not depend on <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>U</m:mi></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>t</m:mi></m:mrow>
 </m:mfrac>
</m:math>.</div><div class="paramtext">The integration in time is from <m:math><m:msub><m:mi>t</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;to <m:math><m:msub><m:mi>t</m:mi><m:mi mathvariant="normal">out</m:mi></m:msub></m:math>, over the space interval <m:math><m:mi>a</m:mi><m:mo>&#8804;</m:mo><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mi>b</m:mi></m:math>, where <m:math><m:mi>a</m:mi><m:mo>=</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:math>&#160;and <m:math><m:mi>b</m:mi><m:mo>=</m:mo><m:msub><m:mi>x</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction></m:msub></m:math>&#160;are the leftmost and rightmost of a user-defined set of break points <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction></m:msub></m:math>.  The co-ordinate system in space is defined by the value of <m:math><m:mi>m</m:mi></m:math>; <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;for Cartesian co-ordinates, <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;for cylindrical polar co-ordinates and <m:math><m:mi>m</m:mi><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;for spherical polar co-ordinates.</div><div class="paramtext">The system is defined by the functions <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;which must be specified in <a class="arg" href="#PDEDEF">PDEDEF</a>.</div><div class="paramtext">The initial values of the functions <m:math><m:mi>U</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;must be given at <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:msub><m:mi>t</m:mi><m:mn>0</m:mn></m:msub></m:math>, and must be specified in <a class="arg" href="#UINIT">UINIT</a>.</div><div class="paramtext">The functions <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>, which may be thought of as fluxes, are also used in the definition of the boundary conditions for each equation.  The boundary conditions must have the form

<div class="formula-eqn"><a name="eqn3" id="eqn3"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:msub><m:mi>&#946;</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>,</m:mo><m:mi>U</m:mi><m:mo>,</m:mo><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>&#947;</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>,</m:mo><m:mi>U</m:mi><m:mo>,</m:mo><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:mfenced><m:mtext>, &#8195;</m:mtext><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mtext>,</m:mtext>
</m:math></td><td class="formula-eqn2">
      (3)
     </td></tr></table></div>

where <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>a</m:mi></m:math>&#160;or <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math>.</div><div class="paramtext">The boundary conditions must be specified in <a class="arg" href="#BNDARY">BNDARY</a>.  Thus, the problem is subject to the following restrictions:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(i)</td>
<td valign="top"><m:math><m:msub><m:mi>t</m:mi><m:mn>0</m:mn></m:msub><m:mo>&lt;</m:mo><m:msub><m:mi>t</m:mi><m:mi mathvariant="normal">out</m:mi></m:msub></m:math>, so that integration is in the forward direction;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(ii)</td>
<td valign="top"><m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and the flux <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;must not depend on any time derivatives;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iii)</td>
<td valign="top">the evaluation of the functions <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;is done at both the break points and internally selected points for each element in turn, that is <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are evaluated twice at each break point.  Any discontinuities in these functions <b>must</b> therefore be at one or more of the break points <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction></m:msub></m:math>;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(iv)</td>
<td valign="top">at least one of the functions <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>&#160;must be nonzero so that there is a time derivative present in the problem;</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(v)</td>
<td valign="top">if <m:math><m:mi>m</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>, which is the left boundary point, then it must be ensured that the PDE solution is bounded at this point.  This can be done by either specifying the solution at <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>&#160;or by specifying a zero flux there, that is <m:math><m:msub><m:mi>&#946;</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:mn>1.0</m:mn></m:math>&#160;and <m:math><m:msub><m:mi>&#947;</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>.  See also <a class="sec" href="#fcomments">Section 8</a>.</td>
</tr></table>
</div><div class="paramtext">The parabolic equations are approximated by a system of ODEs in time for the values of <m:math><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;at the mesh points.  This ODE system is obtained by approximating the PDE solution between each pair of break points by a Chebyshev polynomial of degree <a class="arg" href="#NPOLY">NPOLY</a>.  The interval between each pair of break points is treated by D03PDF/D03PDA as an element, and on this element, a polynomial and its space and time derivatives are made to satisfy the system of PDEs at <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;spatial points, which are chosen internally by the code and the break points.  In the case of just one element, the break points are the boundaries.  The user-defined break points and the internally selected points together define the mesh.  The smallest value that <a class="arg" href="#NPOLY">NPOLY</a> can take is one, in which case, the solution is approximated by piecewise linear polynomials between consecutive break points and the method is similar to an ordinary finite element method.</div><div class="paramtext">In total there are <m:math><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>&#160;mesh points in the spatial direction, and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mo>&#215;</m:mo><m:mfenced separators=""><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;ODEs in the time direction; one ODE at each break point for each PDE component and (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:math>) ODEs for each PDE component between each pair of break points.  The system is then integrated forwards in time using a backward differentiation formula method.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref213" id="ref213"/>Berzins M (1990)  Developments in the NAG Library software for parabolic equations <i>Scientific Software Systems</i> (eds J C Mason and M G Cox) 59&#8211;72 Chapman and Hall </div>
<div class="paramtext"><a name="ref307" id="ref307"/>Berzins M and Dew P M (1991)  Algorithm 690: Chebyshev polynomial software for elliptic-parabolic systems of PDEs <i>ACM Trans. Math. Software</i> <b>17</b> 178&#8211;206 </div>
<div class="paramtext"><a name="ref309" id="ref309"/>Zaturska N B, Drazin P G and Banks W H H (1988)  On the flow of a viscous fluid driven along a channel by a suction at porous walls <i>Fluid Dynamics Research</i> <b>4</b> </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="NPDE" id="NPDE"/>1: &#160;&#160;&#8194; NPDE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

the number of PDEs in the system to be solved.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="M" id="M"/>2: &#160;&#160;&#8194; M &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the co-ordinate system used:

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Indicates Cartesian co-ordinates.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>Indicates cylindrical polar co-ordinates.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>Indicates spherical polar co-ordinates.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="TS" id="TS"/>3: &#160;&#160;&#8194; TS &#8211; <span class="bitalic">double precision</span><span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the initial value of the independent variable <m:math><m:mi>t</m:mi></m:math>.</div><div class="paramtext"><i>On exit</i>: the value of <m:math><m:mi>t</m:mi></m:math>&#160;corresponding to the solution values in <a class="arg" href="#U">U</a>. Normally <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOUT"><m:mi mathcolor="#EE0000" mathvariant="bold">TOUT</m:mi></m:maction></m:math>.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOUT"><m:mi mathcolor="#EE0000" mathvariant="bold">TOUT</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="TOUT" id="TOUT"/>4: &#160;&#160;&#8194; TOUT &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the final value of <m:math><m:mi>t</m:mi></m:math>&#160;to which the integration is to be carried out.</div></dd><dt class="paramhead"><a name="PDEDEF" id="PDEDEF"/>5: &#160;&#160;&#8194; PDEDEF &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="arg" href="#PDEDEF">PDEDEF</a> must compute the values of the functions <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;which define the system of PDEs. The functions may depend on <m:math><m:mi>x</m:mi></m:math>, <m:math><m:mi>t</m:mi></m:math>, <m:math><m:mi>U</m:mi></m:math>&#160;and <m:math><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:math>&#160;and must be evaluated at a set of points.</div><div class="subprog">
<div class="paramtext">The specification of 
   <a class="arg" href="#PDEDEF">PDEDEF</a>
   for D03PDF is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;PDEDEF&#160;(</td><td class="tdfspec2"><a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_T">T</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_X">X</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_U">U</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_UX">UX</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_P">P</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_Q">Q</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_R">R</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IRES">IRES</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, NPTL, IRES</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">T, X(NPTL), U(NPDE,NPTL), UX(NPDE,NPTL), P(NPDE,NPDE,NPTL), Q(NPDE,NPTL), R(NPDE,NPTL)</td></tr></table>
<div class="paramtext">The specification of 
   <a class="arg" href="#PDEDEF">PDEDEF</a>
   for D03PDA is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;PDEDEF&#160;(</td><td class="tdfspec2"><a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_T">T</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_X">X</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_U">U</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_UX">UX</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_P">P</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_Q">Q</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_R">R</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IRES">IRES</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IUSER">IUSER</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_RUSER">RUSER</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, NPTL, IRES, IUSER(*)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">T, X(NPTL), U(NPDE,NPTL), UX(NPDE,NPTL), P(NPDE,NPDE,NPTL), Q(NPDE,NPTL), R(NPDE,NPTL), RUSER(*)</td></tr></table>
<dl><dt class="paramhead"><a name="PDEDEF_NPDE" id="PDEDEF_NPDE"/>1: &#160;&#160;&#8194; NPDE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the number of PDEs in the system.</div></dd><dt class="paramhead"><a name="PDEDEF_T" id="PDEDEF_T"/>2: &#160;&#160;&#8194; T &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the current value of the independent variable <m:math><m:mi>t</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_X" id="PDEDEF_X"/>3: &#160;&#160;&#8194; X(<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: contains a set of mesh points at which <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub></m:math>, <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;are to be evaluated. <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;contain successive user-supplied break points and the elements of the array will satisfy <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mo>&#8943;</m:mo><m:mo>&lt;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_NPTL" id="PDEDEF_NPTL"/>4: &#160;&#160;&#8194; NPTL &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the number of points at which evaluations are required (the value of <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>).</div></dd><dt class="paramhead"><a name="PDEDEF_U" id="PDEDEF_U"/>5: &#160;&#160;&#8194; U(<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_U"><m:mi mathcolor="#EE0000" mathvariant="bold">U</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the value of the component <m:math><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;where <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_UX" id="PDEDEF_UX"/>6: &#160;&#160;&#8194; UX(<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_UX"><m:mi mathcolor="#EE0000" mathvariant="bold">UX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the value of the component <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac>
</m:math>&#160;where <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_P" id="PDEDEF_P"/>7: &#160;&#160;&#8194; P(<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_P"><m:mi mathcolor="#EE0000" mathvariant="bold">P</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to the value of <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>,</m:mo><m:mi>U</m:mi><m:mo>,</m:mo><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:mfenced></m:math>&#160;where <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>k</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>k</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_Q" id="PDEDEF_Q"/>8: &#160;&#160;&#8194; Q(<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_Q"><m:mi mathcolor="#EE0000" mathvariant="bold">Q</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to the value of <m:math><m:msub><m:mi>Q</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>,</m:mo><m:mi>U</m:mi><m:mo>,</m:mo><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:mfenced></m:math>&#160;where <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_R" id="PDEDEF_R"/>9: &#160;&#160;&#8194; R(<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#PDEDEF_NPTL">NPTL</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_R"><m:mi mathcolor="#EE0000" mathvariant="bold">R</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to the value of <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>,</m:mo><m:mi>U</m:mi><m:mo>,</m:mo><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:mfenced></m:math>&#160;where <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_NPTL"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTL</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="PDEDEF_IRES" id="PDEDEF_IRES"/>10: &#8194; IRES &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: set to <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>.</div><div class="paramtext"><i>On exit</i>: should usually remain unchanged. However, you may set <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IRES">IRES</a> to force the integration routine to take certain actions as described below:

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>Indicates to the integrator that control should be passed back immediately to the calling subroutine with the error indicator set to <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq6"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Indicates to the integrator that the current time step should be abandoned and a smaller time step used instead. You may wish to set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;when a physically meaningless input or output value has been generated. If you consecutively set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PDEDEF_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>, then D03PDF/D03PDA returns to the calling subroutine with the error indicator set to <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq4"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>.</dd></dl>
</div></dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with D03PDA.  Users of D03PDF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="PDEDEF_IUSER" id="PDEDEF_IUSER"/>11: &#8194; IUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dt class="multi-paramhead"><a name="PDEDEF_RUSER" id="PDEDEF_RUSER"/>12: &#8194; RUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><a class="arg" href="#PDEDEF">PDEDEF</a> is called from D03PDA with the parameters <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IUSER">IUSER</a> and <a class="arg" href="../D03/d03pdf.xml#PDEDEF_RUSER">RUSER</a> as supplied to D03PDA. You are free to use the arrays <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IUSER">IUSER</a> and <a class="arg" href="../D03/d03pdf.xml#PDEDEF_RUSER">RUSER</a> to supply information to <a class="arg" href="#PDEDEF">PDEDEF</a>.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#PDEDEF">PDEDEF</a> must be declared as EXTERNAL in the (sub)program from which D03PDF/D03PDA is called. Parameters denoted as <span class="italic">Input</span>  must <b>not</b>  be changed by this procedure.</div>
</dd><dt class="paramhead"><a name="BNDARY" id="BNDARY"/>6: &#160;&#160;&#8194; BNDARY &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="arg" href="#BNDARY">BNDARY</a> must compute the functions <m:math><m:msub><m:mi>&#946;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>&#947;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;which define the boundary conditions as in equation <a class="eqn" href="#eqn3">(3)</a>.</div><div class="subprog">
<div class="paramtext">The specification of 
   <a class="arg" href="#BNDARY">BNDARY</a>
   for D03PDF is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;BNDARY&#160;(</td><td class="tdfspec2"><a class="arg" href="../D03/d03pdf.xml#BNDARY_NPDE">NPDE</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_T">T</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_U">U</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_UX">UX</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_IBND">IBND</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_BETA">BETA</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_GAMMA">GAMMA</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_IRES">IRES</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, IBND, IRES</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">T, U(NPDE), UX(NPDE), BETA(NPDE), GAMMA(NPDE)</td></tr></table>
<div class="paramtext">The specification of 
   <a class="arg" href="#BNDARY">BNDARY</a>
   for D03PDA is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;BNDARY&#160;(</td><td class="tdfspec2"><a class="arg" href="../D03/d03pdf.xml#BNDARY_NPDE">NPDE</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_T">T</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_U">U</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_UX">UX</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_IBND">IBND</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_BETA">BETA</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_GAMMA">GAMMA</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_IRES">IRES</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_IUSER">IUSER</a>, <a class="arg" href="../D03/d03pdf.xml#BNDARY_RUSER">RUSER</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, IBND, IRES, IUSER(*)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">T, U(NPDE), UX(NPDE), BETA(NPDE), GAMMA(NPDE), RUSER(*)</td></tr></table>
<dl><dt class="paramhead"><a name="BNDARY_NPDE" id="BNDARY_NPDE"/>1: &#160;&#160;&#8194; NPDE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the number of PDEs in the system.</div></dd><dt class="paramhead"><a name="BNDARY_T" id="BNDARY_T"/>2: &#160;&#160;&#8194; T &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the current value of the independent variable <m:math><m:mi>t</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="BNDARY_U" id="BNDARY_U"/>3: &#160;&#160;&#8194; U(<a class="arg" href="../D03/d03pdf.xml#BNDARY_NPDE">NPDE</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_U"><m:mi mathcolor="#EE0000" mathvariant="bold">U</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the value of the component <m:math><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;at the boundary specified by <a class="arg" href="../D03/d03pdf.xml#BNDARY_IBND">IBND</a>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="BNDARY_UX" id="BNDARY_UX"/>4: &#160;&#160;&#8194; UX(<a class="arg" href="../D03/d03pdf.xml#BNDARY_NPDE">NPDE</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_UX"><m:mi mathcolor="#EE0000" mathvariant="bold">UX</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;contains the value of the component <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:mrow>
 <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac>
</m:math>&#160;at the boundary specified by <a class="arg" href="../D03/d03pdf.xml#BNDARY_IBND">IBND</a>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="BNDARY_IBND" id="BNDARY_IBND"/>5: &#160;&#160;&#8194; IBND &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: specifies which boundary conditions are to be evaluated. 

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_IBND"><m:mi mathcolor="#EE0000" mathvariant="bold">IBND</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd><a class="arg" href="#BNDARY">BNDARY</a> must set up the coefficients of the left-hand boundary, <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>a</m:mi></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_IBND"><m:mi mathcolor="#EE0000" mathvariant="bold">IBND</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math></dt>
<dd><a class="arg" href="#BNDARY">BNDARY</a> must set up the coefficients of the right-hand boundary, <m:math><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math>.</dd></dl>
</div></dd><dt class="paramhead"><a name="BNDARY_BETA" id="BNDARY_BETA"/>6: &#160;&#160;&#8194; BETA(<a class="arg" href="../D03/d03pdf.xml#BNDARY_NPDE">NPDE</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_BETA"><m:mi mathcolor="#EE0000" mathvariant="bold">BETA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to the value of <m:math><m:msub><m:mi>&#946;</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;at the boundary specified by <a class="arg" href="../D03/d03pdf.xml#BNDARY_IBND">IBND</a>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="BNDARY_GAMMA" id="BNDARY_GAMMA"/>7: &#160;&#160;&#8194; GAMMA(<a class="arg" href="../D03/d03pdf.xml#BNDARY_NPDE">NPDE</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_GAMMA"><m:mi mathcolor="#EE0000" mathvariant="bold">GAMMA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to the value of <m:math><m:msub><m:mi>&#947;</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi><m:mo>,</m:mo><m:mi>U</m:mi><m:mo>,</m:mo><m:msub><m:mi>U</m:mi><m:mi>x</m:mi></m:msub></m:mfenced></m:math>&#160;at the boundary specified by <a class="arg" href="../D03/d03pdf.xml#BNDARY_IBND">IBND</a>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="BNDARY_IRES" id="BNDARY_IRES"/>8: &#160;&#160;&#8194; IRES &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: set to <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>.</div><div class="paramtext"><i>On exit</i>: should usually remain unchanged. However, you may set <a class="arg" href="../D03/d03pdf.xml#BNDARY_IRES">IRES</a> to force the integration routine to take certain actions as described below:

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>Indicates to the integrator that control should be passed back immediately to the calling subroutine with the error indicator set to <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq6"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Indicates to the integrator that the current time step should be abandoned and a smaller time step used instead. You may wish to set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;when a physically meaningless input or output value has been generated. If you consecutively set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#BNDARY_IRES"><m:mi mathcolor="#EE0000" mathvariant="bold">IRES</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>, then D03PDF/D03PDA returns to the calling subroutine with the error indicator set to <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq4"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>.</dd></dl>
</div></dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with D03PDA.  Users of D03PDF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="BNDARY_IUSER" id="BNDARY_IUSER"/>9: &#160;&#160;&#8194; IUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dt class="multi-paramhead"><a name="BNDARY_RUSER" id="BNDARY_RUSER"/>10: &#8194; RUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><a class="arg" href="#BNDARY">BNDARY</a> is called from D03PDA with the parameters <a class="arg" href="../D03/d03pdf.xml#BNDARY_IUSER">IUSER</a> and <a class="arg" href="../D03/d03pdf.xml#BNDARY_RUSER">RUSER</a> as supplied to D03PDA. You are free to use the arrays <a class="arg" href="../D03/d03pdf.xml#BNDARY_IUSER">IUSER</a> and <a class="arg" href="../D03/d03pdf.xml#BNDARY_RUSER">RUSER</a> to supply information to <a class="arg" href="#BNDARY">BNDARY</a>.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#BNDARY">BNDARY</a> must be declared as EXTERNAL in the (sub)program from which D03PDF/D03PDA is called. Parameters denoted as <span class="italic">Input</span>  must <b>not</b>  be changed by this procedure.</div>
</dd><dt class="paramhead"><a name="U" id="U"/>7: &#160;&#160;&#8194; U(<a class="arg" href="#NPDE">NPDE</a>,<a class="arg" href="#NPTS">NPTS</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;the value of <a class="arg" href="#U">U</a> must be unchanged from the previous call.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#U"><m:mi mathcolor="#EE0000" mathvariant="bold">U</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;will contain the computed solution at <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="NBKPTS" id="NBKPTS"/>8: &#160;&#160;&#8194; NBKPTS &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

the number of break points in the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="XBKPTS" id="XBKPTS"/>9: &#160;&#160;&#8194; XBKPTS(<a class="arg" href="#NBKPTS">NBKPTS</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the values of the break points in the space direction. <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;must specify the left-hand boundary, <m:math><m:mi>a</m:mi></m:math>, and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;must specify the right-hand boundary, <m:math><m:mi>b</m:mi></m:math>.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mo>&#8943;</m:mo><m:mo>&lt;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div></dd><dt class="paramhead"><a name="NPOLY" id="NPOLY"/>10: &#8194; NPOLY &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the degree of the Chebyshev polynomial to be used in approximating the PDE solution between each pair of break points.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>49</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NPTS" id="NPTS"/>11: &#8194; NPTS &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

the number of mesh points in the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction><m:mo>=</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="X" id="X"/>12: &#8194; X(<a class="arg" href="#NPTS">NPTS</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the mesh points chosen by D03PDF/D03PDA in the spatial direction. The values of <a class="arg" href="#X">X</a> will satisfy <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mo>&#8943;</m:mo><m:mo>&lt;</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div></dd><dt class="paramhead"><a name="UINIT" id="UINIT"/>13: &#8194; UINIT &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="arg" href="#UINIT">UINIT</a> must compute the initial values of the PDE components <m:math><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>t</m:mi><m:mn>0</m:mn></m:msub></m:mfenced></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction></m:math>.</div><div class="subprog">
<div class="paramtext">The specification of 
   <a class="arg" href="#UINIT">UINIT</a>
   for D03PDF is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;UINIT&#160;(</td><td class="tdfspec2"><a class="arg" href="../D03/d03pdf.xml#UINIT_NPDE">NPDE</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_NPTS">NPTS</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_X">X</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_U">U</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, NPTS</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X(NPTS), U(NPDE,NPTS)</td></tr></table>
<div class="paramtext">The specification of 
   <a class="arg" href="#UINIT">UINIT</a>
   for D03PDA is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;UINIT&#160;(</td><td class="tdfspec2"><a class="arg" href="../D03/d03pdf.xml#UINIT_NPDE">NPDE</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_NPTS">NPTS</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_X">X</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_U">U</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_IUSER">IUSER</a>, <a class="arg" href="../D03/d03pdf.xml#UINIT_RUSER">RUSER</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NPDE, NPTS, IUSER(*)</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X(NPTS), U(NPDE,NPTS), RUSER(*)</td></tr></table>
<dl><dt class="paramhead"><a name="UINIT_NPDE" id="UINIT_NPDE"/>1: &#160;&#160;&#8194; NPDE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the number of PDEs in the system.</div></dd><dt class="paramhead"><a name="UINIT_NPTS" id="UINIT_NPTS"/>2: &#160;&#160;&#8194; NPTS &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

the number of mesh points in the interval <m:math><m:mfenced separators="" open="[" close="]"><m:mi>a</m:mi><m:mo>,</m:mo><m:mi>b</m:mi></m:mfenced></m:math>.</div></dd><dt class="paramhead"><a name="UINIT_X" id="UINIT_X"/>3: &#160;&#160;&#8194; X(<a class="arg" href="../D03/d03pdf.xml#UINIT_NPTS">NPTS</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>, contains the values of the <m:math><m:mi>j</m:mi></m:math>th mesh point, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction></m:math>.</div></dd><dt class="paramhead"><a name="UINIT_U" id="UINIT_U"/>4: &#160;&#160;&#8194; U(<a class="arg" href="../D03/d03pdf.xml#UINIT_NPDE">NPDE</a>,<a class="arg" href="../D03/d03pdf.xml#UINIT_NPTS">NPTS</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_U"><m:mi mathcolor="#EE0000" mathvariant="bold">U</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to the initial value <m:math><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>j</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>t</m:mi><m:mn>0</m:mn></m:msub></m:mfenced></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#UINIT_NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction></m:math>.</div></dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with D03PDA.  Users of D03PDF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="UINIT_IUSER" id="UINIT_IUSER"/>5: &#160;&#160;&#8194; IUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dt class="multi-paramhead"><a name="UINIT_RUSER" id="UINIT_RUSER"/>6: &#160;&#160;&#8194; RUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><a class="arg" href="#UINIT">UINIT</a> is called from D03PDA with the parameters <a class="arg" href="../D03/d03pdf.xml#UINIT_IUSER">IUSER</a> and <a class="arg" href="../D03/d03pdf.xml#UINIT_RUSER">RUSER</a> as supplied to D03PDA. You are free to use the arrays <a class="arg" href="../D03/d03pdf.xml#UINIT_IUSER">IUSER</a> and <a class="arg" href="../D03/d03pdf.xml#UINIT_RUSER">RUSER</a> to supply information to <a class="arg" href="#UINIT">UINIT</a>.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#UINIT">UINIT</a> must be declared as EXTERNAL in the (sub)program from which D03PDF/D03PDA is called. Parameters denoted as <span class="italic">Input</span>  must <b>not</b>  be changed by this procedure.</div>
</dd><dt class="paramhead"><a name="ACC" id="ACC"/>14: &#8194; ACC &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: a positive quantity for controlling the local error estimate in the time integration. If <m:math><m:mi>E</m:mi><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>&#160;is the estimated error for <m:math><m:msub><m:mi>U</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;at the <m:math><m:mi>j</m:mi></m:math>th mesh point, the error test is:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mfenced open="|" close="|" separators=""><m:mi>E</m:mi><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:mfenced><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#ACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ACC</m:mi></m:maction><m:mo>&#215;</m:mo><m:mfenced separators=""><m:mn>1.0</m:mn><m:mo>+</m:mo><m:mfenced open="|" close="|" separators=""><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#U"><m:mi mathcolor="#EE0000" mathvariant="bold">U</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:mfenced></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ACC</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="RSAVE" id="RSAVE"/>15: &#8194; RSAVE(<a class="arg" href="#LRSAVE">LRSAVE</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#RSAVE">RSAVE</a> need not be set on entry.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <a class="arg" href="#RSAVE">RSAVE</a> must be unchanged from the previous call to the routine because it contains required information about the iteration.</div></dd><dt class="paramhead"><a name="LRSAVE" id="LRSAVE"/>16: &#8194; LRSAVE &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the dimension of the array <a class="arg" href="#RSAVE">RSAVE</a> as declared in the (sub)program from which D03PDF/D03PDA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LRSAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">LRSAVE</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>11</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction><m:mo>+</m:mo><m:mn>50</m:mn><m:mo>+</m:mo><m:mi mathvariant="italic">nwkres</m:mi><m:mo>+</m:mo><m:mi mathvariant="italic">lenode</m:mi></m:math>.
</div></dd><dt class="paramhead"><a name="ISAVE" id="ISAVE"/>17: &#8194; ISAVE(<a class="arg" href="#LISAVE">LISAVE</a>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dd>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#ISAVE">ISAVE</a> need not be set on entry.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <a class="arg" href="#ISAVE">ISAVE</a> must be unchanged from the previous call to the routine because it contains required information about the iteration. In particular:

<dl>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISAVE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math></dt>
<dd>Contains the number of steps taken in time.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISAVE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math></dt>
<dd>Contains the number of residual evaluations of the resulting ODE system used. One such evaluation involves computing the PDE functions at all the mesh points, as well as one evaluation of the functions in the boundary conditions.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISAVE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow></m:math></dt>
<dd>Contains the number of Jacobian evaluations performed by the time integrator.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISAVE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow></m:math></dt>
<dd>Contains the order of the last backward differentiation formula method used.</dd>
<dt class="paramval"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">ISAVE</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>5</m:mn></m:mfenced></m:mrow></m:math></dt>
<dd>Contains the number of Newton iterations performed by the time integrator. Each iteration involves an ODE residual evaluation followed by a back-substitution using the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;decomposition of the Jacobian matrix.</dd></dl>
</div></dd><dt class="paramhead"><a name="LISAVE" id="LISAVE"/>18: &#8194; LISAVE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the dimension of the array <a class="arg" href="#ISAVE">ISAVE</a> as declared in the (sub)program from which D03PDF/D03PDA is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LISAVE"><m:mi mathcolor="#EE0000" mathvariant="bold">LISAVE</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction><m:mo>+</m:mo><m:mn>24</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="ITASK" id="ITASK"/>19: &#8194; ITASK &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: specifies the task to be performed by the ODE integrator.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITASK"><m:mi mathcolor="#EE0000" mathvariant="bold">ITASK</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>Normal computation of output values <a class="arg" href="#U">U</a> at <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOUT"><m:mi mathcolor="#EE0000" mathvariant="bold">TOUT</m:mi></m:maction></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITASK"><m:mi mathcolor="#EE0000" mathvariant="bold">ITASK</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>One step and return.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITASK"><m:mi mathcolor="#EE0000" mathvariant="bold">ITASK</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Stop at first internal integration point at or beyond <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOUT"><m:mi mathcolor="#EE0000" mathvariant="bold">TOUT</m:mi></m:maction></m:math>.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITASK"><m:mi mathcolor="#EE0000" mathvariant="bold">ITASK</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="ITRACE" id="ITRACE"/>20: &#8194; ITRACE &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the level of trace information required from D03PDF/D03PDA and the underlying ODE solver. <a class="arg" href="#ITRACE">ITRACE</a> may take the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>. 

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math></dt>
<dd>No output is generated.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Only warning messages from the PDE solver are printed on the current error message unit (see <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Output from the underlying ODE solver is printed on the current advisory message unit (see <a class="rout" href="../X04/x04abf.xml">X04ABF</a>). This output contains details of Jacobian entries, the nonlinear iteration and the time integration during the computation of the ODE system.</dd></dl>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>&lt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, then <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;is assumed and similarly if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>3</m:mn></m:math>, then <m:math><m:mn>3</m:mn></m:math>&#160;is assumed.</div>
<div class="paramtext">The advisory messages are given in greater detail as <a class="arg" href="#ITRACE">ITRACE</a> increases. You are advised to set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, unless you are experienced with <a class="chap" href="../D02/d02conts.xml">sub-chapter D02M&#8211;N</a>.</div>
</div></dd><dt class="paramhead"><a name="IND" id="IND"/>21: &#8194; IND &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: indicates whether this is a continuation call or a new integration.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Starts or restarts the integration in time.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>Continues the integration after an earlier exit from the routine. In this case, only the parameters <a class="arg" href="#TOUT">TOUT</a> and <a class="arg" href="#IFAIL">IFAIL</a> should be reset between calls to D03PDF/D03PDA.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>.
</div><div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>.</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>22: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> <span class="italic">for D03PDA, <a class="arg" href="#IFAIL">IFAIL</a> does not occur in this position in the parameter list.  See the additional parameters described below</span>.</div><div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>). <div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, if you are not familiar with this parameter, the recommended value is <m:math><m:mn>0</m:mn></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn mathvariant="bold">1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div></div></dd><dd class="note"><b>Note:</b> <span class="italic"> the following are additional parameters for specific use with D03PDA.  Users of D03PDF therefore need not read the remainder of this description</span>.</dd><dt class="paramhead"><a name="IUSER" id="IUSER"/>22: &#8194; IUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; INTEGER array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#IUSER">IUSER</a>
must be at least
<m:math><m:mn>1</m:mn></m:math>.</div>
<div class="paramtext"><a class="arg" href="#IUSER">IUSER</a> is not used by D03PDA, but is passed directly to <a class="arg" href="#PDEDEF">PDEDEF</a>, <a class="arg" href="#BNDARY">BNDARY</a> and <a class="arg" href="#UINIT">UINIT</a> and may be used to pass information to these routines.</div></dd><dt class="paramhead"><a name="RUSER" id="RUSER"/>23: &#8194; RUSER(<m:math><m:mo>*</m:mo></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">User Workspace</span></dt><dd><div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#RUSER">RUSER</a>
must be at least
<m:math><m:mn>1</m:mn></m:math>.</div>
<div class="paramtext"><a class="arg" href="#RUSER">RUSER</a> is not used by D03PDA, but is passed directly to <a class="arg" href="#PDEDEF">PDEDEF</a>, <a class="arg" href="#BNDARY">BNDARY</a> and <a class="arg" href="#UINIT">UINIT</a> and may be used to pass information to these routines.</div></dd><dt class="paramhead"><a name="CWSAV" id="CWSAV"/>24: &#8194; CWSAV(<m:math><m:mn>10</m:mn></m:math>) &#8211; CHARACTER*80 array<span class="pclass">Communication Array</span></dt><dd/><dt class="paramhead"><a name="LWSAV" id="LWSAV"/>25: &#8194; LWSAV(<m:math><m:mn>100</m:mn></m:math>) &#8211; LOGICAL array<span class="pclass">Communication Array</span></dt><dd/><dt class="paramhead"><a name="IWSAV" id="IWSAV"/>26: &#8194; IWSAV(<m:math><m:mn>505</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dd/><dt class="paramhead"><a name="RWSAV" id="RWSAV"/>27: &#8194; RWSAV(<m:math><m:mn>1100</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd/><dt class="paramhead"><a name="IFAIL2" id="IFAIL2"/>28: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><b>Note:</b> see the parameter description for <a class="arg" href="#IFAIL">IFAIL</a> above.</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOUT"><m:mi mathcolor="#EE0000" mathvariant="bold">TOUT</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOUT"><m:mi mathcolor="#EE0000" mathvariant="bold">TOUT</m:mi></m:maction><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>&#160;is too small,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITASK"><m:mi mathcolor="#EE0000" mathvariant="bold">ITASK</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mn>2</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPDE"><m:mi mathcolor="#EE0000" mathvariant="bold">NPDE</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>2</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>49</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NPTS</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">NBKPTS</m:mi></m:maction><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPOLY"><m:mi mathcolor="#EE0000" mathvariant="bold">NPOLY</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ACC"><m:mi mathcolor="#EE0000" mathvariant="bold">ACC</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IND"><m:mi mathcolor="#EE0000" mathvariant="bold">IND</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90">break points <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#XBKPTS"><m:mi mathcolor="#EE0000" mathvariant="bold">XBKPTS</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;are not ordered,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><a class="arg" href="#LRSAVE">LRSAVE</a> is too small,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><a class="arg" href="#LISAVE">LISAVE</a> is too small.</td></tr></table>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<div class="paramtext">The underlying ODE solver cannot make any further progress across the integration range from the current point <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>&#160;with the supplied value of <a class="arg" href="#ACC">ACC</a>. The components of <a class="arg" href="#U">U</a> contain the computed values at the current point <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>
<div class="paramtext">In the underlying ODE solver, there were repeated errors or corrector convergence test failures on an attempted step, before completing the requested task. The problem may have a singularity or <a class="arg" href="#ACC">ACC</a> is too small for the integration to continue. Integration was successful as far as <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>
<div class="paramtext">In setting up the ODE system, the internal initialization routine was unable to initialize the derivative of the ODE system. This could be due to the fact that <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IRES">IRES</a> was repeatedly set to <m:math><m:mn>3</m:mn></m:math>&#160;in at least <a class="arg" href="#PDEDEF">PDEDEF</a> or <a class="arg" href="#BNDARY">BNDARY</a>, when the residual in the underlying ODE solver was being evaluated.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq5" id="IFeq5"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>
<div class="paramtext">In solving the ODE system, a singular Jacobian has been encountered. You should check your problem formulation.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq6" id="IFeq6"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>6</m:mn></m:math></dt>
<dd>
<div class="paramtext">When evaluating the residual in solving the ODE system, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IRES">IRES</a> was set to <m:math><m:mn>2</m:mn></m:math>&#160;in at least <a class="arg" href="#PDEDEF">PDEDEF</a> or <a class="arg" href="#BNDARY">BNDARY</a>. Integration was successful as far as <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TS"><m:mi mathcolor="#EE0000" mathvariant="bold">TS</m:mi></m:maction></m:math>.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq7" id="IFeq7"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>7</m:mn></m:math></dt>
<dd>
<div class="paramtext">The value of <a class="arg" href="#ACC">ACC</a> is so small that the routine is unable to start the integration in time.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq8" id="IFeq8"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>8</m:mn></m:math></dt>
<dd>
<div class="paramtext">In one of <a class="arg" href="#PDEDEF">PDEDEF</a> or <a class="arg" href="#BNDARY">BNDARY</a>, <a class="arg" href="../D03/d03pdf.xml#PDEDEF_IRES">IRES</a> was set to an invalid value.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq9" id="IFeq9"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>9</m:mn></m:math>&#160;(<a class="rout" href="../D02/d02nnf.xml">D02NNF</a>)</dt>
<dd>
<div class="paramtext">A serious error has occurred in an internal call to the specified routine. Check the problem specification and all parameters and array dimensions. Setting <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITRACE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITRACE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;may provide more information. If the problem persists, contact <a class="url" href="http://www.nag.co.uk">NAG</a>.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq10" id="IFeq10"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>10</m:mn></m:math></dt>
<dd>
<div class="paramtext">The required task has been completed, but it is estimated that a small change in <a class="arg" href="#ACC">ACC</a> is unlikely to produce any change in the computed solution. (Only applies when you are not operating in one step mode, that is when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITASK"><m:mi mathcolor="#EE0000" mathvariant="bold">ITASK</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>2</m:mn></m:math>.)</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq11" id="IFeq11"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>11</m:mn></m:math></dt>
<dd>
<div class="paramtext">An error occurred during Jacobian formulation of the ODE system (a more detailed error description may be directed to the current error message unit).</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq12" id="IFeq12"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>12</m:mn></m:math></dt>
<dd>
<div class="paramtext">Not applicable.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq13" id="IFeq13"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>13</m:mn></m:math></dt>
<dd>
<div class="paramtext">Not applicable.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq14" id="IFeq14"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>14</m:mn></m:math></dt>
<dd>
<div class="paramtext">The flux function <m:math><m:msub><m:mi>R</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;was detected as depending on time derivatives, which is not permissible.</div></dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">D03PDF/D03PDA controls the accuracy of the integration in the time direction but not the accuracy of the approximation in space.  The spatial accuracy depends on the degree of the polynomial approximation <a class="arg" href="#NPOLY">NPOLY</a>, and on both the number of break points and on their distribution in space.  In the time integration only the local error over a single step is controlled and so the accuracy over a number of steps cannot be guaranteed.  You should therefore test the effect of varying the accuracy parameter, <a class="arg" href="#ACC">ACC</a>.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">D03PDF/D03PDA is designed to solve parabolic systems (possibly including elliptic equations) with second-order derivatives in space.  The parameter specification allows you to include equations with only first-order derivatives in the space direction but there is no guarantee that the method of integration will be satisfactory for such systems.  The position and nature of the boundary conditions in particular are critical in defining a stable problem.</div><div class="paramtext">The time taken depends on the complexity of the parabolic system and on the accuracy requested.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">The problem consists of a fourth-order PDE which can be written as a pair of second-order elliptic-parabolic PDEs for <m:math><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;and <m:math><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>,

<div class="formula-eqn"><a name="eqn4" id="eqn4"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mn>0</m:mn><m:mo>=</m:mo>
 <m:mfrac other="display">
  <m:mrow><m:msup><m:mo>&#8706;</m:mo><m:mn>2</m:mn></m:msup><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup></m:mrow>
 </m:mfrac><m:mo>-</m:mo><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub>
</m:math></td><td class="formula-eqn2">
      (4)
     </td></tr></table></div><div class="formula-eqn"><a name="eqn5" id="eqn5"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>t</m:mi></m:mrow>
 </m:mfrac><m:mo>=</m:mo>
 <m:mfrac other="display">
  <m:mrow><m:msup><m:mo>&#8706;</m:mo><m:mn>2</m:mn></m:msup><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup></m:mrow>
 </m:mfrac><m:mo>+</m:mo><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac><m:mo>-</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac>
</m:math></td><td class="formula-eqn2">
      (5)
     </td></tr></table></div>

where <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mo>&#8804;</m:mo><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mn>1</m:mn></m:math>&#160;and <m:math><m:mi>t</m:mi><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.  The boundary conditions are given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable>
 <m:mtr>
  <m:mtd><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8195; and &#8195;</m:mtext><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mn>1</m:mn><m:mtext>&#8195; at &#8203;</m:mtext><m:mi>x</m:mi><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>, &#8195; and</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd/></m:mtr><m:mtr>
  <m:mtd><m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac><m:mo>=</m:mo><m:mn>0</m:mn><m:mtext>&#8195; and &#8195;</m:mtext><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8195; at &#8203;</m:mtext><m:mi>x</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mtext>.</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

The initial conditions at <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;are given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mo>=</m:mo><m:mo>-</m:mo><m:mrow><m:mi>sin</m:mi><m:mo>&#8289;</m:mo><m:mfrac><m:mrow><m:mi>&#960;</m:mi><m:mi>x</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac></m:mrow><m:mtext>&#8195; and &#8195;</m:mtext><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mfrac><m:msup><m:mi>&#960;</m:mi><m:mn>2</m:mn></m:msup><m:mn>4</m:mn></m:mfrac><m:mrow><m:mi>sin</m:mi><m:mo>&#8289;</m:mo><m:mfrac><m:mrow><m:mi>&#960;</m:mi><m:mi>x</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac></m:mrow><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

The absence of boundary conditions for <m:math><m:msub><m:mi>U</m:mi><m:mn>2</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;does not pose any difficulties provided that the derivative flux boundary conditions are assigned to the first PDE <a class="eqn" href="#eqn4">(4)</a> which has the correct flux, <m:math>
 <m:mfrac other="display">
  <m:mrow><m:mo>&#8706;</m:mo><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
  <m:mrow><m:mo>&#8706;</m:mo><m:mi>x</m:mi></m:mrow>
 </m:mfrac>
</m:math>.  The conditions on <m:math><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;at the boundaries are assigned to the second PDE by setting <m:math><m:msub><m:mi>&#946;</m:mi><m:mn>2</m:mn></m:msub><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>&#160;in equation <a class="eqn" href="#eqn3">(3)</a> and placing the Dirichlet boundary conditions on <m:math><m:msub><m:mi>U</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi><m:mo>,</m:mo><m:mi>t</m:mi></m:mfenced></m:math>&#160;in the function <m:math><m:msub><m:mi>&#947;</m:mi><m:mn>2</m:mn></m:msub></m:math>.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<div class="paramtext"><b>Note:</b> <span class="italic">the following programs illustrate the use of D03PDF and D03PDA</span>.</div><p><a class="verbatimref" href="../../examples/source/d03pdfe.f">Program Text (d03pdfe.f)</a></p><p><a class="verbatimref" href="../../examples/source/d03pdae.f">Program Text (d03pdae.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<div class="paramtext">None.</div><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/d03pdfe.r">Program Results (d03pdfe.r)</a></p><p><a class="verbatimref" href="../../examples/baseresults/d03pdae.r">Program Results (d03pdae.r)</a></p><div class="figure"><a name="d03pdf1-plot" id="d03pdf1-plot"/><img src="../figures/d03pdf1-plot.png" alt="Example Program Plot for d03pdf1-plot"/></div><div class="figure"><a name="d03pdf2-plot" id="d03pdf2-plot"/><img src="../figures/d03pdf2-plot.png" alt="Example Program Plot for d03pdf2-plot"/></div><hr/><div><a class="rout" href="../../pdf/D03/d03pdf.pdf">D03PDF/D03PDA (PDF version)</a></div><div><a class="chap" href="d03conts.xml">D03 Chapter Contents</a></div><div><a class="chapint" href="d03intro.xml">D03 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>
