[cig-commits] r19370 - in mc/3D/CitcomS/branches/v3.1: lib visual
tan2 at geodynamics.org
tan2 at geodynamics.org
Mon Jan 16 13:16:30 PST 2012
Author: tan2
Date: 2012-01-16 13:16:30 -0800 (Mon, 16 Jan 2012)
New Revision: 19370
Modified:
mc/3D/CitcomS/branches/v3.1/lib/Element_calculations.c
mc/3D/CitcomS/branches/v3.1/lib/Full_tracer_advection.c
mc/3D/CitcomS/branches/v3.1/lib/Tracer_setup.c
mc/3D/CitcomS/branches/v3.1/visual/batchcombine.py
Log:
Merged r15700, r15742, and r16012 from trunk to v3.1 branch
Modified: mc/3D/CitcomS/branches/v3.1/lib/Element_calculations.c
===================================================================
--- mc/3D/CitcomS/branches/v3.1/lib/Element_calculations.c 2012-01-16 20:39:04 UTC (rev 19369)
+++ mc/3D/CitcomS/branches/v3.1/lib/Element_calculations.c 2012-01-16 21:16:30 UTC (rev 19370)
@@ -142,6 +142,7 @@
void get_elt_f();
void get_elt_tr_pseudo_surf();
void strip_bcs_from_residual();
+ double global_vdot();
const int neq=E->lmesh.neq;
const int nel=E->lmesh.nel;
@@ -173,6 +174,17 @@
(E->solver.exchange_id_d)(E, E->F, lev);
strip_bcs_from_residual(E,E->F,lev);
+
+ /* compute the norm of E->F */
+ E->monitor.fdotf = sqrt(global_vdot(E, E->F, E->F, lev));
+
+ if(E->parallel.me==0) {
+ fprintf(stderr, "Momentum equation force %.9e\n",
+ E->monitor.fdotf);
+ fprintf(E->fp, "Momentum equation force %.9e\n",
+ E->monitor.fdotf);
+ }
+
return;
}
Modified: mc/3D/CitcomS/branches/v3.1/lib/Full_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/branches/v3.1/lib/Full_tracer_advection.c 2012-01-16 20:39:04 UTC (rev 19369)
+++ mc/3D/CitcomS/branches/v3.1/lib/Full_tracer_advection.c 2012-01-16 21:16:30 UTC (rev 19370)
@@ -2551,6 +2551,7 @@
/* */
/* This function returns the the real element for a given point. */
/* Returns -99 if not in this cap. */
+/* Returns -1 if in this cap but cannot find the element. */
/* iprevious_element, if known, is the last known element. If */
/* it is not known, input a negative number. */
@@ -2740,7 +2741,7 @@
fprintf(E->trace.fpt,"x,y,z,theta,phi,iregel %.15e %.15e %.15e %.15e %.15e %d\n",
x,y,z,theta,phi,iregel);
fflush(E->trace.fpt);
- exit(10);
+ return -1;
foundit:
Modified: mc/3D/CitcomS/branches/v3.1/lib/Tracer_setup.c
===================================================================
--- mc/3D/CitcomS/branches/v3.1/lib/Tracer_setup.c 2012-01-16 20:39:04 UTC (rev 19369)
+++ mc/3D/CitcomS/branches/v3.1/lib/Tracer_setup.c 2012-01-16 21:16:30 UTC (rev 19370)
@@ -605,10 +605,21 @@
E->trace.ielement[j][it]=iel;
- if (iel<0) {
+ if (iel == -99) {
+ /* tracer is inside other processors */
put_away_later(E,j,it);
eject_tracer(E,j,it);
it--;
+ } else if (iel == -1) {
+ /* tracer is inside this processor,
+ * but cannot find its element.
+ * Throw away the tracer. */
+
+ if (E->trace.itracer_warnings) exit(10);
+
+
+ eject_tracer(E,j,it);
+ it--;
}
} /* end tracers */
Modified: mc/3D/CitcomS/branches/v3.1/visual/batchcombine.py
===================================================================
--- mc/3D/CitcomS/branches/v3.1/visual/batchcombine.py 2012-01-16 20:39:04 UTC (rev 19369)
+++ mc/3D/CitcomS/branches/v3.1/visual/batchcombine.py 2012-01-16 21:16:30 UTC (rev 19370)
@@ -81,7 +81,7 @@
cwd = os.getcwd()
for rank, node in enumerate(nodes):
- if node == 'localhost' or node == hostname:
+ if node == 'localhost' or node == '-' or node == hostname:
# local paste
import pasteCitcomData
pasteCitcomData.run(datadir, datafile, fields, rank, timestep, cwd)
More information about the CIG-COMMITS
mailing list