[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->VIP as part of caps_per_proc removal (39f883b)

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


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

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

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

commit 39f883bfdd870bea55c7f2329504e54b341a7356
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Tue Sep 23 14:27:51 2014 -0700

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


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

39f883bfdd870bea55c7f2329504e54b341a7356
 lib/Full_read_input_from_files.c     |  2 +-
 lib/Instructions.c                   |  4 ++--
 lib/Output.c                         |  2 +-
 lib/Output_gzdir.c                   |  2 +-
 lib/Regional_read_input_from_files.c |  4 ++--
 lib/Viscosity_structures.c           | 22 +++++++++++-----------
 lib/global_defs.h                    |  2 +-
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/lib/Full_read_input_from_files.c b/lib/Full_read_input_from_files.c
index aaf4d97..9703ab7 100644
--- a/lib/Full_read_input_from_files.c
+++ b/lib/Full_read_input_from_files.c
@@ -346,7 +346,7 @@ void full_read_input_files_for_timesteps(E,action,output)
                   el = j + (i-1)*E->lmesh.elz + (k-1)*E->lmesh.elz*E->lmesh.elx;
                   elg = E->lmesh.ezs+j + (E->lmesh.exs+i-1)*E->mesh.elz + (E->lmesh.eys+k-1)*E->mesh.elz*E->mesh.elx;
 
-                  E->VIP[CPPR][el] = VIP1[elg]+(VIP2[elg]-VIP1[elg])/(newage2-newage1)*(age-newage1);
+                  E->VIP[el] = VIP1[elg]+(VIP2[elg]-VIP1[elg])/(newage2-newage1)*(age-newage1);
                   /* E->mat[m][el] = LL1[elg]; */ /*get material numbers from radius internally */
 
                 }     /* end for j  */
diff --git a/lib/Instructions.c b/lib/Instructions.c
index d94a64e..6d36d15 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -973,7 +973,7 @@ void allocate_common_vars(E)
   E->slice.freesurf    = (float *)malloc((nsf+2)*sizeof(float));
 
   E->mat = (int *) malloc((nel+2)*sizeof(int));
-  E->VIP[CPPR] = (float *) malloc((nel+2)*sizeof(float));
+  E->VIP = (float *) malloc((nel+2)*sizeof(float));
 
   E->heating_adi    = (double *) malloc((nel+1)*sizeof(double));
   E->heating_visc   = (double *) malloc((nel+1)*sizeof(double));
@@ -1134,7 +1134,7 @@ void allocate_common_vars(E)
 
   for(i=1;i<=E->lmesh.nel;i++)   {
       E->mat[i]=1;
-      E->VIP[CPPR][i]=1.0;
+      E->VIP[i]=1.0;
 
       E->heating_adi[i] = 0;
       E->heating_visc[i] = 0;
diff --git a/lib/Output.c b/lib/Output.c
index d9dd8cf..344e816 100644
--- a/lib/Output.c
+++ b/lib/Output.c
@@ -595,7 +595,7 @@ void output_mat(struct All_variables *E)
   fp = output_open(output_file, "w");
 
     for(el=1;el<=E->lmesh.nel;el++)
-      fprintf(fp,"%d %d %f\n", el,E->mat[el],E->VIP[CPPR][el]);
+      fprintf(fp,"%d %d %f\n", el,E->mat[el],E->VIP[el]);
 
   fclose(fp);
 }
diff --git a/lib/Output_gzdir.c b/lib/Output_gzdir.c
index 617250f..60d9e39 100644
--- a/lib/Output_gzdir.c
+++ b/lib/Output_gzdir.c
@@ -974,7 +974,7 @@ void gzdir_output_mat(struct All_variables *E)
   fp = gzdir_output_open(output_file,"w");
 
   for(el=1;el<=E->lmesh.nel;el++)
-    gzprintf(fp,"%d %d %f\n", el,E->mat[el],E->VIP[CPPR][el]);
+    gzprintf(fp,"%d %d %f\n", el,E->mat[el],E->VIP[el]);
 
   gzclose(fp);
 
diff --git a/lib/Regional_read_input_from_files.c b/lib/Regional_read_input_from_files.c
index e90ef45..793bedd 100644
--- a/lib/Regional_read_input_from_files.c
+++ b/lib/Regional_read_input_from_files.c
@@ -353,10 +353,10 @@ void regional_read_input_files_for_timesteps(E,action,output)
                 el = j + (i-1)*E->lmesh.elz + (k-1)*E->lmesh.elz*E->lmesh.elx;
                 elg = E->lmesh.ezs+j + (E->lmesh.exs+i-1)*E->mesh.elz + (E->lmesh.eys+k-1)*E->mesh.elz*E->mesh.elx;
                 if (pos_age) { /* positive ages - we must interpolate */
-                    E->VIP[CPPR][el] = VIP1[elg]+(VIP2[elg]-VIP1[elg])/(newage2-newage1)*(age-newage1);
+                    E->VIP[el] = VIP1[elg]+(VIP2[elg]-VIP1[elg])/(newage2-newage1)*(age-newage1);
                 }
                 else { /* negative ages - don't do the interpolation */
-                    E->VIP[CPPR][el] = VIP1[elg];
+                    E->VIP[el] = VIP1[elg];
                 }
 
                 /* E->mat[1][el] = LL1[elg]; */ /*use the mat numbers base on radius*/
