<?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>D02LXF : 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/D02/d02lxf.pdf">D02LXF (PDF version)</a></div><div><a class="chap" href="d02conts.xml">D02 Chapter Contents</a></div><div><a class="chapint" href="d02intro.xml">D02 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/>D02LXF</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="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
</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="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">D02LXF is a setup routine which must be called prior to the first call of the integrator <a class="rout" href="../D02/d02laf.xml">D02LAF</a> and may be called prior to any continuation call to <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;D02LXF&#160;(</td><td class="tdfspec2"><a class="arg" href="#NEQ">NEQ</a>, <a class="arg" href="#H">H</a>, <a class="arg" href="#TOL">TOL</a>, <a class="arg" href="#THRES">THRES</a>, <a class="arg" href="#THRESP">THRESP</a>, <a class="arg" href="#MAXSTP">MAXSTP</a>, <a class="arg" href="#START">START</a>, <a class="arg" href="#ONESTP">ONESTP</a>, <a class="arg" href="#HIGH">HIGH</a>, <a class="arg" href="#RWORK">RWORK</a>, <a class="arg" href="#LRWORK">LRWORK</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NEQ, MAXSTP, LRWORK, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">H, TOL, THRES(NEQ), THRESP(NEQ), RWORK(LRWORK)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">START, ONESTP, HIGH</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D02LXF permits you to set optional inputs prior to any call of <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.  It must be called before the first call of routine <a class="rout" href="../D02/d02laf.xml">D02LAF</a> and it may be called before any continuation call of routine <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="NEQ" id="NEQ"/>1: &#160;&#160;&#8194; NEQ &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 

the number of second-order ordinary differential equations to be solved by <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="H" id="H"/>2: &#160;&#160;&#8194; H &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#START"><m:mi mathcolor="#EE0000" mathvariant="bold">START</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <a class="arg" href="#H">H</a> may specify an initial step size to be attempted in <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#START"><m:mi mathcolor="#EE0000" mathvariant="bold">START</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, <a class="arg" href="#H">H</a> may specify a step size to override the choice of next step attempted made internally to <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div>
<div class="paramtext">The sign of <a class="arg" href="#H">H</a> is not important, as the absolute value of <a class="arg" href="#H">H</a> is chosen and the appropriate sign is selected by <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div>
<div class="paramtext">If this option is not required then you must set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#H"><m:mi mathcolor="#EE0000" mathvariant="bold">H</m:mi></m:maction><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>.</div>
</div></dd><dt class="paramhead"><a name="TOL" id="TOL"/>3: &#160;&#160;&#8194; TOL &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: must be set to a relative tolerance for controlling the error in the integration by <a class="rout" href="../D02/d02laf.xml">D02LAF</a>. <a class="rout" href="../D02/d02laf.xml">D02LAF</a> has been designed so that, for most problems, a reduction in <a class="arg" href="#TOL">TOL</a> leads to an approximately proportional reduction in the error in the solution. However the actual relation between <a class="arg" href="#TOL">TOL</a> and the accuracy of the solution cannot be guaranteed. You are strongly recommended to repeat the integration with a smaller value of <a class="arg" href="#TOL">TOL</a> and compare the results. See the description of <a class="arg" href="#THRES">THRES</a> and <a class="arg" href="#THRESP">THRESP</a> for further details of how <a class="arg" href="#TOL">TOL</a> is used.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mn>10</m:mn><m:mo>&#215;</m:mo><m:mi>&#949;</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOL"><m:mi mathcolor="#EE0000" mathvariant="bold">TOL</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>1.0</m:mn></m:math>&#160;(<m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>, see <a class="rout" href="../X02/x02ajf.xml">X02AJF</a>).</div></dd><dt class="paramhead"><a name="THRES" id="THRES"/>4: &#160;&#160;&#8194; THRES(<a class="arg" href="#NEQ">NEQ</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="THRESP" id="THRESP"/>5: &#160;&#160;&#8194; THRESP(<a class="arg" href="#NEQ">NEQ</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#THRES">THRES</a> and <a class="arg" href="#THRESP">THRESP</a> may be set to thresholds for use in the error control of <a class="rout" href="../D02/d02laf.xml">D02LAF</a>. At each step in the numerical integration estimates of the local errors <m:math><m:mi mathvariant="normal">E1</m:mi><m:mfenced separators=""><m:mi>i</m:mi></m:mfenced></m:math>&#160;and <m:math><m:mi mathvariant="normal">E2</m:mi><m:mfenced separators=""><m:mi>i</m:mi></m:mfenced></m:math>&#160;in the solution, <m:math><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:math>, and its derivative, <m:math><m:msubsup><m:mi>y</m:mi><m:mi>i</m:mi><m:mo>&#8242;</m:mo></m:msubsup></m:math>, respectively are computed, 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="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>. For the step to be accepted conditions of the following type must be satisfied: 
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block"> <m:mtable columnalign="left"> <m:mtr> <m:mtd><m:munder><m:mi mathvariant="normal">max</m:mi><m:mrow><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:mrow></m:munder><m:mspace width="0.25em"/> <m:mfenced separators=""><m:mfrac other="display">
  <m:mrow><m:mi mathvariant="normal">E1</m:mi><m:mfenced separators=""><m:mi>i</m:mi></m:mfenced></m:mrow>
  <m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>,</m:mo><m:mfenced open="|" close="|" separators=""><m:msub><m:mi>y</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:mfenced></m:mrow>
 </m:mfrac></m:mfenced> <m:mo>&#8804;</m:mo> <m:maction actiontype="link" dsi:type="simple" dsi:href="#TOL"><m:mi mathcolor="#EE0000" mathvariant="bold">TOL</m:mi></m:maction><m:mtext>,</m:mtext></m:mtd> </m:mtr><m:mtr> <m:mtd/></m:mtr><m:mtr> <m:mtd/></m:mtr><m:mtr> <m:mtd><m:munder><m:mi mathvariant="normal">max</m:mi><m:mrow><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:mrow></m:munder><m:mspace width="0.25em"/> <m:mfenced separators=""><m:mfrac other="display">
  <m:mrow><m:mi mathvariant="normal">E2</m:mi><m:mfenced separators=""><m:mi>i</m:mi></m:mfenced></m:mrow>
  <m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRESP"><m:mi mathcolor="#EE0000" mathvariant="bold">THRESP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>,</m:mo><m:mfenced open="|" close="|" separators=""><m:msubsup><m:mi>y</m:mi><m:mi>i</m:mi><m:mo>&#8242;</m:mo></m:msubsup></m:mfenced></m:mfenced></m:mrow>
 </m:mfrac></m:mfenced> <m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOL"><m:mi mathcolor="#EE0000" mathvariant="bold">TOL</m:mi></m:maction><m:mtext>.</m:mtext></m:mtd> </m:mtr> </m:mtable> </m:math></td><td class="formula2"/></tr></table></div>
 If one or both of these is not satisfied then the step size is reduced and the solution is recomputed.
