[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->surf_node as part of caps_per_proc removal (100f88b)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:11:39 PST 2014


Repository : https://github.com/geodynamics/citcoms

On branch  : rajesh-petsc-schur
Link       : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd

>---------------------------------------------------------------

commit 100f88b61bd36c29e3d0a1aa251a93c11ed3af03
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Tue Sep 23 14:11:14 2014 -0700

    Changed the shape of E->surf_node as part of caps_per_proc removal


>---------------------------------------------------------------

100f88b61bd36c29e3d0a1aa251a93c11ed3af03
 lib/Construct_arrays.c | 2 +-
 lib/Instructions.c     | 2 +-
 lib/Process_buoyancy.c | 6 +++---
 lib/Topo_gravity.c     | 4 ++--
 lib/global_defs.h      | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/Construct_arrays.c b/lib/Construct_arrays.c
index 29bb540..02333c6 100644
--- a/lib/Construct_arrays.c
+++ b/lib/Construct_arrays.c
@@ -112,7 +112,7 @@ void construct_surface( struct All_variables *E)
 
     E->lmesh.snel = e;
     for (i=1;i<=E->lmesh.nsf;i++)
-      E->surf_node[CPPR][i] = i*E->lmesh.noz;
+      E->surf_node[i] = i*E->lmesh.noz;
 
 
   if(E->control.verbose) {
diff --git a/lib/Instructions.c b/lib/Instructions.c
index c5e8095..72a28a3 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -990,7 +990,7 @@ void allocate_common_vars(E)
 
   E->sien         = (struct SIEN *) malloc((nxyz+2)*sizeof(struct SIEN));
   E->surf_element = (int *) malloc((nxyz+2)*sizeof(int));
-  E->surf_node[CPPR]    = (int *) malloc((nsf+2)*sizeof(int));
+  E->surf_node    = (int *) malloc((nsf+2)*sizeof(int));
 
 
   /* density field */
diff --git a/lib/Process_buoyancy.c b/lib/Process_buoyancy.c
index 87a2bd7..1f54082 100644
--- a/lib/Process_buoyancy.c
+++ b/lib/Process_buoyancy.c
@@ -120,12 +120,12 @@ void heat_flux(E)
 
   if (E->parallel.me_loc[3]==E->parallel.nprocz-1)
     for(i=1;i<=E->lmesh.nsf;i++)
-      E->slice.shflux[i]=2*flux[E->surf_node[CPPR][i]]-flux[E->surf_node[CPPR][i]-1];
+      E->slice.shflux[i]=2*flux[E->surf_node[i]]-flux[E->surf_node[i]-1];
 
   if (E->parallel.me_loc[3]==0)
     for(i=1;i<=E->lmesh.nsf;i++)
-      E->slice.bhflux[i] = 2*flux[E->surf_node[CPPR][i]-E->lmesh.noz+1]
-                              - flux[E->surf_node[CPPR][i]-E->lmesh.noz+2];
+      E->slice.bhflux[i] = 2*flux[E->surf_node[i]-E->lmesh.noz+1]
+                              - flux[E->surf_node[i]-E->lmesh.noz+2];
 
     for(e=1;e<=E->lmesh.snel;e++) {
          uT =(E->slice.shflux[E->sien[e].node[1]] +
diff --git a/lib/Topo_gravity.c b/lib/Topo_gravity.c
index e72b212..ab89f4f 100644
--- a/lib/Topo_gravity.c
+++ b/lib/Topo_gravity.c
@@ -92,7 +92,7 @@ void get_STD_topo(E,tpg,tpgb,divg,vort,ii)
    topo_scaling1 = topo_scaling2 = 1.0;
 
      for(snode=1;snode<=E->lmesh.nsf;snode++)   {
-        node = E->surf_node[CPPR][snode];
+        node = E->surf_node[snode];
         tpg[snode]  = -2*SZZ[node]               + SZZ[node-1];
         tpgb[snode] =  2*SZZ[node-E->lmesh.noz+1]- SZZ[node-E->lmesh.noz+2];
 
@@ -112,7 +112,7 @@ void get_STD_freesurf(struct All_variables *E,float *freesurf)
 
         if (E->parallel.me_loc[3]==E->parallel.nprocz-1)
           for(snode=1;snode<=E->lmesh.nsf;snode++) {
-            node = E->surf_node[CPPR][snode];
+            node = E->surf_node[snode];
             freesurf[snode] += E->sphere.cap[CPPR].V[3][node]*E->advection.timestep;
           }
 }
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 162cd36..748696c 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -860,7 +860,7 @@ struct All_variables {
 
     int num_zero_resid[MAX_LEVELS][NCS];
     int *zero_resid[MAX_LEVELS][NCS];
-    int *surf_element,*surf_node[NCS];
+    int *surf_element,*surf_node;
     int *mat[NCS];
     float *VIP[NCS];
     unsigned int *NODE[MAX_LEVELS][NCS];



More information about the CIG-COMMITS mailing list