[cig-commits] r11290 - in mc/3D/CitcomS/branches/v3.0: . lib
tan2 at geodynamics.org
tan2 at geodynamics.org
Thu Feb 28 12:53:10 PST 2008
Author: tan2
Date: 2008-02-28 12:53:10 -0800 (Thu, 28 Feb 2008)
New Revision: 11290
Modified:
mc/3D/CitcomS/branches/v3.0/
mc/3D/CitcomS/branches/v3.0/lib/Composition_related.c
Log:
Merged revisions 11280 via svnmerge from
svn+ssh://svn@geodynamics.org/cig/mc/3D/CitcomS/trunk
........
r11280 | tan2 | 2008-02-27 17:03:50 -0800 (Wed, 27 Feb 2008) | 4 lines
Removed artificial tolerance of empty elements. This greatly decreases the minimal number of tracers per element required for a given mesh.
This fixed issue140.
........
Property changes on: mc/3D/CitcomS/branches/v3.0
___________________________________________________________________
Name: svnmerge-blocked
- /mc/3D/CitcomS/trunk:8275,8960-8963,8973,8976,9020,9024,9058-9060,9062,9078-9079,9081,9086,9110,9112,9222-9224,9268-9272,11177,11214-11218
+ /mc/3D/CitcomS/trunk:8275,8960-8963,8973,8976,9020,9024,9058-9060,9062,9078-9079,9081,9086,9110,9112,9222-9224,9268-9272,11177,11214-11218,11220-11222,11268,11279
Name: svnmerge-integrated
- /mc/3D/CitcomS/trunk:1-8274,8276-8280,8893,9216,11219
+ /mc/3D/CitcomS/trunk:1-8274,8276-8280,8893,9216,11219,11280
Modified: mc/3D/CitcomS/branches/v3.0/lib/Composition_related.c
===================================================================
--- mc/3D/CitcomS/branches/v3.0/lib/Composition_related.c 2008-02-28 20:51:07 UTC (rev 11289)
+++ mc/3D/CitcomS/branches/v3.0/lib/Composition_related.c 2008-02-28 20:53:10 UTC (rev 11290)
@@ -231,13 +231,30 @@
void init_composition(struct All_variables *E)
{
- if (E->composition.ichemical_buoyancy &&
- E->composition.ibuoy_type) {
- fill_composition(E);
+ /* XXX: Currently, only the ratio method works here. */
+ /* Will have to come back here to include the absolute method. */
+
+ /* ratio method */
+ if (E->composition.ibuoy_type==1) {
+ compute_elemental_composition_ratio_method(E);
+ }
+
+ /* absolute method */
+ if (E->composition.ibuoy_type!=1) {
+ fprintf(E->trace.fpt,"Error(compute...)-only ratio method now\n");
+ fflush(E->trace.fpt);
+ exit(10);
+ }
+
+ /* for empty elements */
check_initial_composition(E);
+
+ /* Map elemental composition to nodal points */
+ map_composition_to_nodes(E);
+
init_bulk_composition(E);
- }
- return;
+
+ return;
}
@@ -246,16 +263,9 @@
/* check empty element if using ratio method */
if (E->composition.ibuoy_type == 1) {
if (E->trace.istat_iempty) {
- fprintf(E->trace.fpt,"WARNING(check_initial_composition)-number of tracers is REALLY LOW, %d elements contain no tracer\n", E->trace.istat_iempty);
-
- /* if there are only a few empty elements, using neighboring */
- /* elements to determine the initial composition. */
- if ((1e4*E->trace.istat_iempty) < E->lmesh.nel)
- fill_composition_from_neighbors(E);
- else if (E->trace.itracer_warnings) {
- fflush(E->trace.fpt);
- exit(10);
- }
+ /* using the composition of neighboring elements to determine
+ the initial composition of empty elements. */
+ fill_composition_from_neighbors(E);
}
}
@@ -399,6 +409,8 @@
int nghbrs[n_nghbrs];
int *is_empty;
+ fprintf(E->trace.fpt,"WARNING(check_initial_composition)-number of tracers is low, %d elements contain no tracer initially\n", E->trace.istat_iempty);
+
fprintf(E->trace.fpt,"Using neighboring elements for initial composition...\n");
/* index shift for neighboring elements in horizontal direction */
More information about the cig-commits
mailing list