[cig-commits] r14528 - seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/3D/citcoms_isotropic_no_crust

tan2 at geodynamics.org tan2 at geodynamics.org
Sun Mar 29 13:21:14 PDT 2009


Author: tan2
Date: 2009-03-29 13:21:14 -0700 (Sun, 29 Mar 2009)
New Revision: 14528

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/3D/citcoms_isotropic_no_crust/read_citcoms_data.c
Log:
bug fixes for locating elements

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/3D/citcoms_isotropic_no_crust/read_citcoms_data.c
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/3D/citcoms_isotropic_no_crust/read_citcoms_data.c	2009-03-29 11:43:31 UTC (rev 14527)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/3D/citcoms_isotropic_no_crust/read_citcoms_data.c	2009-03-29 20:21:14 UTC (rev 14528)
@@ -758,7 +758,7 @@
 
     /* return value: 0 to (noz-1) */
     for(i=1; i<noz; i++) {
-        if(r2 < model->rsqr[i])
+        if(r2 <= model->rsqr[i])
             return i - 1;
     }
 
@@ -918,7 +918,7 @@
     /* eta2 axis is the radial direction, easy to define shape functions */
     /* diagram: r1----r---r0  */
 
-    nz = elem % (nox - 1);
+    nz = elem % (noz - 1);
 
     r1 = sqrt(model->rsqr[nz+1]);
     r0 = sqrt(model->rsqr[nz]);
@@ -1249,7 +1249,7 @@
     if(*hint_domain >= 0) {
         dom = &domains[*hint_domain];
 
-        nz = elem % (noz - 1);
+        nz = *hint_elem % (noz - 1);
         if(nz == find_layer(dom->model, x, y, z) &&
            is_inside_column(dom->model, x, y, z, *hint_elem)) {
             /* search is successful */



More information about the CIG-COMMITS mailing list