<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">Hi CIG-MC,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">I don&#39;t understand global_div_norm2() in Global_operations.c in CitcomS.</font></div>

<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Why does the function divide by each element volume in the loop over caps and elements?</font></div><div><font face="arial, sans-serif"><br>

</font></div><div><font face="arial, sans-serif">temp += A[m][i] * A[m][i] / E-&gt;eco[m][i].area;</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Whereas, in other functions, such as global_p_norm2(), the expression is what I would expect:</font></div>

<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">temp += P[m][i] * P[m][i] * E-&gt;eco[m][i].area;</font></div><div><font face="arial, sans-serif"><br></font></div>
<div><font face="arial, sans-serif">In both cases, the sums are divided by the mesh volume to give a volumetric average.  Presumably assemble_div_u() in Element_calculations.c is computing the divergence for each element?</font></div>
<div><br></div><div><font face="arial, sans-serif">Thanks,</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Dan</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br>
</font></div><span style="font-family:arial,sans-serif;font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>+2008-10-29 23:22  tan2</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+       * lib/global_defs.h: (for r13196) Fixing convergence criterion for</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         Stokes solver.</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         * New functions global_v_norm2(), global_p_norm2(),</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         </span><span style="background-color:rgb(255,255,204);font-family:arial,sans-serif;font-size:13px">global_div_norm2</span><span style="font-family:arial,sans-serif;font-size:13px">() compute the L2 norm of velocity, pressure, and</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         divergence. * The L2 norm of the vector f is defined as:</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         \sum_{all elements} ( \int_{element} (f*f dA) ) / A where A is</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         the volume of the domain. * The convergence criterion is</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         controlled by parameter &quot;accuracy&quot; under</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         &quot;[CitcomS.solver.vsolver]&quot;. The iteration stops if</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         (norm(</span><span style="background-color:rgb(255,255,204);font-family:arial,sans-serif;font-size:13px">div</span><span style="font-family:arial,sans-serif;font-size:13px">(rho*V))/norm(V) &lt; accuracy) or ( (norm(dV)/norm(V) &lt;</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         accuracy) and (norm(dP)/norm(P) &lt; accuracy) for the last two</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         iterations ) * The default value of &quot;accuracy&quot; becomes 1e-4. *</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         The input parameters &quot;tole_compressibility&quot; and</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         &quot;relative_err_accuracy&quot; under &quot;[CitcomS.solver.vsolver]&quot; are</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">+         gone. * The mass matrix E-&gt;MASS becomes double precision (was</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+         single precision).</span><br>

</div>