[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->trace.shape_coefs as part of caps_per_proc_removal (673eee2)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:13:58 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit 673eee208d1909ebf44565e039aa5a4a7b5d236b
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Wed Sep 24 13:30:21 2014 -0700
Changed the shape of E->trace.shape_coefs as part of caps_per_proc_removal
>---------------------------------------------------------------
673eee208d1909ebf44565e039aa5a4a7b5d236b
lib/Full_tracer_advection.c | 38 +++++++++++++++++++-------------------
lib/tracer_defs.h | 2 +-
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/lib/Full_tracer_advection.c b/lib/Full_tracer_advection.c
index 93b29e3..57095c0 100644
--- a/lib/Full_tracer_advection.c
+++ b/lib/Full_tracer_advection.c
@@ -1119,25 +1119,25 @@ static void get_2dshape(struct All_variables *E,
/* shape function 1 */
- a0=E->trace.shape_coefs[CPPR][iwedge][1][n];
- a1=E->trace.shape_coefs[CPPR][iwedge][2][n];
- a2=E->trace.shape_coefs[CPPR][iwedge][3][n];
+ a0=E->trace.shape_coefs[iwedge][1][n];
+ a1=E->trace.shape_coefs[iwedge][2][n];
+ a2=E->trace.shape_coefs[iwedge][3][n];
shape2d[1]=a0+a1*u+a2*v;
/* shape function 2 */
- a0=E->trace.shape_coefs[CPPR][iwedge][4][n];
- a1=E->trace.shape_coefs[CPPR][iwedge][5][n];
- a2=E->trace.shape_coefs[CPPR][iwedge][6][n];
+ a0=E->trace.shape_coefs[iwedge][4][n];
+ a1=E->trace.shape_coefs[iwedge][5][n];
+ a2=E->trace.shape_coefs[iwedge][6][n];
shape2d[2]=a0+a1*u+a2*v;
/* shape function 3 */
- a0=E->trace.shape_coefs[CPPR][iwedge][7][n];
- a1=E->trace.shape_coefs[CPPR][iwedge][8][n];
- a2=E->trace.shape_coefs[CPPR][iwedge][9][n];
+ a0=E->trace.shape_coefs[iwedge][7][n];
+ a1=E->trace.shape_coefs[iwedge][8][n];
+ a2=E->trace.shape_coefs[iwedge][9][n];
shape2d[3]=a0+a1*u+a2*v;
}
@@ -2876,7 +2876,7 @@ static void determine_shape_coefficients(struct All_variables *E)
for(iwedge=1; iwedge<=2; iwedge++) {
for (kk=1; kk<=9; kk++) {
- if ((E->trace.shape_coefs[CPPR][iwedge][kk] =
+ if ((E->trace.shape_coefs[iwedge][kk] =
(double *)malloc((E->lmesh.snel+1)*sizeof(double))) == NULL) {
fprintf(E->trace.fpt,"ERROR(find shape coefs)-not enough memory(a)\n");
fflush(E->trace.fpt);
@@ -2921,9 +2921,9 @@ static void determine_shape_coefficients(struct All_variables *E)
a1 = (y2-y3)/delta;
a2 = (x3-x2)/delta;
- E->trace.shape_coefs[CPPR][iwedge][1][i] = a0;
- E->trace.shape_coefs[CPPR][iwedge][2][i] = a1;
- E->trace.shape_coefs[CPPR][iwedge][3][i] = a2;
+ E->trace.shape_coefs[iwedge][1][i] = a0;
+ E->trace.shape_coefs[iwedge][2][i] = a1;
+ E->trace.shape_coefs[iwedge][3][i] = a2;
/* shape function 2 */
@@ -2932,9 +2932,9 @@ static void determine_shape_coefficients(struct All_variables *E)
a1 = (y1-y3)/delta;
a2 = (x3-x1)/delta;
- E->trace.shape_coefs[CPPR][iwedge][4][i] = a0;
- E->trace.shape_coefs[CPPR][iwedge][5][i] = a1;
- E->trace.shape_coefs[CPPR][iwedge][6][i] = a2;
+ E->trace.shape_coefs[iwedge][4][i] = a0;
+ E->trace.shape_coefs[iwedge][5][i] = a1;
+ E->trace.shape_coefs[iwedge][6][i] = a2;
/* shape function 3 */
@@ -2943,9 +2943,9 @@ static void determine_shape_coefficients(struct All_variables *E)
a1 = (y2-y1)/delta;
a2 = (x1-x2)/delta;
- E->trace.shape_coefs[CPPR][iwedge][7][i] = a0;
- E->trace.shape_coefs[CPPR][iwedge][8][i] = a1;
- E->trace.shape_coefs[CPPR][iwedge][9][i] = a2;
+ E->trace.shape_coefs[iwedge][7][i] = a0;
+ E->trace.shape_coefs[iwedge][8][i] = a1;
+ E->trace.shape_coefs[iwedge][9][i] = a2;
/** debug **
fprintf(E->trace.fpt, "el=%d els=%d iwedge=%d shape=(%e %e %e, %e %e %e, %e %e %e)\n",
diff --git a/lib/tracer_defs.h b/lib/tracer_defs.h
index e17f5f8..a902b89 100644
--- a/lib/tracer_defs.h
+++ b/lib/tracer_defs.h
@@ -125,7 +125,7 @@ struct TRACE{
int *regtoel[5];
/* gnomonic shape functions */
- double *shape_coefs[13][3][10];
+ double *shape_coefs[3][10];
More information about the CIG-COMMITS
mailing list