<?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>F01BRF : 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/F01/f01brf.pdf">F01BRF (PDF version)</a></div><div><a class="chap" href="f01conts.xml">F01 Chapter Contents</a></div><div><a class="chapint" href="f01intro.xml">F01 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/>F01BRF</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="htmltoc" onclick="showLevel('tocfcomments');"><span class="htmltocplus" id="tocfcommentsplus">+</span><span class="htmltocminus" id="tocfcommentsminus">&#8722;</span></span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
<div class="htmltocitem" id="tocfcomments">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments1">8.1&#160;&#160;<b>Timing</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments2">8.2&#160;&#160;<b>Scaling</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments3">8.3&#160;&#160;<b>Singular and Rectangular Systems</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments4">8.4&#160;&#160;<b>Duplicated Nonzeros</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments5">8.5&#160;&#160;<b>Determinant</b></a>
</div>
</div>
</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">F01BRF factorizes a real sparse matrix.  The routine either forms the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factorization of a permutation of the entire matrix, or, optionally, first permutes the matrix to block lower triangular form and then only factorizes the diagonal blocks.</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;F01BRF&#160;(</td><td class="tdfspec2"><a class="arg" href="#N">N</a>, <a class="arg" href="#NZ">NZ</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#LICN">LICN</a>, <a class="arg" href="#IRN">IRN</a>, <a class="arg" href="#LIRN">LIRN</a>, <a class="arg" href="#ICN">ICN</a>, <a class="arg" href="#PIVOT">PIVOT</a>, <a class="arg" href="#IKEEP">IKEEP</a>, <a class="arg" href="#IW">IW</a>, <a class="arg" href="#W">W</a>, <a class="arg" href="#LBLOCK">LBLOCK</a>, <a class="arg" href="#GROW">GROW</a>, <a class="arg" href="#ABORT">ABORT</a>, <a class="arg" href="#IDISP">IDISP</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">N, NZ, LICN, IRN(LIRN), LIRN, ICN(LICN), IKEEP(5*N), IW(8*N), IDISP(10), IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A(LICN), PIVOT, W(N)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">LBLOCK, GROW, ABORT(4)</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">Given a real sparse matrix <m:math><m:mi>A</m:mi></m:math>, F01BRF may be used to obtain the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factorization of a permutation of  <m:math><m:mi>A</m:mi></m:math>,

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>P</m:mi><m:mi>A</m:mi><m:mi>Q</m:mi><m:mo>=</m:mo><m:mi>L</m:mi><m:mi>U</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>P</m:mi></m:math>&#160;and <m:math><m:mi>Q</m:mi></m:math>&#160;are permutation matrices,  <m:math><m:mi>L</m:mi></m:math>&#160;is unit lower triangular and <m:math><m:mi>U</m:mi></m:math>&#160;is upper triangular.  The routine uses a sparse variant of Gaussian elimination,  and the pivotal strategy is designed to compromise between maintaining sparsity and controlling loss of accuracy through round-off.</div><div class="paramtext">Optionally the routine first permutes the matrix into block lower triangular form and then only factorizes the diagonal blocks.  For some matrices this gives a considerable saving in storage and execution time.</div><div class="paramtext">Extensive data checks are made; duplicated nonzeros can be accumulated.</div><div class="paramtext">The factorization is intended to be used by <a class="rout" href="../F04/f04axf.xml">F04AXF</a> to solve sparse systems of linear equations <m:math><m:mi>A</m:mi><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math>&#160;or  <m:math><m:msup><m:mi>A</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup><m:mi>x</m:mi><m:mo>=</m:mo><m:mi>b</m:mi></m:math>.  If several matrices of the same sparsity pattern are to be factorized, <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> should be used for the second and subsequent matrices.</div><div class="paramtext">The method is fully described in <a class="ref" href="#ref100">Duff (1977)</a>.</div><div class="paramtext">A more recent algorithm for the same calculation is provided by <a class="rout" href="../F11/f11mef.xml">F11MEF</a>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref100" id="ref100"/>Duff I S (1977)  MA28 &#8211; a set of Fortran subroutines for sparse unsymmetric linear equations <i>AERE Report R8730</i> HMSO </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="N" id="N"/>1: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:mi>n</m:mi></m:math>, the order of the matrix <m:math><m:mi>A</m:mi></m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NZ" id="NZ"/>2: &#160;&#160;&#8194; NZ &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

