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

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


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

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

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

commit c233944615e15296ed03fb4150e3b5619c7990ef
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Tue Sep 23 18:05:54 2014 -0700

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


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

c233944615e15296ed03fb4150e3b5619c7990ef
 lib/Construct_arrays.c     | 2 +-
 lib/Element_calculations.c | 6 +++---
 lib/Instructions.c         | 2 +-
 lib/Petsc_citcoms.c        | 6 +++---
 lib/global_defs.h          | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/Construct_arrays.c b/lib/Construct_arrays.c
index 34c6849..974ac67 100644
--- a/lib/Construct_arrays.c
+++ b/lib/Construct_arrays.c
@@ -670,7 +670,7 @@ void construct_elt_cs(struct All_variables *E)
 
     for(lev=E->mesh.gridmin;lev<=E->mesh.gridmax;lev++)
             for(el=1;el<=E->lmesh.NEL[lev];el++) {
-                get_elt_c(E,el,E->elt_c[lev][CPPR][el].c,lev);
+                get_elt_c(E,el,E->elt_c[lev][el].c,lev);
             }
 }
 
diff --git a/lib/Element_calculations.c b/lib/Element_calculations.c
index f77db72..6447ea5 100644
--- a/lib/Element_calculations.c
+++ b/lib/Element_calculations.c
@@ -642,9 +642,9 @@ void assemble_c_u(struct All_variables *E,
                 j2= E->ID[level][b].doff[2];
                 j3= E->ID[level][b].doff[3];
 
-                result[e] += E->elt_c[level][CPPR][e+1].c[p  ][0] * U[j1]
-                              + E->elt_c[level][CPPR][e+1].c[p+1][0] * U[j2]
-                              + E->elt_c[level][CPPR][e+1].c[p+2][0] * U[j3];
+                result[e] += E->elt_c[level][e+1].c[p  ][0] * U[j1]
+                              + E->elt_c[level][e+1].c[p+1][0] * U[j2]
+                              + E->elt_c[level][e+1].c[p+2][0] * U[j3];
             }
         }
 }
diff --git a/lib/Instructions.c b/lib/Instructions.c
index 2327255..491ccae 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -1068,7 +1068,7 @@ void allocate_common_vars(E)
     E->elt_del[i] = (struct EG *) malloc((nel+1)*sizeof(struct EG));
 
     if(E->control.inv_gruneisen != 0)
-        E->elt_c[i][CPPR] = (struct EC *) malloc((nel+1)*sizeof(struct EC));
+        E->elt_c[i] = (struct EC *) malloc((nel+1)*sizeof(struct EC));
 
     E->EVI[i] = (float *) malloc((nel+1)*vpoints[E->mesh.nsd]*sizeof(float));
     E->BPI[i] = (double *) malloc((npno+1)*sizeof(double));
diff --git a/lib/Petsc_citcoms.c b/lib/Petsc_citcoms.c
index 90d2323..181100c 100644
--- a/lib/Petsc_citcoms.c
+++ b/lib/Petsc_citcoms.c
@@ -105,9 +105,9 @@ PetscErrorCode assemble_c_u_PETSc( struct All_variables *E, Vec U, Vec result, i
         j2= E->ID[level][b].doff[2];
         j3= E->ID[level][b].doff[3];
 
-        result_temp[e]  += E->elt_c[level][CPPR][e+1].c[p  ][0] * U_temp[j1]
-                         + E->elt_c[level][CPPR][e+1].c[p+1][0] * U_temp[j2]
-                         + E->elt_c[level][CPPR][e+1].c[p+2][0] * U_temp[j3];
+        result_temp[e]  += E->elt_c[level][e+1].c[p  ][0] * U_temp[j1]
+                         + E->elt_c[level][e+1].c[p+1][0] * U_temp[j2]
+                         + E->elt_c[level][e+1].c[p+2][0] * U_temp[j3];
       }
     }
   ierr = VecRestoreArray( U, &U_temp ); CHKERRQ( ierr );
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 65ec322..eb754db 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -806,7 +806,7 @@ struct All_variables {
     struct ID *ID[MAX_LEVELS];
     struct SUBEL *EL[MAX_LEVELS];
     struct EG *elt_del[MAX_LEVELS];
-    struct EC *elt_c[MAX_LEVELS][NCS];
+    struct EC *elt_c[MAX_LEVELS];
     struct EK *elt_k[MAX_LEVELS][NCS];
     struct CC *cc;
     struct CCX *ccx;



More information about the CIG-COMMITS mailing list