[cig-commits] r6544 - in mc/3D/CitcomS/branches/compressible: lib tests

tan2 at geodynamics.org tan2 at geodynamics.org
Tue Apr 10 16:43:48 PDT 2007


Author: tan2
Date: 2007-04-10 16:43:47 -0700 (Tue, 10 Apr 2007)
New Revision: 6544

Removed:
   mc/3D/CitcomS/branches/compressible/tests/asap.py
   mc/3D/CitcomS/branches/compressible/tests/hrothgar.py
Modified:
   mc/3D/CitcomS/branches/compressible/lib/Tracer_setup.c
Log:
Merging r6541-r6542 from trunk

Modified: mc/3D/CitcomS/branches/compressible/lib/Tracer_setup.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Tracer_setup.c	2007-04-10 22:46:37 UTC (rev 6543)
+++ mc/3D/CitcomS/branches/compressible/lib/Tracer_setup.c	2007-04-10 23:43:47 UTC (rev 6544)
@@ -682,23 +682,37 @@
 
     double x,y,z;
     double theta,phi,rad;
-    double dmin,dmax;
+    double xmin,xmax,ymin,ymax,zmin,zmax;
     double random1,random2,random3;
 
 
     allocate_tracer_arrays(E,j,tracers_cap);
 
+    /* Finding the min/max of the cartesian coordinates. */
+    /* One must loop over E->X to find the min/max, since the 8 corner */
+    /* nodes may not be the min/max. */
+    xmin = ymin = zmin = E->sphere.ro;
+    xmax = ymax = zmax = -E->sphere.ro;
+    for (kk=1; kk<=E->lmesh.nno; kk++) {
+        x = E->x[j][1][kk];
+        y = E->x[j][2][kk];
+        z = E->x[j][3][kk];
 
+        xmin = ((xmin < x) ? xmin : x);
+        xmax = ((xmax > x) ? xmax : x);
+        ymin = ((ymin < y) ? ymin : y);
+        ymax = ((ymax > y) ? ymax : y);
+        zmin = ((zmin < z) ? zmin : z);
+        zmax = ((zmax > z) ? zmax : z);
+    }
+
     /* Tracers are placed randomly in cap */
     /* (intentionally using rand() instead of srand() )*/
 
-    dmin=-1.0*E->sphere.ro;
-    dmax=E->sphere.ro;
-
     while (E->trace.ntracers[j]<tracers_cap) {
 
         number_of_tries++;
-        max_tries=500*tracers_cap;
+        max_tries=100*tracers_cap;
 
         if (number_of_tries>max_tries) {
             fprintf(E->trace.fpt,"Error(make_tracer_array)-too many tries?\n");
@@ -712,9 +726,9 @@
         random2=(1.0*rand())/(1.0*RAND_MAX);
         random3=(1.0*rand())/(1.0*RAND_MAX);
 
-        x=dmin+random1*(dmax-dmin);
-        y=dmin+random2*(dmax-dmin);
-        z=dmin+random3*(dmax-dmin);
+        x=xmin+random1*(xmax-xmin);
+        y=ymin+random2*(ymax-ymin);
+        z=zmin+random3*(zmax-zmin);
 
         /* first check if within shell */
 

Deleted: mc/3D/CitcomS/branches/compressible/tests/asap.py
===================================================================
--- mc/3D/CitcomS/branches/compressible/tests/asap.py	2007-04-10 22:46:37 UTC (rev 6543)
+++ mc/3D/CitcomS/branches/compressible/tests/asap.py	2007-04-10 23:43:47 UTC (rev 6544)
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-#<LicenseText>
-#
-# CitcomS.py by Eh Tan, Eun-seo Choi, and Pururav Thoutireddy.
-# Copyright (C) 2002-2005, California Institute of Technology.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-#</LicenseText>
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-import journal
-
-
-# the required component factory
-def staging():
-
-    info = journal.debug("staging")
-    info.log("instantiating application launcher")
-
-    from mpi.StagingMPICH import StagingMPICH
-    stager = StagingMPICH()
-    
-    # initialize using the local default values
-    props = stager.properties
-    props.nodes = 4
-    props.nodegen = "a%03d"
-    props.nodelist = "[51-60]"
-
-    # return the component
-    return stager
-
-
-# version
-__id__ = "$Id$"
-
-# End of file 

Deleted: mc/3D/CitcomS/branches/compressible/tests/hrothgar.py
===================================================================
--- mc/3D/CitcomS/branches/compressible/tests/hrothgar.py	2007-04-10 22:46:37 UTC (rev 6543)
+++ mc/3D/CitcomS/branches/compressible/tests/hrothgar.py	2007-04-10 23:43:47 UTC (rev 6544)
@@ -1,51 +0,0 @@
-#!/usr/bin/env python
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-#<LicenseText>
-#
-# CitcomS.py by Eh Tan, Eun-seo Choi, and Pururav Thoutireddy.
-# Copyright (C) 2002-2005, California Institute of Technology.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-#</LicenseText>
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-import journal
-
-
-# the required component factory
-def staging():
-
-    info = journal.debug("staging")
-    info.log("instantiating application launcher")
-
-    from mpi.LauncherMPICH import LauncherMPICH
-    stager = LauncherMPICH()
-
-    # initialize using the local values
-    stager.inventory.nodegen = "n%03d"
-    stager.inventory.nodes = 12
-    stager.inventory.nodelist = [101,102,103,104,105,106]
-    return stager
-
-
-# version
-# $Id$
-
-# End of file



More information about the cig-commits mailing list