[CIG-MC] computation of div/v in CitcomS

Shijie Zhong shijie.zhong at Colorado.EDU
Fri Mar 8 15:13:11 PST 2013


Eh did this change which I agree.

In "temp += A[m][i] * A[m][i] / E->eco[m][i].area;",

A[m][i] already had E->eco[m][i].area multiplied once, before global_div_norm2() call. 

Shijie


Shijie Zhong, Professor
Department of Physics
University of Colorado at Boulder
Boulder, CO 80309
Tel: 303-735-5095; Fax: 303-492-7935
Web: http://anquetil.colorado.edu/szhong
________________________________________
From: cig-mc-bounces at geodynamics.org [cig-mc-bounces at geodynamics.org] On Behalf Of Dan Bower [dan at caltech.edu]
Sent: Friday, March 08, 2013 3:06 PM
To: cig-mc at geodynamics.org
Subject: [CIG-MC] computation of div/v in CitcomS

Hi CIG-MC,

I don't understand global_div_norm2() in Global_operations.c in CitcomS.

Why does the function divide by each element volume in the loop over caps and elements?

temp += A[m][i] * A[m][i] / E->eco[m][i].area;

Whereas, in other functions, such as global_p_norm2(), the expression is what I would expect:

temp += P[m][i] * P[m][i] * E->eco[m][i].area;

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?

Thanks,

Dan



+2008-10-29 23:22  tan2
+
+       * lib/global_defs.h: (for r13196) Fixing convergence criterion for
+         Stokes solver.
+
+         * New functions global_v_norm2(), global_p_norm2(),
+         global_div_norm2() compute the L2 norm of velocity, pressure, and
+         divergence. * The L2 norm of the vector f is defined as:
+         \sum_{all elements} ( \int_{element} (f*f dA) ) / A where A is
+         the volume of the domain. * The convergence criterion is
+         controlled by parameter "accuracy" under
+         "[CitcomS.solver.vsolver]". The iteration stops if
+         (norm(div(rho*V))/norm(V) < accuracy) or ( (norm(dV)/norm(V) <
+         accuracy) and (norm(dP)/norm(P) < accuracy) for the last two
+         iterations ) * The default value of "accuracy" becomes 1e-4. *
+         The input parameters "tole_compressibility" and
+         "relative_err_accuracy" under "[CitcomS.solver.vsolver]" are
+         gone. * The mass matrix E->MASS becomes double precision (was
+         single precision).


More information about the CIG-MC mailing list