diff --git a/lib/Viscosity_structures.c b/lib/Viscosity_structures.c
index 6d454d7..bd342ec 100644
--- a/lib/Viscosity_structures.c
+++ b/lib/Viscosity_structures.c
@@ -406,7 +406,7 @@ void visc_from_mat(E,EEta)
     if(E->control.mat_control){	/* use pre-factor even without temperature dependent viscosity */
         for(i=1;i<=E->lmesh.nel;i++)
 	  for(jj=1;jj<=vpoints[E->mesh.nsd];jj++)
-	    EEta[ (i-1)*vpoints[E->mesh.nsd]+jj ] = E->viscosity.N0[E->mat[i]-1]*E->VIP[CPPR][i];
+	    EEta[ (i-1)*vpoints[E->mesh.nsd]+jj ] = E->viscosity.N0[E->mat[i]-1]*E->VIP[i];
      }else{
         for(i=1;i<=E->lmesh.nel;i++)
 	  for(jj=1;jj<=vpoints[E->mesh.nsd];jj++)
@@ -486,7 +486,7 @@ void visc_from_T(E,EEta,propogate)
                 if(E->control.mat_control==0)
                     tempa = E->viscosity.N0[l];
                 else 
-                    tempa = E->viscosity.N0[l]*E->VIP[CPPR][i];
+                    tempa = E->viscosity.N0[l]*E->VIP[i];
 
                 for(kk=1;kk<=ends;kk++) {
                     TT[kk] = E->T[E->ien[i].node[kk]];
@@ -513,7 +513,7 @@ void visc_from_T(E,EEta,propogate)
                 if(E->control.mat_control==0)
                     tempa = E->viscosity.N0[l];
                 else 
-                    tempa = E->viscosity.N0[l]*E->VIP[CPPR][i];
+                    tempa = E->viscosity.N0[l]*E->VIP[i];
 
                 for(kk=1;kk<=ends;kk++) {
                     TT[kk] = E->T[E->ien[i].node[kk]];
@@ -541,7 +541,7 @@ void visc_from_T(E,EEta,propogate)
             for(i=1;i<=nel;i++)   {
                 l = E->mat[i] - 1;
 		if(E->control.mat_control) /* switch moved up here TWB */
-		  tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+		  tempa = E->viscosity.N0[l] * E->VIP[i];
 		else
 		  tempa = E->viscosity.N0[l];
 
@@ -570,7 +570,7 @@ void visc_from_T(E,EEta,propogate)
             for(i=1;i<=nel;i++)   {
                 l = E->mat[i] - 1;
 		if(E->control.mat_control) /* moved this up here TWB */
-		  tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+		  tempa = E->viscosity.N0[l] * E->VIP[i];
 		else
 		  tempa = E->viscosity.N0[l];
 
@@ -633,7 +633,7 @@ void visc_from_T(E,EEta,propogate)
                            if(visc2 < E->viscosity.min_value)
                                visc2 = E->viscosity.min_value;
                          }
-                       EEta[ (i-1)*vpts + jj ] = E->VIP[CPPR][i]*visc2;
+                       EEta[ (i-1)*vpts + jj ] = E->VIP[i]*visc2;
                       }
 
                 }
@@ -651,7 +651,7 @@ void visc_from_T(E,EEta,propogate)
 	    l = E->mat[i] - 1;
 
 	    if(E->control.mat_control)
-	      tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+	      tempa = E->viscosity.N0[l] * E->VIP[i];
 	    else
 	      tempa = E->viscosity.N0[l];
 
@@ -706,7 +706,7 @@ void visc_from_T(E,EEta,propogate)
 	      l = E->mat[i] - 1;
 
 		if(E->control.mat_control)
-		  tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+		  tempa = E->viscosity.N0[l] * E->VIP[i];
 		else
 		  tempa = E->viscosity.N0[l];
 
@@ -754,7 +754,7 @@ void visc_from_T(E,EEta,propogate)
             for(i=1;i<=nel;i++)   {
                 l = E->mat[i] - 1;
 		if(E->control.mat_control) 
-		  tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+		  tempa = E->viscosity.N0[l] * E->VIP[i];
 		else
 		  tempa = E->viscosity.N0[l];
 
@@ -791,7 +791,7 @@ void visc_from_T(E,EEta,propogate)
             for(i=1;i<=nel;i++)   {
                 l = E->mat[i] - 1;
 		if(E->control.mat_control) /* switch moved up here TWB */
-		  tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+		  tempa = E->viscosity.N0[l] * E->VIP[i];
 		else
 		  tempa = E->viscosity.N0[l];
                 for(kk=1;kk<=ends;kk++) 
@@ -822,7 +822,7 @@ void visc_from_T(E,EEta,propogate)
             for(i=1;i<=nel;i++)   {
                 l = E->mat[i] - 1;
 		if(E->control.mat_control) 
-		  tempa = E->viscosity.N0[l] * E->VIP[CPPR][i];
+		  tempa = E->viscosity.N0[l] * E->VIP[i];
 		else
 		  tempa = E->viscosity.N0[l];
 
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 1a8a662..56d1aba 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -862,7 +862,7 @@ struct All_variables {
     int *zero_resid[MAX_LEVELS][NCS];
     int *surf_element,*surf_node;
     int *mat;
-    float *VIP[NCS];
+    float *VIP;
     unsigned int *NODE[MAX_LEVELS][NCS];
     unsigned int *node;
 



More information about the CIG-COMMITS mailing list