<div class="paramtext">If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>&#160;on entry, then a value of <m:math><m:mn>50.0</m:mn><m:mo>&#215;</m:mo><m:mi>&#949;</m:mi></m:math>&#160;is used for <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</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="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>, where <m:math><m:mi>&#949;</m:mi></m:math>&#160;is <span class="bitalic">machine precision</span>. Similarly for <a class="arg" href="#THRESP">THRESP</a>.</div>
</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>&#160;or <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>,  for <m:math><m:mi mathvariant="italic">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="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>;</li>
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRESP"><m:mi mathcolor="#EE0000" mathvariant="bold">THRESP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>&#160;or <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRESP"><m:mi mathcolor="#EE0000" mathvariant="bold">THRESP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">i</m:mi></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>,  for <m:math><m:mi mathvariant="italic">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="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="MAXSTP" id="MAXSTP"/>6: &#160;&#160;&#8194; MAXSTP &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: a bound on the number of steps attempted in any one call of <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXSTP"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXSTP</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>&#160;on entry, a value of <m:math><m:mn>1000</m:mn></m:math>&#160;is used.</div>
</div></dd><dt class="paramhead"><a name="START" id="START"/>7: &#160;&#160;&#8194; START &#8211; LOGICAL<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: specifies whether or not the call of <a class="rout" href="../D02/d02laf.xml">D02LAF</a> is for a new problem. <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#START"><m:mi mathcolor="#EE0000" mathvariant="bold">START</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>&#160;indicates that a new problem is to be solved. <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#START"><m:mi mathcolor="#EE0000" mathvariant="bold">START</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>&#160;indicates the call of D02LXF is prior to a continuation call of <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#START"><m:mi mathcolor="#EE0000" mathvariant="bold">START</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="ONESTP" id="ONESTP"/>8: &#160;&#160;&#8194; ONESTP &#8211; LOGICAL<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the mode of operation for <a class="rout" href="../D02/d02laf.xml">D02LAF</a>. 

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ONESTP"><m:mi mathcolor="#EE0000" mathvariant="bold">ONESTP</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math></dt>
<dd><a class="rout" href="../D02/d02laf.xml">D02LAF</a> will operate in one-step mode, that is it will return after each successful step.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ONESTP"><m:mi mathcolor="#EE0000" mathvariant="bold">ONESTP</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math></dt>
<dd><a class="rout" href="../D02/d02laf.xml">D02LAF</a> will operate in interval mode, that is it will return at the end of the integration interval.</dd></dl>
</div></dd><dt class="paramhead"><a name="HIGH" id="HIGH"/>9: &#160;&#160;&#8194; HIGH &#8211; LOGICAL<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#HIGH"><m:mi mathcolor="#EE0000" mathvariant="bold">HIGH</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, a high-order method will be used, whereas if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#HIGH"><m:mi mathcolor="#EE0000" mathvariant="bold">HIGH</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, a low-order method will be used. (See the specification of <a class="rout" href="../D02/d02laf.xml">D02LAF</a> for further details.)</div></dd><dt class="paramhead"><a name="RWORK" id="RWORK"/>10: &#8194; RWORK(<a class="arg" href="#LRWORK">LRWORK</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Communication Array</span></dt><dd>
<div class="paramtext">This <b>must</b> be the same parameter <a class="arg" href="#RWORK">RWORK</a> supplied to <a class="rout" href="../D02/d02laf.xml">D02LAF</a>. It is used to pass information to <a class="rout" href="../D02/d02laf.xml">D02LAF</a> and therefore the contents of this array <b>must not</b> be changed before calling <a class="rout" href="../D02/d02laf.xml">D02LAF</a>.</div></dd><dt class="paramhead"><a name="LRWORK" id="LRWORK"/>11: &#8194; LRWORK &#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="#RWORK">RWORK</a> as declared in the (sub)program from which D02LXF is called.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#HIGH"><m:mi mathcolor="#EE0000" mathvariant="bold">HIGH</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LRWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LRWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>16</m:mn><m:mo>+</m:mo><m:mn>20</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#HIGH"><m:mi mathcolor="#EE0000" mathvariant="bold">HIGH</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LRWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LRWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>16</m:mn><m:mo>+</m:mo><m:mn>11</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>12: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<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></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>
<div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>&#160;and for some <m:math><m:mi>i</m:mi></m:math>&#160;<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRES"><m:mi mathcolor="#EE0000" mathvariant="bold">THRES</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>,  <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>,  and/or,  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRESP"><m:mi mathcolor="#EE0000" mathvariant="bold">THRESP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>&#160;and for some <m:math><m:mi>i</m:mi></m:math>&#160;<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#THRESP"><m:mi mathcolor="#EE0000" mathvariant="bold">THRESP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>, <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NEQ"><m:mi mathcolor="#EE0000" mathvariant="bold">NEQ</m:mi></m:maction></m:math>.</div>
</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"><a class="arg" href="#LRWORK">LRWORK</a> is too small.</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"><a class="arg" href="#TOL">TOL</a> does not satisfy <m:math><m:mn>10</m:mn><m:mo>&#215;</m:mo><m:mi>&#949;</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#TOL"><m:mi mathcolor="#EE0000" mathvariant="bold">TOL</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>1.0</m:mn></m:math>&#160;(<m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>, see <a class="rout" href="../X02/x02ajf.xml">X02AJF</a>)</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">Not applicable.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">Prior to a continuation call of <a class="rout" href="../D02/d02laf.xml">D02LAF</a>, you may reset any of the optional parameters by calling D02LXF with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#START"><m:mi mathcolor="#EE0000" mathvariant="bold">START</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>.  You may reset:
<table class="standard-100"><tr>
<td style="width:12.0em;" valign="baseline"><a class="arg" href="#H">H</a></td>
<td valign="top">to override the internal step size selection;</td>
</tr><tr>
<td style="width:12.0em;" valign="baseline"><a class="arg" href="#TOL">TOL</a>, <a class="arg" href="#THRES">THRES</a>, <a class="arg" href="#THRESP">THRESP</a></td>
<td valign="top">to change the error requirements;</td>
</tr><tr>
<td style="width:12.0em;" valign="baseline"><a class="arg" href="#MAXSTP">MAXSTP</a></td>
<td valign="top">to increase or decrease the number of steps attempted before an error exit is returned;</td>
</tr><tr>
<td style="width:12.0em;" valign="baseline"><a class="arg" href="#ONESTP">ONESTP</a></td>
<td valign="top">to change the mode of operation of <a class="rout" href="../D02/d02laf.xml">D02LAF</a>;</td>
</tr><tr>
<td style="width:12.0em;" valign="baseline"><a class="arg" href="#HIGH">HIGH</a></td>
<td valign="top">to change the order of the method being used.</td>
</tr></table>
</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">See <a class="sec" href="../D02/d02laf.xml#example">Section 9</a> in D02LAF.</div>
<hr/><div><a class="rout" href="../../pdf/D02/d02lxf.pdf">D02LXF (PDF version)</a></div><div><a class="chap" href="d02conts.xml">D02 Chapter Contents</a></div><div><a class="chapint" href="d02intro.xml">D02 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>
