Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > df736a3bc446df5b16150bebb7296274 > files > 86

DSDP-devel-5.8-2.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>DSDP: src/solver/dsdpcops.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DSDP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_23046874d7fed141927c769a66d8e3a5.html">src</a>      </li>
      <li class="navelem"><a class="el" href="dir_03c647d51c93e018646ff83aa2eeb169.html">solver</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">dsdpcops.c</div>  </div>
</div>
<div class="contents">
<a href="dsdpcops_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &quot;<a class="code" href="dsdp_8h.html" title="Internal data structure for the DSDP solver.">dsdp.h</a>&quot;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &quot;<a class="code" href="dsdpsys_8h.html" title="Error handling, printing, and profiling.">dsdpsys.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#define DSDPCHKCONEERR(a,b);  { if (b){ DSDPSETERR1(b,&quot;Cone Number: %d,\n&quot;,a);} }</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="keyword">static</span> <span class="keywordtype">int</span> ConeSetup=0,ConeComputeS=0,ConeComputeSS=0,ConeComputeH=0,ConeHMultiplyAdd=0,ConeMaxPStep=0,ConeMaxDStep=0,ConePotential=0,ConeComputeX=0,ConeView=0,ConeDestroy=0,ConeXEigs=0,ConeRHS=0,ConeInvertS=0;
<a name="l00011"></a>00011 <span class="keyword">static</span> <span class="keywordtype">int</span> DSDPRegisterConeEvents(<span class="keywordtype">void</span>);
<a name="l00012"></a>00012 <span class="keywordtype">int</span> <a class="code" href="dsdpcops_8c.html#ae0eb90aaf8b6eeb6dfc629e6c36db654" title="Set the Schur complement matrix.">DSDPSetSchurMatOps</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a>,<span class="keyword">struct</span> DSDPSchurMat_Ops*, <span class="keywordtype">void</span>*);
<a name="l00013"></a>00013 <span class="keywordtype">int</span> <a class="code" href="dsdpcops_8c.html#ab41876205bbb01b21624eeeea359c756" title="Add a row to the Schur matrix.">DSDPAddSchurRow</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a>,<span class="keywordtype">int</span>, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a>);
<a name="l00014"></a>00014 <span class="comment">/*</span>
<a name="l00015"></a>00015 <span class="comment">int DSDPIdentifySchurColumns(DSDP,int, int*, int*, int);</span>
<a name="l00016"></a>00016 <span class="comment">*/</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPZeroConeEvents&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keywordtype">int</span> DSDPZeroConeEvents(){
<a name="l00021"></a>00021   DSDPFunctionBegin;
<a name="l00022"></a>00022   ConeSetup=0;ConeComputeS=0;ConeComputeSS=0;ConeComputeH=0;ConeHMultiplyAdd=0;ConeMaxPStep=0;ConeMaxDStep=0;ConePotential=0;ConeComputeX=0;ConeView=0;ConeDestroy=0;ConeXEigs=0;ConeRHS=0;ConeInvertS=0;
<a name="l00023"></a>00023   DSDPFunctionReturn(0);
<a name="l00024"></a>00024 }
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPRegisterConeEvents&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keywordtype">int</span> DSDPRegisterConeEvents(){
<a name="l00029"></a>00029 
<a name="l00030"></a>00030   DSDPFunctionBegin;
<a name="l00031"></a>00031   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Setup 1&amp;2&quot;</span>,&amp;ConeSetup);
<a name="l00032"></a>00032   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Invert S&quot;</span>,&amp;ConeInvertS);
<a name="l00033"></a>00033   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone RHS&quot;</span>,&amp;ConeRHS);
<a name="l00034"></a>00034   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Compute Newton Eq.&quot;</span>,&amp;ConeComputeH);
<a name="l00035"></a>00035   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Newton Multiply-Add&quot;</span>,&amp;ConeHMultiplyAdd);
<a name="l00036"></a>00036   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Max P Step Length&quot;</span>,&amp;ConeMaxPStep);
<a name="l00037"></a>00037   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Compute and Factor SP&quot;</span>,&amp;ConeComputeSS);
<a name="l00038"></a>00038   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Max D Step Length&quot;</span>,&amp;ConeMaxDStep);
<a name="l00039"></a>00039   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Compute and Factor S&quot;</span>,&amp;ConeComputeS);
<a name="l00040"></a>00040   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Potential&quot;</span>,&amp;ConePotential);
<a name="l00041"></a>00041   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone View&quot;</span>,&amp;ConeView);
<a name="l00042"></a>00042   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Compute X&quot;</span>,&amp;ConeComputeX);
<a name="l00043"></a>00043   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone X Residuals&quot;</span>,&amp;ConeXEigs);
<a name="l00044"></a>00044   DSDPEventLogRegister(<span class="stringliteral">&quot;Cone Destroy&quot;</span>,&amp;ConeDestroy);
<a name="l00045"></a>00045 
<a name="l00046"></a>00046   DSDPFunctionReturn(0);
<a name="l00047"></a>00047 }
<a name="l00048"></a>00048 
<a name="l00056"></a>00056 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPSetUpCones&quot;</span>
<a name="l00058"></a><a class="code" href="dsdpcops_8c.html#a6e7417c73f70c5a79f2d6d7a505afe93">00058</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a122354cd946e3323df519ad58061de7c" title="Each cone should factor data or allocate internal data structures.">DSDPSetUpCones</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp){
<a name="l00059"></a>00059   <span class="keywordtype">int</span> info,kk;
<a name="l00060"></a>00060   <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> yy0=dsdp-&gt;y;
<a name="l00061"></a>00061   DSDPFunctionBegin;
<a name="l00062"></a>00062   info=DSDPRegisterConeEvents();
<a name="l00063"></a>00063   DSDPEventLogBegin(ConeSetup);
<a name="l00064"></a>00064   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00065"></a>00065     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00066"></a>00066     info=<a class="code" href="dsdpcone_8c.html#aa1f01d8a4b8c0c27f00f2921c015dce7" title="Factor the data and allocate data structures.">DSDPConeSetUp</a>(dsdp-&gt;K[kk].cone,yy0);DSDPCHKCONEERR(kk,info);
<a name="l00067"></a>00067     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00068"></a>00068   }
<a name="l00069"></a>00069   DSDPEventLogEnd(ConeSetup);
<a name="l00070"></a>00070   DSDPFunctionReturn(0);
<a name="l00071"></a>00071 }
<a name="l00072"></a>00072 
<a name="l00082"></a>00082 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPSetUpCones2&quot;</span>
<a name="l00084"></a><a class="code" href="dsdpcops_8c.html#aea0bf9031c6e20e827b6ffdb9b911434">00084</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#aee3443bb7583964d908c57096572318d" title="Each cone should allocate its data structures .">DSDPSetUpCones2</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> yy0, <a class="code" href="structDSDPSchurMat__C.html" title="Schur complement matrix whose solution is the Newton direction.">DSDPSchurMat</a> M){
<a name="l00085"></a>00085   <span class="keywordtype">int</span> info,kk;
<a name="l00086"></a>00086   DSDPFunctionBegin;
<a name="l00087"></a>00087   DSDPEventLogBegin(ConeSetup);
<a name="l00088"></a>00088   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00089"></a>00089     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00090"></a>00090     info=<a class="code" href="dsdpcone_8c.html#ae1ea61e209ed52b7f11098cf5365c195" title="Factor the data and allocate data structures.">DSDPConeSetUp2</a>(dsdp-&gt;K[kk].cone,yy0,M);DSDPCHKCONEERR(kk,info);
<a name="l00091"></a>00091     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00092"></a>00092   }
<a name="l00093"></a>00093   DSDPEventLogEnd(ConeSetup);
<a name="l00094"></a>00094   DSDPFunctionReturn(0);
<a name="l00095"></a>00095 }
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 
<a name="l00105"></a>00105 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPDestroyCones&quot;</span>
<a name="l00107"></a><a class="code" href="dsdpcops_8c.html#a007c0bef8e59c8d5cad8eebf577b17fb">00107</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#adeaefde55edd2502a9eaae479d337fbf" title="Each cone shoudl free its data structures.">DSDPDestroyCones</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp){
<a name="l00108"></a>00108   <span class="keywordtype">int</span> info,kk,ncones=dsdp-&gt;ncones;
<a name="l00109"></a>00109   DSDPFunctionBegin;
<a name="l00110"></a>00110   DSDPEventLogBegin(ConeDestroy);
<a name="l00111"></a>00111   <span class="keywordflow">for</span> (kk=ncones-1;kk&gt;=0; kk--){
<a name="l00112"></a>00112     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00113"></a>00113     info=<a class="code" href="dsdpcone_8c.html#aa83677b3889ea8b0f6c2ab5f96e556d3" title="Free the internal memory of the cone.">DSDPConeDestroy</a>(&amp;dsdp-&gt;K[kk].cone);DSDPCHKCONEERR(kk,info);
<a name="l00114"></a>00114     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00115"></a>00115     info=<a class="code" href="dsdpcone_8c.html#a3a14b6dd810e1cbed712537487a1ce58" title="Initialize the pointers to 0.">DSDPConeInitialize</a>(&amp;dsdp-&gt;K[kk].cone);DSDPCHKCONEERR(kk,info);
<a name="l00116"></a>00116     dsdp-&gt;ncones--;
<a name="l00117"></a>00117   }
<a name="l00118"></a>00118   <span class="keywordflow">if</span> (dsdp-&gt;maxcones&gt;0){
<a name="l00119"></a>00119     DSDPFREE(&amp;dsdp-&gt;K,&amp;info);DSDPCHKERR(info);
<a name="l00120"></a>00120     dsdp-&gt;K=0;
<a name="l00121"></a>00121     dsdp-&gt;maxcones=0;
<a name="l00122"></a>00122   }
<a name="l00123"></a>00123   DSDPEventLogEnd(ConeDestroy);
<a name="l00124"></a>00124   info=DSDPZeroConeEvents();DSDPCHKERR(info);
<a name="l00125"></a>00125   DSDPFunctionReturn(0);
<a name="l00126"></a>00126 }
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00140"></a>00140 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeHessian&quot;</span>
<a name="l00142"></a><a class="code" href="dsdpcops_8c.html#a860f77c9f4b46f29dfaf4168ef75120e">00142</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a2ceab284bd7f378ae4da0c3b01362d8b" title="Compute the Schur complement, or Gram, matrix for each cone.">DSDPComputeHessian</a>( <a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp , <a class="code" href="structDSDPSchurMat__C.html" title="Schur complement matrix whose solution is the Newton direction.">DSDPSchurMat</a> M,  <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrhs1, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrhs2){
<a name="l00143"></a>00143   <span class="keywordtype">int</span> info,kk; <span class="keywordtype">double</span> r;
<a name="l00144"></a>00144   DSDPFunctionBegin;
<a name="l00145"></a>00145   DSDPEventLogBegin(ConeComputeH);
<a name="l00146"></a>00146   dsdp-&gt;schurmu=dsdp-&gt;mutarget;
<a name="l00147"></a>00147   info=DSDPVecGetR(dsdp-&gt;y,&amp;r);DSDPCHKERR(info);
<a name="l00148"></a>00148   info=<a class="code" href="dsdpschurmat_8c.html#a50ec9f401f7a0b426e6cfca3b5eedaa5" title="Set up the data structure.">DSDPSchurMatSetR</a>(dsdp-&gt;M,r);DSDPCHKERR(info);
<a name="l00149"></a>00149   info=<a class="code" href="dsdpschurmat_8c.html#a5d7b6f5a9e43140f0a55eca37d897fb7" title="Zero all element in the matrix.">DSDPSchurMatZeroEntries</a>(M);DSDPCHKERR(info);
<a name="l00150"></a>00150   info=DSDPVecZero(vrhs1);DSDPCHKERR(info);
<a name="l00151"></a>00151   info=DSDPVecZero(vrhs2);DSDPCHKERR(info);
<a name="l00152"></a>00152   info=DSDPVecZero(M.schur-&gt;rhs3);DSDPCHKERR(info);
<a name="l00153"></a>00153   info=<a class="code" href="dsdp_8h.html#a3d8e928c37fdc4ffc624f204930b29c1" title="Compute gradient of dual objective.">DSDPObjectiveGH</a>(dsdp,M,vrhs1); DSDPCHKERR(info);
<a name="l00154"></a>00154   <span class="keywordflow">for</span> (kk=dsdp-&gt;ncones-1;kk&gt;=0;kk--){
<a name="l00155"></a>00155     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00156"></a>00156     info=<a class="code" href="dsdpcone_8c.html#abf554f6b46448ff85d00cbafd0ebb27a" title="Compute Hessian and gradient of barrier function.">DSDPConeComputeHessian</a>(dsdp-&gt;K[kk].cone,dsdp-&gt;schurmu,M,vrhs1,vrhs2);DSDPCHKCONEERR(kk,info);
<a name="l00157"></a>00157     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00158"></a>00158   }
<a name="l00159"></a>00159   info=<a class="code" href="dsdpschurmat_8c.html#aa0f35c05985382f83c15658f38f07464" title="Final assembly of M.">DSDPSchurMatAssemble</a>(M);DSDPCHKERR(info);
<a name="l00160"></a>00160   <span class="comment">/*    DSDPSchurMatView(M); */</span>
<a name="l00161"></a>00161   info=<a class="code" href="dsdpschurmat_8c.html#a0b48fd50cf0b15fc018cfb5addbf132c" title="Collect elements of the vector.">DSDPSchurMatReducePVec</a>(M,vrhs1);DSDPCHKERR(info);
<a name="l00162"></a>00162   info=<a class="code" href="dsdpschurmat_8c.html#a0b48fd50cf0b15fc018cfb5addbf132c" title="Collect elements of the vector.">DSDPSchurMatReducePVec</a>(M,vrhs2);DSDPCHKERR(info);
<a name="l00163"></a>00163   info=<a class="code" href="dsdpschurmat_8c.html#a0b48fd50cf0b15fc018cfb5addbf132c" title="Collect elements of the vector.">DSDPSchurMatReducePVec</a>(M,M.schur-&gt;rhs3);DSDPCHKERR(info);
<a name="l00164"></a>00164   <span class="keywordflow">if</span> (0 &amp;&amp; dsdp-&gt;UsePenalty==DSDPNever){
<a name="l00165"></a>00165     info=DSDPVecAXPY(1.0,M.schur-&gt;rhs3,vrhs2);DSDPCHKERR(info);
<a name="l00166"></a>00166     info=DSDPVecZero(M.schur-&gt;rhs3);DSDPCHKERR(info);
<a name="l00167"></a>00167     info=DSDPVecZero(M.schur-&gt;dy3);DSDPCHKERR(info);
<a name="l00168"></a>00168     info=DSDPVecSetR(vrhs1,0);DSDPCHKERR(info);
<a name="l00169"></a>00169     info=DSDPVecSetR(vrhs2,r);DSDPCHKERR(info);
<a name="l00170"></a>00170   }
<a name="l00171"></a>00171   DSDPEventLogEnd(ConeComputeH);
<a name="l00172"></a>00172   DSDPFunctionReturn(0);
<a name="l00173"></a>00173 }
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00177"></a>00177 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPHessianMultiplyAdd&quot;</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span>
<a name="l00188"></a><a class="code" href="dsdpcops_8c.html#aefa0b9783d36f7351415e3973412ecd2">00188</a> <span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a9174f9ff18c7b5ccaa0550f12b22ab5a" title="Add the product of Schur matrix with v.">DSDPHessianMultiplyAdd</a>( <a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp , <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> v, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vv){
<a name="l00189"></a>00189   <span class="keywordtype">int</span> info,kk;
<a name="l00190"></a>00190   <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrow=dsdp-&gt;sles-&gt;BR;
<a name="l00191"></a>00191   DSDPFunctionBegin;
<a name="l00192"></a>00192   DSDPEventLogBegin(ConeHMultiplyAdd);
<a name="l00193"></a>00193 
<a name="l00194"></a>00194   info=<a class="code" href="dsdpschurmat_8c.html#ae26fbbe6ae18b7a1bae605540e94e7a1" title="Identify which rows on on this processor.">DSDPSchurMatRowScaling</a>(dsdp-&gt;M,vrow);DSDPCHKERR(info);
<a name="l00195"></a>00195   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00196"></a>00196     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00197"></a>00197     info=<a class="code" href="dsdpcone_8c.html#ace18be7143284ccf104156494f081660" title="Multiply Hessian by a vector and add the result.">DSDPConeMultiplyAdd</a>(dsdp-&gt;K[kk].cone,dsdp-&gt;schurmu,vrow,v,vv);DSDPCHKCONEERR(kk,info);
<a name="l00198"></a>00198     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00199"></a>00199   }
<a name="l00200"></a>00200   info=<a class="code" href="dsdpschurmat_8c.html#a0b48fd50cf0b15fc018cfb5addbf132c" title="Collect elements of the vector.">DSDPSchurMatReducePVec</a>(dsdp-&gt;M,vv);DSDPCHKERR(info);
<a name="l00201"></a>00201   DSDPEventLogEnd(ConeHMultiplyAdd);
<a name="l00202"></a>00202   DSDPFunctionReturn(0);
<a name="l00203"></a>00203 }
<a name="l00204"></a>00204 
<a name="l00205"></a>00205 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00206"></a>00206 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeG&quot;</span>
<a name="l00207"></a>00207 <span class="preprocessor"></span>
<a name="l00215"></a><a class="code" href="dsdpcops_8c.html#afd320a99d5269ecd61f343355acee481">00215</a> <span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a1fefd0ba066603f3c6adff17b06583d4" title="Compute the gradient of the barrier for each cone.">DSDPComputeG</a>( <a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp , <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vt, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrhs1, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> vrhs2){
<a name="l00216"></a>00216   <span class="keywordtype">int</span> info,kk; <span class="keywordtype">double</span> r;
<a name="l00217"></a>00217   DSDPFunctionBegin;
<a name="l00218"></a>00218   DSDPEventLogBegin(ConeRHS);
<a name="l00219"></a>00219   info=DSDPVecZero(vrhs1);DSDPCHKERR(info);
<a name="l00220"></a>00220   info=DSDPVecZero(vrhs2);DSDPCHKERR(info);
<a name="l00221"></a>00221   info=DSDPVecGetR(dsdp-&gt;y,&amp;r);DSDPCHKERR(info);
<a name="l00222"></a>00222   info=<a class="code" href="dsdpschurmat_8c.html#a50ec9f401f7a0b426e6cfca3b5eedaa5" title="Set up the data structure.">DSDPSchurMatSetR</a>(dsdp-&gt;M,r);DSDPCHKERR(info);
<a name="l00223"></a>00223   info=<a class="code" href="dsdpschurmat_8c.html#ae26fbbe6ae18b7a1bae605540e94e7a1" title="Identify which rows on on this processor.">DSDPSchurMatRowScaling</a>(dsdp-&gt;M,vt);DSDPCHKERR(info);
<a name="l00224"></a>00224   info=<a class="code" href="dsdp_8h.html#a3d8e928c37fdc4ffc624f204930b29c1" title="Compute gradient of dual objective.">DSDPObjectiveGH</a>(dsdp,dsdp-&gt;M,vrhs1); DSDPCHKERR(info);
<a name="l00225"></a>00225   <span class="keywordflow">if</span> (0 &amp;&amp; r==0){info=DSDPVecSetR(vrhs1,0);info=DSDPVecSetR(vrhs2,0);}
<a name="l00226"></a>00226   <span class="comment">/*  info=DSDPVecScale(1.0/dsdp-&gt;schurmu,vrhs1); DSDPCHKERR(info); */</span>
<a name="l00227"></a>00227   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00228"></a>00228     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00229"></a>00229     info=<a class="code" href="dsdpcone_8c.html#aab3922a9faf6cb038282a61c2647c8e7" title="Compute gradient of barrier function.">DSDPConeComputeRHS</a>(dsdp-&gt;K[kk].cone,dsdp-&gt;schurmu,vt,vrhs1,vrhs2);DSDPCHKCONEERR(kk,info);
<a name="l00230"></a>00230     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00231"></a>00231   }
<a name="l00232"></a>00232   DSDPEventLogEnd(ConeRHS);
<a name="l00233"></a>00233   info=<a class="code" href="dsdpschurmat_8c.html#a0b48fd50cf0b15fc018cfb5addbf132c" title="Collect elements of the vector.">DSDPSchurMatReducePVec</a>(dsdp-&gt;M,vrhs1);DSDPCHKERR(info);
<a name="l00234"></a>00234   info=<a class="code" href="dsdpschurmat_8c.html#a0b48fd50cf0b15fc018cfb5addbf132c" title="Collect elements of the vector.">DSDPSchurMatReducePVec</a>(dsdp-&gt;M,vrhs2);DSDPCHKERR(info);
<a name="l00235"></a>00235   DSDPFunctionReturn(0);
<a name="l00236"></a>00236 }
<a name="l00237"></a>00237 
<a name="l00238"></a>00238 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00239"></a>00239 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeANorm2&quot;</span>
<a name="l00240"></a>00240 <span class="preprocessor"></span>
<a name="l00246"></a><a class="code" href="dsdpcops_8c.html#acf8889abb8bd4a4330ad4ad9e42b6164">00246</a> <span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a4f78e03b432425021752f660a87cb480" title="Compute norm of A and C.">DSDPComputeANorm2</a>( <a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp , <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> Anorm2){
<a name="l00247"></a>00247   <span class="keywordtype">int</span> info,kk;
<a name="l00248"></a>00248   DSDPFunctionBegin;
<a name="l00249"></a>00249   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00250"></a>00250     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00251"></a>00251     info=<a class="code" href="dsdpcone_8c.html#af1530141e91409217aabb01bbdac244a" title="Add square of 2-norm of data correponding to each variable y.">DSDPConeANorm2</a>(dsdp-&gt;K[kk].cone,Anorm2);DSDPCHKCONEERR(kk,info);
<a name="l00252"></a>00252     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00253"></a>00253   }
<a name="l00254"></a>00254   DSDPFunctionReturn(0);
<a name="l00255"></a>00255 }
<a name="l00256"></a>00256 
<a name="l00257"></a>00257 
<a name="l00270"></a>00270 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00271"></a>00271 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeSS&quot;</span>
<a name="l00272"></a><a class="code" href="dsdpcops_8c.html#ab5c9965faf6bc134628aa7dbc41089be">00272</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a0866ec107b5c60afbec8a9bda9caa22d" title="Compute the dual variables S in each cone.">DSDPComputeSS</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> Y, <a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634b" title="DSDP requires two instances of the data structures S.">DSDPDualFactorMatrix</a> flag, <a class="code" href="dsdpbasictypes_8h.html#ae667f2bff3ab5ab0bc109fa76dc4ed65" title="Boolean variables.">DSDPTruth</a> *ispsdefinite){
<a name="l00273"></a>00273   <span class="keywordtype">int</span> info,kk;
<a name="l00274"></a>00274   <a class="code" href="dsdpbasictypes_8h.html#ae667f2bff3ab5ab0bc109fa76dc4ed65" title="Boolean variables.">DSDPTruth</a> psd=<a class="code" href="dsdpbasictypes_8h.html#ae667f2bff3ab5ab0bc109fa76dc4ed65ae6b2e53e51e94a5fa7204ceac78f824f">DSDP_TRUE</a>;
<a name="l00275"></a>00275   DSDPFunctionBegin;
<a name="l00276"></a>00276   <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634bab6fdf4f2eac3be74db4cdd12007f3cb0">DUAL_FACTOR</a>){
<a name="l00277"></a>00277     DSDPEventLogBegin(ConeComputeS);
<a name="l00278"></a>00278   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634baa8adedc328d310fc0bb1b04a9091bad1">PRIMAL_FACTOR</a>){
<a name="l00279"></a>00279     DSDPEventLogBegin(ConeComputeSS);
<a name="l00280"></a>00280   }
<a name="l00281"></a>00281   <span class="keywordflow">for</span> (kk=dsdp-&gt;ncones-1; kk&gt;=0 &amp;&amp; psd==<a class="code" href="dsdpbasictypes_8h.html#ae667f2bff3ab5ab0bc109fa76dc4ed65ae6b2e53e51e94a5fa7204ceac78f824f">DSDP_TRUE</a>;kk--){
<a name="l00282"></a>00282     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00283"></a>00283     info=<a class="code" href="dsdpcone_8c.html#a662cc8198f094c46e5bce9f25a21e245" title="Given y, compute S and determine whether its in the cone.">DSDPConeComputeS</a>(dsdp-&gt;K[kk].cone,Y,flag,&amp;psd); DSDPCHKCONEERR(kk,info);
<a name="l00284"></a>00284     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00285"></a>00285   }
<a name="l00286"></a>00286   *ispsdefinite=psd;
<a name="l00287"></a>00287   <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634bab6fdf4f2eac3be74db4cdd12007f3cb0">DUAL_FACTOR</a>){
<a name="l00288"></a>00288     DSDPEventLogEnd(ConeComputeS);
<a name="l00289"></a>00289   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634baa8adedc328d310fc0bb1b04a9091bad1">PRIMAL_FACTOR</a>){
<a name="l00290"></a>00290     DSDPEventLogEnd(ConeComputeSS);
<a name="l00291"></a>00291   }
<a name="l00292"></a>00292   DSDPFunctionReturn(0);
<a name="l00293"></a>00293 }
<a name="l00294"></a>00294 
<a name="l00305"></a>00305 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPInvertS&quot;</span>
<a name="l00307"></a><a class="code" href="dsdpcops_8c.html#aad72524c8109b033a29d95e645cd2360">00307</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a4a52d63cd2860f6737c4c89409656866" title="Invert the S variables in each cone.">DSDPInvertS</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp){
<a name="l00308"></a>00308   <span class="keywordtype">int</span> info,kk;
<a name="l00309"></a>00309   DSDPFunctionBegin;
<a name="l00310"></a>00310   DSDPEventLogBegin(ConeInvertS);
<a name="l00311"></a>00311   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00312"></a>00312     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00313"></a>00313     info=<a class="code" href="dsdpcone_8c.html#a8eb4a6997933bfd177cfc1bf75f9a3bf" title="Invert the dual matrix S.">DSDPConeInvertS</a>(dsdp-&gt;K[kk].cone); DSDPCHKCONEERR(kk,info);
<a name="l00314"></a>00314     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00315"></a>00315   }
<a name="l00316"></a>00316   DSDPEventLogEnd(ConeInvertS);
<a name="l00317"></a>00317   DSDPFunctionReturn(0);
<a name="l00318"></a>00318 }
<a name="l00319"></a>00319 
<a name="l00334"></a>00334 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00335"></a>00335 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeMaxStepLength&quot;</span>
<a name="l00336"></a><a class="code" href="dsdpcops_8c.html#a4c0538bfd8916f9e72d8a01360b733f2">00336</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#acd9df2e3c28389c1a0c29ea05bcc73ee" title="Compute the maximum step length for the given step direction.">DSDPComputeMaxStepLength</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> DY, <a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634b" title="DSDP requires two instances of the data structures S.">DSDPDualFactorMatrix</a> flag, <span class="keywordtype">double</span> *maxsteplength){
<a name="l00337"></a>00337   <span class="keywordtype">int</span> info,kk;
<a name="l00338"></a>00338   <span class="keywordtype">double</span> msteplength=1.0e30,conesteplength;
<a name="l00339"></a>00339   DSDPFunctionBegin;
<a name="l00340"></a>00340   <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634bab6fdf4f2eac3be74db4cdd12007f3cb0">DUAL_FACTOR</a>){
<a name="l00341"></a>00341     DSDPEventLogBegin(ConeMaxDStep);
<a name="l00342"></a>00342   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634baa8adedc328d310fc0bb1b04a9091bad1">PRIMAL_FACTOR</a>){
<a name="l00343"></a>00343     DSDPEventLogBegin(ConeMaxPStep);
<a name="l00344"></a>00344   }
<a name="l00345"></a>00345   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00346"></a>00346     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00347"></a>00347     conesteplength=1.0e20;
<a name="l00348"></a>00348     info=<a class="code" href="dsdpcone_8c.html#a57df4302573f1afba87d10eb098be9b7" title="Determine distance to the edge of the cone.">DSDPConeComputeMaxStepLength</a>(dsdp-&gt;K[kk].cone,DY,flag,&amp;conesteplength);DSDPCHKCONEERR(kk,info);
<a name="l00349"></a>00349     msteplength=DSDPMin(msteplength,conesteplength);
<a name="l00350"></a>00350     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00351"></a>00351   }
<a name="l00352"></a>00352   *maxsteplength=msteplength;
<a name="l00353"></a>00353   <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634bab6fdf4f2eac3be74db4cdd12007f3cb0">DUAL_FACTOR</a>){
<a name="l00354"></a>00354     DSDPEventLogEnd(ConeMaxDStep);
<a name="l00355"></a>00355   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (flag==<a class="code" href="dsdpbasictypes_8h.html#ae47666e7e5d77002110e20ef9ebb634baa8adedc328d310fc0bb1b04a9091bad1">PRIMAL_FACTOR</a>){
<a name="l00356"></a>00356     DSDPEventLogEnd(ConeMaxPStep);
<a name="l00357"></a>00357   }
<a name="l00358"></a>00358   DSDPFunctionReturn(0);
<a name="l00359"></a>00359 }
<a name="l00360"></a>00360 
<a name="l00361"></a>00361 
<a name="l00376"></a>00376 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPPassXVectors&quot;</span>
<a name="l00378"></a><a class="code" href="dsdpcops_8c.html#a7507c5e1a9a46d6fea30f48e9a72ab42">00378</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a4d28c58bb5605d6636c6a425c10bf9ea" title="Pass the information needed to compute the variables X in each cone but do not compute X...">DSDPPassXVectors</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <span class="keywordtype">double</span> mu, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> Y, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> DY){
<a name="l00379"></a>00379   <span class="keywordtype">int</span> info,kk;
<a name="l00380"></a>00380   DSDPFunctionBegin;
<a name="l00381"></a>00381   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00382"></a>00382     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00383"></a>00383     info=<a class="code" href="dsdpcone_8c.html#a855eebeeb260f54298f00c05171e4f5a" title="Pass information needed to construct X.">DSDPConeSetXMaker</a>(dsdp-&gt;K[kk].cone,mu,Y,DY);DSDPCHKCONEERR(kk,info);
<a name="l00384"></a>00384     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00385"></a>00385   }
<a name="l00386"></a>00386   DSDPFunctionReturn(0);
<a name="l00387"></a>00387 }
<a name="l00388"></a>00388 
<a name="l00389"></a>00389 
<a name="l00399"></a>00399 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00400"></a>00400 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPGetConicDimension&quot;</span>
<a name="l00401"></a><a class="code" href="dsdpcops_8c.html#aee70cfb08e59f142c96f14a9df579b5b">00401</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#ad36ddc31c51eafafc6bf915e54492259" title="Get the total dimension of the cones.">DSDPGetConicDimension</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <span class="keywordtype">double</span> *n){
<a name="l00402"></a>00402   <span class="keywordtype">int</span> info,kk;
<a name="l00403"></a>00403   <span class="keywordtype">double</span> nn,nnn=0;
<a name="l00404"></a>00404   DSDPFunctionBegin;
<a name="l00405"></a>00405   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00406"></a>00406     nn=0;
<a name="l00407"></a>00407     info=<a class="code" href="dsdpcone_8c.html#a952e902aab678a96a00cefeb27861a8b" title="Provide the dimension of the cone.">DSDPConeGetDimension</a>(dsdp-&gt;K[kk].cone,&amp;nn);DSDPCHKCONEERR(kk,info);
<a name="l00408"></a>00408     nnn+=nn;
<a name="l00409"></a>00409   }
<a name="l00410"></a>00410   *n=nnn;
<a name="l00411"></a>00411   DSDPFunctionReturn(0);
<a name="l00412"></a>00412 }
<a name="l00413"></a>00413 
<a name="l00414"></a>00414 
<a name="l00422"></a>00422 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPViewCones&quot;</span>
<a name="l00424"></a><a class="code" href="dsdpcops_8c.html#a03399e755be87d0399a5d92a53c230a0">00424</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a7fa00d4f9f0ecb5c8e7890ec7cfdc44d" title="Each cone should print its state.">DSDPViewCones</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp){
<a name="l00425"></a>00425   <span class="keywordtype">int</span> info,kk;
<a name="l00426"></a>00426   DSDPFunctionBegin;
<a name="l00427"></a>00427   DSDPEventLogBegin(ConeView);
<a name="l00428"></a>00428   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00429"></a>00429     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00430"></a>00430     info=<a class="code" href="dsdpcone_8c.html#a02e7404ce5e23352fd5f988d03300335" title="View contents of the cone.">DSDPConeView</a>(dsdp-&gt;K[kk].cone);DSDPCHKCONEERR(kk,info);
<a name="l00431"></a>00431     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00432"></a>00432   }
<a name="l00433"></a>00433   DSDPEventLogEnd(ConeView);
<a name="l00434"></a>00434   DSDPFunctionReturn(0);
<a name="l00435"></a>00435 }
<a name="l00436"></a>00436 
<a name="l00437"></a>00437 
<a name="l00448"></a>00448 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00449"></a>00449 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPMonitorCones&quot;</span>
<a name="l00450"></a><a class="code" href="dsdpcops_8c.html#ad6f3db49063e69ff3dd9da24edfc0027">00450</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a7026470fc2bdbe37a0115250883a7f1e" title="This routine is called once per iteration.">DSDPMonitorCones</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp,<span class="keywordtype">int</span> tag){
<a name="l00451"></a>00451   <span class="keywordtype">int</span> info,kk;
<a name="l00452"></a>00452   DSDPFunctionBegin;
<a name="l00453"></a>00453   DSDPEventLogBegin(ConeView);
<a name="l00454"></a>00454   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00455"></a>00455     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00456"></a>00456     info=<a class="code" href="dsdpcone_8c.html#a86d47e198ccf3003c2fa4f1710002146" title="Do anything at in the cone at each iteration.">DSDPConeMonitor</a>(dsdp-&gt;K[kk].cone,tag);DSDPCHKCONEERR(kk,info);
<a name="l00457"></a>00457     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00458"></a>00458   }
<a name="l00459"></a>00459   DSDPEventLogEnd(ConeView);
<a name="l00460"></a>00460   DSDPFunctionReturn(0);
<a name="l00461"></a>00461 }
<a name="l00462"></a>00462 
<a name="l00463"></a>00463 
<a name="l00472"></a>00472 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00473"></a>00473 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPSparsityInSchurMat&quot;</span>
<a name="l00474"></a><a class="code" href="dsdpcops_8c.html#a0e9ca82696c63e5f43875a4d01138dc3">00474</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a4116515642c1eb1c843b90aee3909cec" title="Each cone should print its state.">DSDPSchurSparsity</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <span class="keywordtype">int</span> row, <span class="keywordtype">int</span> rnnz[], <span class="keywordtype">int</span> m){
<a name="l00475"></a>00475   <span class="keywordtype">int</span> info,kk;
<a name="l00476"></a>00476   DSDPFunctionBegin;
<a name="l00477"></a>00477   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00478"></a>00478     <span class="comment">/*    DSDPEventLogBegin(dsdp-&gt;K[kk].coneid); */</span>
<a name="l00479"></a>00479     info=<a class="code" href="dsdpcone_8c.html#ab2d33b754ac2b2adc12b72eb93d6f00a" title="Identify sparsity pattern in a row of the Hessian term.">DSDPConeSparsityInSchurMat</a>(dsdp-&gt;K[kk].cone,row,rnnz,m+2);DSDPCHKCONEERR(kk,info);
<a name="l00480"></a>00480     <span class="comment">/*    DSDPEventLogEnd(dsdp-&gt;K[kk].coneid); */</span>
<a name="l00481"></a>00481   }
<a name="l00482"></a>00482   DSDPFunctionReturn(0);
<a name="l00483"></a>00483 }
<a name="l00484"></a>00484 
<a name="l00493"></a>00493 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00494"></a>00494 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeLogSDeterminant&quot;</span>
<a name="l00495"></a><a class="code" href="dsdpcops_8c.html#a079dccb87a854b8b7b1fba7a0790f23e">00495</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a365ab3f361a5bf6770a8276e7ea2be41" title="Compute the logarithmic barrier function for the dual varialbe S.">DSDPComputeLogSDeterminant</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <span class="keywordtype">double</span> *logdet){
<a name="l00496"></a>00496   <span class="keywordtype">int</span> info,kk;
<a name="l00497"></a>00497   <span class="keywordtype">double</span> coneobjective,conepotential,llogdet=0;
<a name="l00498"></a>00498   DSDPFunctionBegin;
<a name="l00499"></a>00499   DSDPEventLogBegin(ConePotential);
<a name="l00500"></a>00500   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00501"></a>00501     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00502"></a>00502     coneobjective=0;conepotential=0;
<a name="l00503"></a>00503     info=<a class="code" href="dsdpcone_8c.html#a8ded3e18b57af86f930fbc025c529d70" title="Evaluate logrithmic barrier function.">DSDPConeComputeLogSDeterminant</a>(dsdp-&gt;K[kk].cone,&amp;coneobjective,&amp;conepotential);DSDPCHKCONEERR(kk,info);
<a name="l00504"></a>00504     llogdet+=conepotential;
<a name="l00505"></a>00505     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00506"></a>00506   }
<a name="l00507"></a>00507   *logdet=llogdet;
<a name="l00508"></a>00508   DSDPEventLogEnd(ConePotential);
<a name="l00509"></a>00509   DSDPFunctionReturn(0);
<a name="l00510"></a>00510 }
<a name="l00511"></a>00511 
<a name="l00512"></a>00512 
<a name="l00520"></a>00520 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00521"></a>00521 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPSetCone&quot;</span>
<a name="l00522"></a><a class="code" href="dsdpcops_8c.html#a030166084dfd75e9cd9ae726817d7f6d">00522</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#aa7ef8e73a60cea369a21c3acd004e8ab" title="Pass a cone to the DSDP solver.">DSDPSetCone</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp,<a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> tcone){
<a name="l00523"></a>00523   <span class="keywordtype">int</span> info,i,tc;
<a name="l00524"></a>00524   <span class="keywordtype">char</span> conename[100];
<a name="l00525"></a>00525   DCone *ccones;
<a name="l00526"></a>00526   DSDPFunctionBegin;
<a name="l00527"></a>00527   <span class="keywordflow">if</span> (dsdp-&gt;ncones&gt;=dsdp-&gt;maxcones){
<a name="l00528"></a>00528     tc=2*dsdp-&gt;maxcones+4;
<a name="l00529"></a>00529 
<a name="l00530"></a>00530     DSDPCALLOC2(&amp;ccones,DCone,tc,&amp;info);DSDPCHKERR(info);
<a name="l00531"></a>00531     <span class="keywordflow">for</span> (i=0;i&lt;dsdp-&gt;ncones;i++){ccones[i].cone=dsdp-&gt;K[i].cone;}
<a name="l00532"></a>00532     <span class="keywordflow">for</span> (i=0;i&lt;dsdp-&gt;ncones;i++){ccones[i].coneid=dsdp-&gt;K[i].coneid;}
<a name="l00533"></a>00533     DSDPFREE(&amp;dsdp-&gt;K,&amp;info);DSDPCHKERR(info);
<a name="l00534"></a>00534     dsdp-&gt;K=ccones;
<a name="l00535"></a>00535     dsdp-&gt;maxcones=tc;
<a name="l00536"></a>00536   }
<a name="l00537"></a>00537   info=<a class="code" href="dsdpcone_8c.html#a4c1f6ff4554b63539556c8c00a79e205" title="Get name of the cone.">DSDPGetConeName</a>(tcone,conename,100);DSDPCHKERR(info);
<a name="l00538"></a>00538   DSDPEventLogRegister(conename,&amp;tc);
<a name="l00539"></a>00539   dsdp-&gt;K[dsdp-&gt;ncones].cone=tcone;
<a name="l00540"></a>00540   dsdp-&gt;K[dsdp-&gt;ncones].coneid=tc;
<a name="l00541"></a>00541   dsdp-&gt;ncones++;
<a name="l00542"></a>00542   DSDPFunctionReturn(0); 
<a name="l00543"></a>00543 }
<a name="l00544"></a>00544 
<a name="l00567"></a>00567 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00568"></a>00568 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPAddCone&quot;</span>
<a name="l00569"></a><a class="code" href="dsdpcops_8c.html#a2435d09eb37177925e8257f7fb4d9968">00569</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcone__impl_8h.html#ae305676af8ca6fb9340d129b392c0f4d" title="Apply DSDP to a conic structure.">DSDPAddCone</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp,<span class="keyword">struct</span> DSDPCone_Ops* dsdpops, <span class="keywordtype">void</span>* dsdpcone){
<a name="l00570"></a>00570   <span class="keywordtype">int</span> info;
<a name="l00571"></a>00571   <a class="code" href="dsdpcone_8h.html#a635fc48fba0ec5edb9b23bd57aadb1e1" title="This object holds the data of a SDP, LP, or other cone. Its structure is opaque to the DSDP Solver...">DSDPCone</a> K;
<a name="l00572"></a>00572   DSDPFunctionBegin;
<a name="l00573"></a>00573   info=<a class="code" href="dsdpcone_8c.html#a3a14b6dd810e1cbed712537487a1ce58" title="Initialize the pointers to 0.">DSDPConeInitialize</a>(&amp;K); DSDPCHKERR(info);
<a name="l00574"></a>00574   info=<a class="code" href="dsdpcone_8c.html#abf7509c885d7e32c250657ecf88619d4" title="Initialize the pointers to 0.">DSDPConeSetData</a>(&amp;K,dsdpops,dsdpcone); DSDPCHKERR(info);
<a name="l00575"></a>00575   info=<a class="code" href="dsdp_8h.html#aa7ef8e73a60cea369a21c3acd004e8ab" title="Pass a cone to the DSDP solver.">DSDPSetCone</a>(dsdp,K); DSDPCHKERR(info);
<a name="l00576"></a>00576   DSDPFunctionReturn(0); 
<a name="l00577"></a>00577 }
<a name="l00578"></a>00578 
<a name="l00579"></a>00579 
<a name="l00600"></a>00600 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00601"></a>00601 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPSetSchurMatOps&quot;</span>
<a name="l00602"></a><a class="code" href="cholmat_8c.html#ae0eb90aaf8b6eeb6dfc629e6c36db654">00602</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcops_8c.html#ae0eb90aaf8b6eeb6dfc629e6c36db654" title="Set the Schur complement matrix.">DSDPSetSchurMatOps</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp,<span class="keyword">struct</span> DSDPSchurMat_Ops* sops, <span class="keywordtype">void</span>* mdata){
<a name="l00603"></a>00603   <span class="keywordtype">int</span> info;
<a name="l00604"></a>00604   DSDPFunctionBegin;
<a name="l00605"></a>00605   info=<a class="code" href="dsdpschurmat_8c.html#ab3f83dfa4e65816b57c0a58ec4e8ba4c" title="Set the Schur matrix with an opaque pointer and structure of function pointers.">DSDPSchurMatSetData</a>(&amp;dsdp-&gt;M,sops,mdata);DSDPCHKERR(info);
<a name="l00606"></a>00606   DSDPFunctionReturn(0); 
<a name="l00607"></a>00607 }
<a name="l00608"></a>00608 
<a name="l00609"></a>00609 
<a name="l00620"></a>00620 <span class="preprocessor">#undef __FUNCT__</span>
<a name="l00621"></a>00621 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPSetSchurRow&quot;</span>
<a name="l00622"></a><a class="code" href="dsdpcops_8c.html#ab41876205bbb01b21624eeeea359c756">00622</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdpcops_8c.html#ab41876205bbb01b21624eeeea359c756" title="Add a row to the Schur matrix.">DSDPAddSchurRow</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp,<span class="keywordtype">int</span> row, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> R){
<a name="l00623"></a>00623   <span class="keywordtype">int</span> info;
<a name="l00624"></a>00624   DSDPFunctionBegin;
<a name="l00625"></a>00625   info=<a class="code" href="dsdpschurmat_8h.html#af719c02885dbf6f831e92e8f83ffa0b5" title="Add elements to a row of the Schur matrix.">DSDPSchurMatAddRow</a>(dsdp-&gt;M,row,1.0,R);DSDPCHKERR(info);
<a name="l00626"></a>00626   DSDPFunctionReturn(0); 
<a name="l00627"></a>00627 }
<a name="l00628"></a>00628 <span class="comment">/*</span>
<a name="l00629"></a>00629 <span class="comment">#undef __FUNCT__</span>
<a name="l00630"></a>00630 <span class="comment">#define __FUNCT__ &quot;DSDPIdentifySchurColumns&quot;</span>
<a name="l00631"></a>00631 <span class="comment">int DSDPIdentifySchurColumns(DSDP dsdp,int row, int *mcol, int *ncols, int m){</span>
<a name="l00632"></a>00632 <span class="comment">  DSDPFunctionBegin;</span>
<a name="l00633"></a>00633 <span class="comment">  int info;</span>
<a name="l00634"></a>00634 <span class="comment">  DSDPVec V;</span>
<a name="l00635"></a>00635 <span class="comment">  info=DSDPSchurMatRowColumnScaling(dsdp-&gt;M,row,V,ncols); DSDPCHKERR(info);</span>
<a name="l00636"></a>00636 <span class="comment">  DSDPFunctionReturn(1); </span>
<a name="l00637"></a>00637 <span class="comment">}</span>
<a name="l00638"></a>00638 <span class="comment">*/</span>
<a name="l00639"></a>00639 
<a name="l00652"></a>00652 <span class="preprocessor">#undef __FUNCT__  </span>
<a name="l00653"></a>00653 <span class="preprocessor"></span><span class="preprocessor">#define __FUNCT__ &quot;DSDPComputeXVariables&quot;</span>
<a name="l00654"></a><a class="code" href="dsdpcops_8c.html#ab3c99380d452c9b4eae6b74abbd2d21d">00654</a> <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="dsdp_8h.html#a871c5d28852a40e2593f75e635855296" title="Compute the X variables in each cone.">DSDPComputeXVariables</a>(<a class="code" href="structDSDP__C.html" title="Internal structures for the DSDP solver.">DSDP</a> dsdp, <span class="keywordtype">double</span> xmakermu, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> xmakery, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> xmakerdy, <a class="code" href="dsdpvec_8h.html#a421243d35437ad44ded3c1e34198e8e9" title="This object hold m+2 variables: a scaling of C, the y variables, and r.">DSDPVec</a> AX, <span class="keywordtype">double</span> *tracexs){
<a name="l00655"></a>00655   <span class="keywordtype">int</span> kk,info;
<a name="l00656"></a>00656   <span class="keywordtype">double</span> ttracexs=0,tttracexs=0,tracex;
<a name="l00657"></a>00657 
<a name="l00658"></a>00658   DSDPFunctionBegin;
<a name="l00659"></a>00659   DSDPEventLogBegin(ConeComputeX);
<a name="l00660"></a>00660   info=DSDPVecZero(AX);DSDPCHKERR(info);
<a name="l00661"></a>00661   <span class="keywordflow">for</span> (kk=0;kk&lt;dsdp-&gt;ncones;kk++){
<a name="l00662"></a>00662     DSDPEventLogBegin(dsdp-&gt;K[kk].coneid);
<a name="l00663"></a>00663     tttracexs=0;
<a name="l00664"></a>00664     info=<a class="code" href="dsdpcone_8c.html#a08aac87e75081491fa3c500e37c2ce51" title="Given y,dy, and mu, construct X and add its inner product with the data and S.">DSDPConeComputeX</a>(dsdp-&gt;K[kk].cone,xmakermu,xmakery,xmakerdy,AX,&amp;tttracexs);DSDPCHKCONEERR(kk,info);
<a name="l00665"></a>00665     ttracexs+=tttracexs;
<a name="l00666"></a>00666     DSDPEventLogEnd(dsdp-&gt;K[kk].coneid);
<a name="l00667"></a>00667   }
<a name="l00668"></a>00668   info=DSDPVecGetR(AX,&amp;tracex); DSDPCHKERR(info);
<a name="l00669"></a>00669   DSDPLogInfo(0,2,<span class="stringliteral">&quot;Trace(X): %4.2e\n&quot;</span>,dsdp-&gt;tracex);
<a name="l00670"></a>00670   info=DSDPVecAXPY(-1.0,dsdp-&gt;b,AX); DSDPCHKERR(info);
<a name="l00671"></a>00671   info=DSDPComputeFixedYX(dsdp-&gt;M,AX); DSDPCHKERR(info);
<a name="l00672"></a>00672   *tracexs=ttracexs;
<a name="l00673"></a>00673   info=DSDPVecSetR(AX,tracex); DSDPCHKERR(info);
<a name="l00674"></a>00674   DSDPEventLogEnd(ConeComputeX);
<a name="l00675"></a>00675   DSDPFunctionReturn(0);
<a name="l00676"></a>00676 }
<a name="l00677"></a>00677 
<a name="l00678"></a>00678 
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Jun 8 2011 for DSDP by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>