[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->Eqn_k1 as part of caps_per_proc_removal (a741535)

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


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

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

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

commit a74153545360dfbb3321786ef592aa05f52542b2
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Wed Sep 24 13:39:13 2014 -0700

    Changed the shape of E->Eqn_k1 as part of caps_per_proc_removal


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

a74153545360dfbb3321786ef592aa05f52542b2
 lib/Construct_arrays.c         | 12 ++++++------
 lib/Element_calculations.c     |  2 +-
 lib/General_matrix_functions.c |  2 +-
 lib/global_defs.h              |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/Construct_arrays.c b/lib/Construct_arrays.c
index 08ccaf8..e4726c1 100644
--- a/lib/Construct_arrays.c
+++ b/lib/Construct_arrays.c
@@ -289,7 +289,7 @@ void construct_node_maps(E)
                }
          }
 
-       E->Eqn_k1[lev][CPPR] = (higher_precision *)malloc(matrix*sizeof(higher_precision));
+       E->Eqn_k1[lev] = (higher_precision *)malloc(matrix*sizeof(higher_precision));
        E->Eqn_k2[lev][CPPR] = (higher_precision *)malloc(matrix*sizeof(higher_precision));
        E->Eqn_k3[lev][CPPR] = (higher_precision *)malloc(matrix*sizeof(higher_precision));
 
@@ -338,7 +338,7 @@ void construct_node_ks(E)
 	for(i=0;i<neq;i++)
 	    E->BI[level][i] = zero;
         for(i=0;i<E->mesh.matrix_size[level];i++) {
-            E->Eqn_k1[level][CPPR][i] = zero;
+            E->Eqn_k1[level][i] = zero;
             E->Eqn_k2[level][CPPR][i] = zero;
             E->Eqn_k3[level][CPPR][i] = zero;
             }
@@ -392,7 +392,7 @@ void construct_node_ks(E)
 
 		    assert(found /* direction 1 */);
 
-		    E->Eqn_k1[level][CPPR][loc0+index] +=  w1*ww1*elt_K[pp*lms+qq]; /* direction 1 */
+		    E->Eqn_k1[level][loc0+index] +=  w1*ww1*elt_K[pp*lms+qq]; /* direction 1 */
 		    E->Eqn_k2[level][CPPR][loc0+index] +=  w2*ww1*elt_K[(pp+1)*lms+qq]; /* direction 1 */
 		    E->Eqn_k3[level][CPPR][loc0+index] +=  w3*ww1*elt_K[(pp+2)*lms+qq]; /* direction 1 */
 
@@ -408,7 +408,7 @@ void construct_node_ks(E)
 
 		    assert(found /* direction 2 */);
 
-		    E->Eqn_k1[level][CPPR][loc0+index] += w1*ww2*elt_K[pp*lms+qq+1]; /* direction 1 */
+		    E->Eqn_k1[level][loc0+index] += w1*ww2*elt_K[pp*lms+qq+1]; /* direction 1 */
 		    E->Eqn_k2[level][CPPR][loc0+index] += w2*ww2*elt_K[(pp+1)*lms+qq+1]; /* direction 2 */
 		    E->Eqn_k3[level][CPPR][loc0+index] += w3*ww2*elt_K[(pp+2)*lms+qq+1]; /* direction 3 */
 
@@ -424,7 +424,7 @@ void construct_node_ks(E)
 
                     assert(found /* direction 3 */);
 
-		    E->Eqn_k1[level][CPPR][loc0+index] += w1*ww3*elt_K[pp*lms+qq+2]; /* direction 1 */
+		    E->Eqn_k1[level][loc0+index] += w1*ww3*elt_K[pp*lms+qq+2]; /* direction 1 */
         E->Eqn_k2[level][CPPR][loc0+index] += w2*ww3*elt_K[(pp+1)*lms+qq+2]; /* direction 2 */
 		    E->Eqn_k3[level][CPPR][loc0+index] += w3*ww3*elt_K[(pp+2)*lms+qq+2]; /* direction 3 */
 
@@ -470,7 +470,7 @@ void rebuild_BI_on_boundary(E)
             eqn3=E->ID[level][i].doff[3];
 
             C=E->Node_map[level] + (i-1)*max_eqn;
-            B1=E->Eqn_k1[level][CPPR]+(i-1)*max_eqn;
+            B1=E->Eqn_k1[level]+(i-1)*max_eqn;
             B2=E->Eqn_k2[level][CPPR]+(i-1)*max_eqn;
             B3=E->Eqn_k3[level][CPPR]+(i-1)*max_eqn;
 
diff --git a/lib/Element_calculations.c b/lib/Element_calculations.c
index 61a226a..e1fdd1b 100644
--- a/lib/Element_calculations.c
+++ b/lib/Element_calculations.c
@@ -536,7 +536,7 @@ void n_assemble_del2_u(E,u,Au,level,strip_bcs)
        U3 = u[eqn3];
 
        C=E->Node_map[level] + (e-1)*max_eqn;
-       B1=E->Eqn_k1[level][CPPR]+(e-1)*max_eqn;
+       B1=E->Eqn_k1[level]+(e-1)*max_eqn;
        B2=E->Eqn_k2[level][CPPR]+(e-1)*max_eqn;
        B3=E->Eqn_k3[level][CPPR]+(e-1)*max_eqn;
 
diff --git a/lib/General_matrix_functions.c b/lib/General_matrix_functions.c
index 9bc826c..d120068 100644
--- a/lib/General_matrix_functions.c
+++ b/lib/General_matrix_functions.c
@@ -484,7 +484,7 @@ void gauss_seidel(E,d0,F,Ad,acc,cycles,level,guess)
 	    eqn2=E->ID[level][i].doff[2];
 	    eqn3=E->ID[level][i].doff[3];
             C=E->Node_map[level]+(i-1)*max_eqn;
-	    B1=E->Eqn_k1[level][CPPR]+(i-1)*max_eqn;
+	    B1=E->Eqn_k1[level]+(i-1)*max_eqn;
 	    B2=E->Eqn_k2[level][CPPR]+(i-1)*max_eqn;
  	    B3=E->Eqn_k3[level][CPPR]+(i-1)*max_eqn;
 
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 8a12388..71429e0 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -819,7 +819,7 @@ struct All_variables {
     struct REF_STATE refstate;
 
 
-    higher_precision *Eqn_k1[MAX_LEVELS][NCS],*Eqn_k2[MAX_LEVELS][NCS],*Eqn_k3[MAX_LEVELS][NCS];
+    higher_precision *Eqn_k1[MAX_LEVELS],*Eqn_k2[MAX_LEVELS][NCS],*Eqn_k3[MAX_LEVELS][NCS];
     int *Node_map [MAX_LEVELS];
 
     double *BI[MAX_LEVELS],*BPI[MAX_LEVELS];



More information about the CIG-COMMITS mailing list