the number of nonzero elements in the matrix <m:math><m:mi>A</m:mi></m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="A" id="A"/>3: &#160;&#160;&#8194; A(<a class="arg" href="#LICN">LICN</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</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="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>, must contain the nonzero elements of the sparse matrix <m:math><m:mi>A</m:mi></m:math>. They can be in any order since F01BRF will reorder them.</div>
<div class="paramtext"><i>On exit</i>: the nonzero elements in the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factorization. The array must <b>not</b> be changed by you between a call of F01BRF and a call of <a class="rout" href="../F04/f04axf.xml">F04AXF</a>.</div></dd><dt class="paramhead"><a name="LICN" id="LICN"/>4: &#160;&#160;&#8194; LICN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the dimension of the arrays  <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a> as declared in the (sub)program from which F01BRF is called. Since the factorization is returned in <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a>, <a class="arg" href="#LICN">LICN</a> should be large enough to accommodate this and should ordinarily be <m:math><m:mn>2</m:mn></m:math>&#160;to <m:math><m:mn>4</m:mn></m:math>&#160;times as large as <a class="arg" href="#NZ">NZ</a>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LICN"><m:mi mathcolor="#EE0000" mathvariant="bold">LICN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="IRN" id="IRN"/>5: &#160;&#160;&#8194; IRN(<a class="arg" href="#LIRN">LIRN</a>) &#8211; INTEGER array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IRN"><m:mi mathcolor="#EE0000" mathvariant="bold">IRN</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="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>, must contain the row index of the nonzero element stored in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext"><i>On exit</i>: <a class="arg" href="#IRN">IRN</a> is overwritten and is not needed for subsequent calls of <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> or <a class="rout" href="../F04/f04axf.xml">F04AXF</a>.</div></dd><dt class="paramhead"><a name="LIRN" id="LIRN"/>6: &#160;&#160;&#8194; LIRN &#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="#IRN">IRN</a> as declared in the (sub)program from which F01BRF is called. It need not be as large as <a class="arg" href="#LICN">LICN</a>; normally it will not need to be very much greater than <a class="arg" href="#NZ">NZ</a>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIRN"><m:mi mathcolor="#EE0000" mathvariant="bold">LIRN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="ICN" id="ICN"/>7: &#160;&#160;&#8194; ICN(<a class="arg" href="#LICN">LICN</a>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dd><div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ICN"><m:mi mathcolor="#EE0000" mathvariant="bold">ICN</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="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>, must contain, on entry, the column index of the nonzero element stored in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>. <a class="arg" href="#ICN">ICN</a> contains, on exit, the column indices of the nonzero elements in the factorization. The array must <b>not</b> be changed by you between a call of F01BRF and subsequent calls of <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> or <a class="rout" href="../F04/f04axf.xml">F04AXF</a>.</div></dd><dt class="paramhead"><a name="PIVOT" id="PIVOT"/>8: &#160;&#160;&#8194; PIVOT &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: should have a value in the range <m:math><m:mn>0.0</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PIVOT"><m:mi mathcolor="#EE0000" mathvariant="bold">PIVOT</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0.9999</m:mn></m:math>&#160;and is used to control the choice of pivots. If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PIVOT"><m:mi mathcolor="#EE0000" mathvariant="bold">PIVOT</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>, the value <m:math><m:mn>0.0</m:mn></m:math>&#160;is assumed, and if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PIVOT"><m:mi mathcolor="#EE0000" mathvariant="bold">PIVOT</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.9999</m:mn></m:math>, the value <m:math><m:mn>0.9999</m:mn></m:math>&#160;is assumed. When searching a row for a pivot, any element is excluded which is less than <a class="arg" href="#PIVOT">PIVOT</a> times the largest of those elements in the row available as pivots. Thus decreasing <a class="arg" href="#PIVOT">PIVOT</a> biases the algorithm to maintaining sparsity at the expense of stability.</div>
<div class="paramtext"><i>Suggested value</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PIVOT"><m:mi mathcolor="#EE0000" mathvariant="bold">PIVOT</m:mi></m:maction><m:mo>=</m:mo><m:mn>0.1</m:mn></m:math>&#160;has been found to work well on test examples.

