<div dir="ltr">OK - thanks Shijie. In that case, I'll divide the output of assemble_div_u() by the volume of each element to give me the divergence for each element.<div><br></div><div style>Thanks,</div><div style><br>
</div><div style>Dan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 8, 2013 at 3:13 PM, Shijie Zhong <span dir="ltr"><<a href="mailto:shijie.zhong@colorado.edu" target="_blank">shijie.zhong@colorado.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Eh did this change which I agree.<br>
<br>
In "temp += A[m][i] * A[m][i] / E->eco[m][i].area;",<br>
<br>
A[m][i] already had E->eco[m][i].area multiplied once, before global_div_norm2() call.<br>
<br>
Shijie<br>
<br>
<br>
Shijie Zhong, Professor<br>
Department of Physics<br>
University of Colorado at Boulder<br>
Boulder, CO 80309<br>
Tel: <a href="tel:303-735-5095" value="+13037355095">303-735-5095</a>; Fax: <a href="tel:303-492-7935" value="+13034927935">303-492-7935</a><br>
Web: <a href="http://anquetil.colorado.edu/szhong" target="_blank">http://anquetil.colorado.edu/szhong</a><br>
________________________________________<br>
From: <a href="mailto:cig-mc-bounces@geodynamics.org">cig-mc-bounces@geodynamics.org</a> [<a href="mailto:cig-mc-bounces@geodynamics.org">cig-mc-bounces@geodynamics.org</a>] On Behalf Of Dan Bower [<a href="mailto:dan@caltech.edu">dan@caltech.edu</a>]<br>
Sent: Friday, March 08, 2013 3:06 PM<br>
To: <a href="mailto:cig-mc@geodynamics.org">cig-mc@geodynamics.org</a><br>
Subject: [CIG-MC] computation of div/v in CitcomS<br>
<div><div class="h5"><br>
Hi CIG-MC,<br>
<br>
I don't understand global_div_norm2() in Global_operations.c in CitcomS.<br>
<br>
Why does the function divide by each element volume in the loop over caps and elements?<br>
<br>
temp += A[m][i] * A[m][i] / E->eco[m][i].area;<br>
<br>
Whereas, in other functions, such as global_p_norm2(), the expression is what I would expect:<br>
<br>
temp += P[m][i] * P[m][i] * E->eco[m][i].area;<br>
<br>
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?<br>
<br>
Thanks,<br>
<br>
Dan<br>
<br>
<br>
<br>
+2008-10-29 23:22 tan2<br>
+<br>
+ * lib/global_defs.h: (for r13196) Fixing convergence criterion for<br>
+ Stokes solver.<br>
+<br>
+ * New functions global_v_norm2(), global_p_norm2(),<br>
+ global_div_norm2() compute the L2 norm of velocity, pressure, and<br>
+ divergence. * The L2 norm of the vector f is defined as:<br>
+ \sum_{all elements} ( \int_{element} (f*f dA) ) / A where A is<br>
+ the volume of the domain. * The convergence criterion is<br>
+ controlled by parameter "accuracy" under<br>
+ "[CitcomS.solver.vsolver]". The iteration stops if<br>
+ (norm(div(rho*V))/norm(V) < accuracy) or ( (norm(dV)/norm(V) <<br>
+ accuracy) and (norm(dP)/norm(P) < accuracy) for the last two<br>
+ iterations ) * The default value of "accuracy" becomes 1e-4. *<br>
+ The input parameters "tole_compressibility" and<br>
+ "relative_err_accuracy" under "[CitcomS.solver.vsolver]" are<br>
+ gone. * The mass matrix E->MASS becomes double precision (was<br>
+ single precision).<br>
</div></div>_______________________________________________<br>
CIG-MC mailing list<br>
<a href="mailto:CIG-MC@geodynamics.org">CIG-MC@geodynamics.org</a><br>
<a href="http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc" target="_blank">http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc</a><br>
</blockquote></div><br></div>