[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->ECO as part of caps_per_proc removal (97f02e4)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:12:14 PST 2014


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

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

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

commit 97f02e4856657ec21d5da567825c99234a5b14f8
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Tue Sep 23 16:57:24 2014 -0700

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


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

97f02e4856657ec21d5da567825c99234a5b14f8
 lib/Global_operations.c |  4 ++--
 lib/Instructions.c      |  4 ++--
 lib/Size_does_matter.c  | 18 +++++++++---------
 lib/global_defs.h       |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/Global_operations.c b/lib/Global_operations.c
index eab12da..8e1f0de 100644
--- a/lib/Global_operations.c
+++ b/lib/Global_operations.c
@@ -276,8 +276,8 @@ void return_elementwise_horiz_ave(E,X,H)
       for (j=1;j<=elx;j++)
       {
         el = i + (j-1)*elz + (k-1)*elx*elz;
-        temp[i] += X[CPPR][el]*E->ECO[E->mesh.levmax][CPPR][el].area;
-        temp[i+elz] += E->ECO[E->mesh.levmax][CPPR][el].area;
+        temp[i] += X[CPPR][el]*E->ECO[E->mesh.levmax][el].area;
+        temp[i+elz] += E->ECO[E->mesh.levmax][el].area;
       }
     }
   }
diff --git a/lib/Instructions.c b/lib/Instructions.c
index 7553e33..aa627c3 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -1033,7 +1033,7 @@ void allocate_common_vars(E)
     E->GDA[i] = (struct Shape_function_dA *)malloc((nel+1)*sizeof(struct Shape_function_dA));
 
     E->MASS[i]     = (double *) malloc((nno+1)*sizeof(double));
-    E->ECO[i][CPPR] = (struct COORD *) malloc((nno+2)*sizeof(struct COORD));
+    E->ECO[i] = (struct COORD *) malloc((nno+2)*sizeof(struct COORD));
 
     E->TWW[i][CPPR] = (struct FNODE *)   malloc((nel+2)*sizeof(struct FNODE));
 
@@ -1351,7 +1351,7 @@ void set_up_nonmg_aliases(struct All_variables *E)
 
   int i;
 
-  E->eco = E->ECO[E->mesh.levmax][CPPR];
+  E->eco = E->ECO[E->mesh.levmax];
   E->ien = E->IEN[E->mesh.levmax][CPPR];
   E->id = E->ID[E->mesh.levmax][CPPR];
   E->Vi = E->VI[E->mesh.levmax];
diff --git a/lib/Size_does_matter.c b/lib/Size_does_matter.c
index 7ab82c2..a0bf243 100644
--- a/lib/Size_does_matter.c
+++ b/lib/Size_does_matter.c
@@ -985,16 +985,16 @@ void mass_matrix(struct All_variables *E)
                 dx2 = myatan(centre[2],centre[1]);
 
                 /* center of this element in the spherical coordinate */
-                E->ECO[lev][CPPR][e].centre[1] = dx1;
-                E->ECO[lev][CPPR][e].centre[2] = dx2;
-                E->ECO[lev][CPPR][e].centre[3] = dx3;
+                E->ECO[lev][e].centre[1] = dx1;
+                E->ECO[lev][e].centre[2] = dx2;
+                E->ECO[lev][e].centre[3] = dx3;
 
                 /* delta(theta) of this element */
                 dx1 = max( fabs(E->SX[lev][1][n[3]]-E->SX[lev][1][n[1]]),
                            fabs(E->SX[lev][1][n[2]]-E->SX[lev][1][n[4]]) );
 
                 /* length of this element in the theta-direction */
-                E->ECO[lev][CPPR][e].size[1] = dx1*E->ECO[lev][CPPR][e].centre[3];
+                E->ECO[lev][e].size[1] = dx1*E->ECO[lev][e].centre[3];
 
                 /* delta(phi) of this element */
                 dx1 = fabs(E->SX[lev][2][n[3]]-E->SX[lev][2][n[1]]);
@@ -1010,8 +1010,8 @@ void mass_matrix(struct All_variables *E)
                 dx2 = max(dx1,dx2);
 
                 /* length of this element in the phi-direction */
-                E->ECO[lev][CPPR][e].size[2] = dx2*E->ECO[lev][CPPR][e].centre[3]
-                    *sin(E->ECO[lev][CPPR][e].centre[1]);
+                E->ECO[lev][e].size[2] = dx2*E->ECO[lev][e].centre[3]
+                    *sin(E->ECO[lev][e].centre[1]);
 
                 /* delta(radius) of this element */
                 dx3 = 0.25*(fabs(E->SX[lev][3][n[5]]+E->SX[lev][3][n[6]]
@@ -1020,12 +1020,12 @@ void mass_matrix(struct All_variables *E)
                                  -E->SX[lev][3][n[3]]-E->SX[lev][3][n[4]]));
 
                 /* length of this element in the radius-direction */
-                E->ECO[lev][CPPR][e].size[3] = dx3;
+                E->ECO[lev][e].size[3] = dx3;
 
                 /* volume (area in 2D) of this element */
                 for(nint=1;nint<=vpts;nint++)
                     area += g_point[nint].weight[E->mesh.nsd-1] * E->GDA[lev][e].vpt[nint];
-                E->ECO[lev][CPPR][e].area = area;
+                E->ECO[lev][e].area = area;
 
                 for(node=1;node<=enodes[E->mesh.nsd];node++)  {
                     temp[node] = 0.0;
@@ -1103,7 +1103,7 @@ void mass_matrix(struct All_variables *E)
             fprintf(E->fp_out,"output_mass lev=%d\n",lev);
                 fprintf(E->fp_out,"m=%d %d \n",E->sphere.capid[CPPR],m);
                 for(e=1;e<=E->lmesh.NEL[lev];e++)
-                    fprintf(E->fp_out,"%d %g \n",e,E->ECO[lev][CPPR][e].area);
+                    fprintf(E->fp_out,"%d %g \n",e,E->ECO[lev][e].area);
                 for (node=1;node<=E->lmesh.NNO[lev];node++)
                     fprintf(E->fp_out,"Mass[%d]= %g \n",node,E->MASS[lev][node]);
         }
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 38f8c88..35a8621 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -800,7 +800,7 @@ struct All_variables {
     struct IEN *ien;  /* global */
     struct SIEN *sien;
     struct ID *id;
-    struct COORD *ECO[MAX_LEVELS][NCS];
+    struct COORD *ECO[MAX_LEVELS];
     struct IEN *IEN[MAX_LEVELS][NCS]; /* global at each level */
     struct FNODE *TWW[MAX_LEVELS][NCS];	/* for nodal averages */
     struct ID *ID[MAX_LEVELS][NCS];



More information about the CIG-COMMITS mailing list