</div></dd><dt class="paramhead"><a name="IKEEP" id="IKEEP"/>9: &#160;&#160;&#8194; IKEEP(<m:math><m:mn>5</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dd><div class="paramtext"><i>On exit</i>: indexing information about the factorization.</div>
<div class="paramtext">You must <b>not</b> change <a class="arg" href="#IKEEP">IKEEP</a> between a call of F01BRF and subsequent calls to <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> or <a class="rout" href="../F04/f04axf.xml">F04AXF</a>.</div></dd><dt class="paramhead"><a name="IW" id="IW"/>10: &#8194; IW(<m:math><m:mn>8</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>) &#8211; INTEGER array<span class="pclass">Workspace</span></dt><dt class="paramhead"><a name="W" id="W"/>11: &#8194; W(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#GROW"><m:mi mathcolor="#EE0000" mathvariant="bold">GROW</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;contains an estimate (an upper bound) of the increase in size of elements encountered during the factorization (see <a class="arg" href="#GROW">GROW</a>); the rest of the array is used as workspace.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#GROW"><m:mi mathcolor="#EE0000" mathvariant="bold">GROW</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, the array is not used.</div>
</div></dd><dt class="paramhead"><a name="LBLOCK" id="LBLOCK"/>12: &#8194; LBLOCK &#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="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, the matrix is preordered into block lower triangular form before the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factorization is performed; otherwise the entire matrix is factorized.</div>
<div class="paramtext"><i>Suggested value</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>&#160;unless the matrix is known to be irreducible, or is singular and an upper bound on the rank is required.

</div></dd><dt class="paramhead"><a name="GROW" id="GROW"/>13: &#8194; GROW &#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="#GROW"><m:mi mathcolor="#EE0000" mathvariant="bold">GROW</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, then on exit <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;contains an estimate (an upper bound) of the increase in size of elements encountered during the factorization. If the matrix is well-scaled (see <a class="sec" href="#fcomments2">Section 8.2</a>), then a high value for <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;indicates that the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factorization may be inaccurate and you should be wary of the results and perhaps increase the parameter <a class="arg" href="#PIVOT">PIVOT</a> for subsequent runs (see <a class="sec" href="#accuracy">Section 7</a>).</div>
<div class="paramtext"><i>Suggested value</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#GROW"><m:mi mathcolor="#EE0000" mathvariant="bold">GROW</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>.

