<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'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->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->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 "accuracy" under</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">+ "[CitcomS.solver.vsolver]". 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) < accuracy) or ( (norm(dV)/norm(V) <</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) < 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 "accuracy" 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 "tole_compressibility" and</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">+ "relative_err_accuracy" under "[CitcomS.solver.vsolver]" 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->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>