</div></dd><dt class="paramhead"><a name="ABORT" id="ABORT"/>14: &#8194; ABORT(<m:math><m:mn>4</m:mn></m:math>) &#8211; LOGICAL array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, F01BRF will exit immediately on detecting a structural singularity (one that depends on the pattern of nonzeros) and return <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="#IFeq1"><m:mn mathcolor="#003399" mathvariant="bold">1</m:mn></m:maction></m:math>; otherwise it will complete the factorization (see <a class="sec" href="#fcomments3">Section 8.3</a>).
<div class="paramtext">If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, F01BRF will exit immediately on detecting a numerical singularity (one that depends on the numerical values) and return <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="#IFeq2"><m:mn mathcolor="#003399" mathvariant="bold">2</m:mn></m:maction></m:math>; otherwise it will complete the factorization (see <a class="sec" href="#fcomments3">Section 8.3</a>).</div>
<div class="paramtext">If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, F01BRF will exit immediately (with <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="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>) when the arrays <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a> are filled up by the previously factorized, active and unfactorized parts of the matrix; otherwise it continues so that better guidance on necessary array sizes can be given in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>6</m:mn></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>7</m:mn></m:mfenced></m:mrow></m:math>, and will exit with <a class="arg" href="#IFAIL">IFAIL</a> in the range <m:math><m:mn>4</m:mn></m:math>&#160;to <m:math><m:mn>6</m:mn></m:math>. Note that there is always an immediate error exit if the array <a class="arg" href="#IRN">IRN</a> is too small.</div>
<div class="paramtext">If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, F01BRF exits immediately (with <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="#IFeq13"><m:mn mathcolor="#003399" mathvariant="bold">13</m:mn></m:maction></m:math>) if it finds duplicate elements in the input matrix.</div>
<div class="paramtext">If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, F01BRF proceeds using a value equal to the sum of the duplicate elements. In either case details of each duplicate element are output on the current advisory message unit (see <a class="rout" href="../X04/x04abf.xml">X04ABF</a>), unless suppressed by the value of <a class="arg" href="#IFAIL">IFAIL</a> on entry.</div>
</div>
<div class="paramtext"><i>Suggested values</i>:
   <div class="paramtext"/> 
<ul class="listcons">
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>;</li>
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>;</li>
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>;</li>
<li class="listcons"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>.</li>
</ul>
</div></dd><dt class="paramhead"><a name="IDISP" id="IDISP"/>15: &#8194; IDISP(<m:math><m:mn>10</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dd><div class="paramtext"><i>On exit</i>: contains information about the factorization.
<div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</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="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;indicate the position in arrays <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a> of the first and last elements in the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factorization of the diagonal blocks. (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;gives the number of nonzeros in the factorization.) <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</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="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;must not be changed by you between a call of F01BRF and subsequent calls to <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> or <a class="rout" href="../F04/f04axf.xml">F04AXF</a>.</div>
<div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow></m:math>&#160;monitor the adequacy of &#8216;elbow room&#8217; in the arrays <a class="arg" href="#IRN">IRN</a> and <a class="arg" href="#A">A</a> (and <a class="arg" href="#ICN">ICN</a>) respectively, by giving the number of times that the data in these arrays has been compressed during the factorization to release more storage. If either <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow></m:math>&#160;or <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow></m:math>&#160;is quite large (say greater than <m:math><m:mn>10</m:mn></m:math>), it will probably pay you to increase the size of the corresponding array(s) for subsequent runs. If either is very low or zero, then you can perhaps save storage by reducing the size of the corresponding array(s).</div>
<div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>5</m:mn></m:mfenced></m:mrow></m:math>, when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, gives an upper bound on the rank of the matrix; when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, gives an upper bound on the sum of the ranks of the lower triangular blocks.</div>
<div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>6</m:mn></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>7</m:mn></m:mfenced></m:mrow></m:math>&#160;give the minimum size of arrays <a class="arg" href="#IRN">IRN</a> and <a class="arg" href="#A">A</a> (and <a class="arg" href="#ICN">ICN</a>) respectively which would enable a successful run on an identical matrix (but some &#8216;elbow-room&#8217; should be allowed &#8211; see <a class="sec" href="#fcomments">Section 8</a>).</div>
<div class="paramtext"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>8</m:mn></m:mfenced></m:mrow></m:math>&#160;to <m:math><m:mfenced separators=""><m:mn>10</m:mn></m:mfenced></m:math>&#160;are only used if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>.
<ul class="listind"><li class="listind"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>8</m:mn></m:mfenced></m:mrow></m:math>&#160;gives the structural rank of the matrix.</li><li class="listind"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>9</m:mn></m:mfenced></m:mrow></m:math>&#160;gives the number of diagonal blocks.</li><li class="listind"><m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>10</m:mn></m:mfenced></m:mrow></m:math>&#160;gives the size of the largest diagonal block.</li></ul></div></div>
<div class="paramtext">You must <b>not</b> change <a class="arg" href="#IDISP">IDISP</a> between a call of F01BRF and subsequent calls to <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> or <a class="rout" href="../F04/f04axf.xml">F04AXF</a>.</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>16: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext">For this routine, the normal use of <a class="arg" href="#IFAIL">IFAIL</a> is extended to control the printing of error and warning messages as well as specifying hard or soft failure (see <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction).</div>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to a value with the decimal expansion <m:math><m:mi mathvariant="italic">cba</m:mi></m:math>, where each of the decimal digits <m:math><m:mi>c</m:mi></m:math>, <m:math><m:mi>b</m:mi></m:math>&#160;and <m:math><m:mi>a</m:mi></m:math>&#160;must have a value of <m:math><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>.
<table class="standard-90"><tr>
<td style="width:3.0em;" valign="baseline"><m:math><m:mi>a</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
<td valign="top">specifies hard failure, otherwise soft failure;</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><m:math><m:mi>b</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
<td valign="top">suppresses error messages, otherwise error messages will be printed (see <a class="sec" href="#errors">Section 6</a>);</td>
</tr><tr>
<td style="width:3.0em;" valign="baseline"><m:math><m:mi>c</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math></td>
<td valign="top">suppresses warning messages, otherwise warning messages will be printed (see <a class="sec" href="#errors">Section 6</a>).</td>
</tr></table>
<div class="paramtext">The recommended value for inexperienced users is <m:math><m:mn>110</m:mn></m:math>&#160;(i.e., hard failure with all messages printed).</div>
</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></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="IFeq-2" id="IFeq-2"/><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">Successful factorization of a numerically singular matrix (which may also be structurally singular) (see <a class="sec" href="#fcomments3">Section 8.3</a>).</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq-1" id="IFeq-1"/><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">Successful factorization of a structurally singular matrix (see <a class="sec" href="#fcomments3">Section 8.3</a>).</div>
</dd>
</dl><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">The matrix is structurally singular and the factorization has been abandoned (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;was .TRUE. on entry).</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">The matrix is numerically singular and the factorization has been abandoned (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;was .TRUE. on entry).</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="#LIRN">LIRN</a> is too small: there is not enough space in the array <a class="arg" href="#IRN">IRN</a> to continue the factorization.  You are recommended to try again with <a class="arg" href="#LIRN">LIRN</a> (and the length of <a class="arg" href="#IRN">IRN</a>) equal to at least <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>6</m:mn></m:mfenced></m:mrow><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>/</m:mo><m:mn>2</m:mn></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"><a class="arg" href="#LICN">LICN</a> is much too small: there is much too little space in the arrays <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a> to continue the factorization.</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"><a class="arg" href="#LICN">LICN</a> is too small: there is not enough space in the arrays <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a> to store the factorization.  If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow></m:math>&#160;was .FALSE. on entry, the factorization has been completed but some of the <m:math><m:mi>L</m:mi><m:mi>U</m:mi></m:math>&#160;factors have been discarded to create space; <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>7</m:mn></m:mfenced></m:mrow></m:math>&#160;then gives the minimum value of <a class="arg" href="#LICN">LICN</a>  (i.e., the minimum length of <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a>) required for a successful factorization of the same matrix.</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"><a class="arg" href="#LICN">LICN</a> and <a class="arg" href="#LIRN">LIRN</a> are both too small: effectively this is a combination of <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="#IFeq3"><m:mn mathcolor="#003399" mathvariant="bold">3</m:mn></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>&#160;(with  <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></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"><a class="arg" href="#LICN">LICN</a> is too small: there is not enough space in the arrays <a class="arg" href="#A">A</a> and <a class="arg" href="#ICN">ICN</a> for the permutation to block triangular form.</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>
<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="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>.</td></tr></table>
</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></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="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>.</td></tr></table>
</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>
<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="#LICN"><m:mi mathcolor="#EE0000" mathvariant="bold">LICN</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>.</td></tr></table>
</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>
<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="#LIRN"><m:mi mathcolor="#EE0000" mathvariant="bold">LIRN</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NZ"><m:mi mathcolor="#EE0000" mathvariant="bold">NZ</m:mi></m:maction></m:math>.</td></tr></table>
</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">On entry, an element of the input matrix has a row or column index (i.e., an element of <a class="arg" href="#IRN">IRN</a> or <a class="arg" href="#ICN">ICN</a>) outside the range <m:math><m:mn>1</m:mn></m:math>&#160;to <a class="arg" href="#N">N</a>.</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">Duplicate elements have been found in the input matrix and the factorization has been abandoned (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>&#160;on entry).</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">The factorization obtained is exact for a perturbed matrix whose  <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>th element differs from <m:math><m:msub><m:mi>a</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub></m:math>&#160;by less than <m:math><m:mn>3</m:mn><m:mi>&#949;</m:mi><m:mi>&#961;</m:mi><m:msub><m:mi>m</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub></m:math>&#160;where <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>, <m:math><m:mi>&#961;</m:mi></m:math>&#160;is the growth value returned in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#GROW"><m:mi mathcolor="#EE0000" mathvariant="bold">GROW</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, and <m:math><m:msub><m:mi>m</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub></m:math>&#160;the number of  Gaussian elimination operations applied to element <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>.  The value of <m:math><m:msub><m:mi>m</m:mi><m:mrow><m:mi>i</m:mi><m:mi>j</m:mi></m:mrow></m:msub></m:math>&#160;is not greater than <m:math><m:mi>n</m:mi></m:math>&#160;and is usually much less.  Small <m:math><m:mi>&#961;</m:mi></m:math>&#160;values therefore guarantee accurate results, but unfortunately large <m:math><m:mi>&#961;</m:mi></m:math>&#160;values may give a very pessimistic indication of accuracy.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2><h3 class="standard"><a class="sec" name="fcomments1" id="fcomments1"/>8.1&#160;&#160;Timing</h3>
<div class="paramtext">The time required may be estimated very roughly from the number <m:math><m:mi>&#964;</m:mi></m:math>&#160;of nonzeros in the factorized form (output as <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>) and for F01BRF and its associates is
<div class="tablediv"><table class="frame-none">
  
  
  <tbody>
   <tr>
    <td class="libdoc" valign="top" align="left">F01BRF:</td>
    <td class="libdoc" valign="top" align="left"><m:math><m:mn>5</m:mn><m:mo>&#8290;</m:mo><m:msup><m:mi>&#964;</m:mi><m:mn>2</m:mn></m:msup><m:mo>/</m:mo><m:mi>n</m:mi></m:math>&#160;units</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><a class="rout" href="../F01/f01bsf.xml">F01BSF</a>:</td>
    <td class="libdoc" valign="top" align="left"><m:math><m:msup><m:mi>&#964;</m:mi><m:mn>2</m:mn></m:msup><m:mo>/</m:mo><m:mi>n</m:mi></m:math>&#160;units</td>
   </tr><tr>
    <td class="libdoc" valign="top" align="left"><a class="rout" href="../F04/f04axf.xml">F04AXF</a>:</td>
    <td class="libdoc" valign="top" align="left"><m:math><m:mn>2</m:mn><m:mi>&#964;</m:mi></m:math>&#160;units</td>
   </tr>
  </tbody>
 </table></div>
where our unit is the time for the inner loop of a full matrix code (e.g.,  solving a full set of equations takes about <m:math><m:mfrac><m:mn>1</m:mn><m:mn>3</m:mn></m:mfrac><m:msup><m:mi>n</m:mi><m:mn>3</m:mn></m:msup></m:math>&#160;units).  Note that the faster <a class="rout" href="../F01/f01bsf.xml">F01BSF</a> time makes it well worthwhile to use this for a sequence of problems with the same pattern.</div><div class="paramtext">It should be appreciated that <m:math><m:mi>&#964;</m:mi></m:math>&#160;varies widely from problem to problem.  For network problems it may be little greater than <a class="arg" href="#NZ">NZ</a>,  the number of nonzeros in <m:math><m:mi>A</m:mi></m:math>; for discretization of two-dimensional and three-dimensional partial differential equations it may be about <m:math><m:mn>3</m:mn><m:mi>n</m:mi><m:mrow><m:msub><m:mi mathvariant="normal">log</m:mi><m:mn>2</m:mn></m:msub><m:mo>&#8289;</m:mo><m:mi>n</m:mi></m:mrow></m:math>&#160;and <m:math><m:mfrac><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac><m:msup><m:mi>n</m:mi><m:mrow><m:mn>5</m:mn><m:mo>/</m:mo><m:mn>3</m:mn></m:mrow></m:msup></m:math>,  respectively.</div><div class="paramtext">The time taken by F01BRF to find the block lower triangular form (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>) is typically <m:math><m:mn>5</m:mn><m:mo>&#8211;</m:mo><m:mn>15</m:mn><m:mo>%</m:mo></m:math>&#160;of the time taken by the routine when it is not found (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>).  If the matrix is irreducible (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>9</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;after a call with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>) then this time is wasted.  Otherwise, particularly if the largest block is small (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>10</m:mn></m:mfenced></m:mrow><m:mo>&#8810;</m:mo><m:mi>n</m:mi></m:math>), the consequent savings are likely to be greater.</div><div class="paramtext">The time taken to estimate growth (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#GROW"><m:mi mathcolor="#EE0000" mathvariant="bold">GROW</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>) is typically under <m:math><m:mn>20</m:mn><m:mo>%</m:mo></m:math>&#160;of the overall time.</div><div class="paramtext">The overall time may be substantially increased if there is inadequate &#8216;elbow-room&#8217; in the arrays <a class="arg" href="#A">A</a>, <a class="arg" href="#IRN">IRN</a> and <a class="arg" href="#ICN">ICN</a>.  When the sizes of the arrays are minimal (<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>6</m:mn></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>7</m:mn></m:mfenced></m:mrow></m:math>) it can execute as much as three times slower.  Values of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>3</m:mn></m:mfenced></m:mrow></m:math>&#160;and <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>4</m:mn></m:mfenced></m:mrow></m:math>&#160;greater than about <m:math><m:mn>10</m:mn></m:math>&#160;indicate that it may be worthwhile to increase array sizes.</div><h3 class="standard"><a class="sec" name="fcomments2" id="fcomments2"/>8.2&#160;&#160;Scaling</h3>
<div class="paramtext">The use of a relative pivot tolerance <a class="arg" href="#PIVOT">PIVOT</a> essentially presupposes that the matrix is well-scaled, i.e., that the matrix elements are broadly comparable in size.  Practical problems are often naturally well-scaled but particular care is needed for problems containing mixed types of variables (for example millimetres and neutron fluxes).</div><h3 class="standard"><a class="sec" name="fcomments3" id="fcomments3"/>8.3&#160;&#160;Singular and Rectangular Systems</h3>
<div class="paramtext">It is envisaged that F01BRF will almost always be called for square nonsingular matrices and that singularity indicates an error condition.  However, even if the matrix is singular it is possible to complete the factorization.  It is even possible for <a class="rout" href="../F04/f04axf.xml">F04AXF</a>  to solve a set of equations whose matrix is singular provided the set is consistent.</div><div class="paramtext">Two forms of singularity are possible.  If the matrix would be singular for any values of the nonzeros (e.g., if it has a whole row of zeros), then we say it is structurally singular, and continue only if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>.  If the matrix is nonsingular by virtue of the particular values of the nonzeros, then we say that it is numerically singular and continue only if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, in which case an upper bound on the rank of the matrix is returned in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IDISP"><m:mi mathcolor="#EE0000" mathvariant="bold">IDISP</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>5</m:mn></m:mfenced></m:mrow></m:math>&#160;when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LBLOCK"><m:mi mathcolor="#EE0000" mathvariant="bold">LBLOCK</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>.</div><div class="paramtext">Rectangular matrices may be treated by setting <a class="arg" href="#N">N</a> to the larger of the number of rows and numbers of columns and setting <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>.</div><div class="paramtext"><b>Note:</b>&#160; the <b>soft</b>
<b>failure</b> option should be used  (last digit of <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="#IFeq1"><m:mn mathcolor="#003399" mathvariant="bold">1</m:mn></m:maction></m:math>) if you wish to factorize singular matrices with <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;or <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABORT"><m:mi mathcolor="#EE0000" mathvariant="bold">ABORT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>2</m:mn></m:mfenced></m:mrow></m:math>&#160;set to .FALSE..</div><h3 class="standard"><a class="sec" name="fcomments4" id="fcomments4"/>8.4&#160;&#160;Duplicated Nonzeros</h3>
<div class="paramtext">The matrix <m:math><m:mi>A</m:mi></m:math>&#160;may consist of a sum of contributions from different sub-systems (for example finite elements).  In such cases you may rely on F01BRF to perform assembly, since duplicated elements are summed.</div><h3 class="standard"><a class="sec" name="fcomments5" id="fcomments5"/>8.5&#160;&#160;Determinant</h3>
<div class="paramtext">The following code may be used to compute the determinant of <m:math><m:mi>A</m:mi></m:math>&#160;(as the <span class="bitalic">double precision</span> variable <span class="mono">DET</span>) after a call of F01BRF:

<pre class="verbatim">
   DET = 1.0
   ID = IDISP(1)
   DO 10 I = 1, N
      IDG = ID + IKEEP(3*N+I)
      DET = DET*A(IDG)
      IF (IKEEP(N+I).NE.I)DET = -DET
      IF (IKEEP(2*N+I).NE.I)DET = -DET
      ID = ID + IKEEP(I)
10 CONTINUE
</pre>
</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example factorizes the real sparse matrix:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mfenced><m:mtable columnalign="right">
  <m:mtr>
   <m:mtd><m:mn>5</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>3</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>1</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>2</m:mn></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>3</m:mn></m:mrow></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>6</m:mn></m:mtd>
  </m:mtr>
 </m:mtable></m:mfenced>
<m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

This example program simply prints out some information about the factorization as returned by F01BRF in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;and <a class="arg" href="#IDISP">IDISP</a>.  Normally the call of F01BRF would be followed by a call of <a class="rout" href="../F04/f04axf.xml">F04AXF</a> (see <a class="sec" href="../F04/f04axf.xml#example">Section 9</a> in F04AXF).</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/f01brfe.f">Program Text (f01brfe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/f01brfe.d">Program&#160;Data (f01brfe.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/f01brfe.r">Program Results (f01brfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/F01/f01brf.pdf">F01BRF (PDF version)</a></div><div><a class="chap" href="f01conts.xml">F01 Chapter Contents</a></div><div><a class="chapint" href="f01intro.xml">F01 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>
