[cig-commits] [commit] rajesh-petsc-schur: Changed the shapes of E->boundary.det as part of caps_per_proc removal (f689e27)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:14:42 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit f689e277e4a872357d77ebd17a590088f27e6af6
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Thu Sep 25 14:25:43 2014 -0700
Changed the shapes of E->boundary.det as part of caps_per_proc removal
>---------------------------------------------------------------
f689e277e4a872357d77ebd17a590088f27e6af6
lib/Element_calculations.c | 6 +++---
lib/Full_version_dependent.c | 6 +++---
lib/Global_operations.c | 4 ++--
lib/Regional_version_dependent.c | 4 ++--
lib/Size_does_matter.c | 2 +-
lib/global_defs.h | 2 +-
lib/prototypes.h | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/lib/Element_calculations.c b/lib/Element_calculations.c
index e23cd9a..c38b8ac 100644
--- a/lib/Element_calculations.c
+++ b/lib/Element_calculations.c
@@ -104,7 +104,7 @@ void assemble_forces(E,penalty)
/* for traction bc */
for(i=1; i<=E->boundary.nel; i++) {
- e = E->boundary.element[CPPR][i];
+ e = E->boundary.element[i];
for(a=0;a<24;a++) elt_f[a] = 0.0;
for(a=SIDE_BEGIN; a<=SIDE_END; a++) {
@@ -1055,7 +1055,7 @@ static void get_elt_tr(struct All_variables *E, int bel, int side, double elt_tr
double traction[4][5],traction_at_gs[4][5], value, tmp;
int j, b, p, k, a, nodea, d;
- int el = E->boundary.element[CPPR][bel];
+ int el = E->boundary.element[bel];
int flagged;
int found = 0;
@@ -1137,7 +1137,7 @@ static void get_elt_tr_pseudo_surf(struct All_variables *E, int bel, int side, d
double traction[4][5],traction_at_gs[4][5], value, tmp;
int j, b, p, k, a, nodea, d;
- int el = E->boundary.element[CPPR][bel];
+ int el = E->boundary.element[bel];
int flagged;
int found = 0;
diff --git a/lib/Full_version_dependent.c b/lib/Full_version_dependent.c
index 03361cc..1ad348d 100644
--- a/lib/Full_version_dependent.c
+++ b/lib/Full_version_dependent.c
@@ -237,7 +237,7 @@ void full_construct_boundary( struct All_variables *E)
/* boundary = top + bottom */
int max_size = 2*E->lmesh.elx*E->lmesh.ely + 1;
- E->boundary.element[CPPR] = (int *)malloc(max_size*sizeof(int));
+ E->boundary.element = (int *)malloc(max_size*sizeof(int));
for(d=1; d<=dims; d++)
E->boundary.normal[CPPR][d] = (int *)malloc(max_size*sizeof(int));
@@ -248,7 +248,7 @@ void full_construct_boundary( struct All_variables *E)
if(E->parallel.me_loc[3] == 0) {
i = 1;
el = i + (j-1)*E->lmesh.elz + (k-1)*E->lmesh.elz*E->lmesh.elx;
- E->boundary.element[CPPR][count] = el;
+ E->boundary.element[count] = el;
E->boundary.normal[CPPR][dims][count] = -1;
for(d=1; d<dims; d++)
E->boundary.normal[CPPR][d][count] = 0;
@@ -258,7 +258,7 @@ void full_construct_boundary( struct All_variables *E)
if(E->parallel.me_loc[3] == E->parallel.nprocz - 1) {
i = E->lmesh.elz;
el = i + (j-1)*E->lmesh.elz + (k-1)*E->lmesh.elz*E->lmesh.elx;
- E->boundary.element[CPPR][count] = el;
+ E->boundary.element[count] = el;
E->boundary.normal[CPPR][dims][count] = 1;
for(d=1; d<dims; d++)
E->boundary.normal[CPPR][d][count] = 0;
diff --git a/lib/Global_operations.c b/lib/Global_operations.c
index 788d8ad..12ffc2a 100644
--- a/lib/Global_operations.c
+++ b/lib/Global_operations.c
@@ -724,14 +724,14 @@ double Tmaxd(E,T)
float Tmax(E,T)
struct All_variables *E;
- float **T;
+ float *T;
{
float global_fmax(),temp,temp1;
int i,m;
temp = -10.0;
for(i=1;i<=E->lmesh.nno;i++)
- temp = max(T[CPPR][i],temp);
+ temp = max(T[i],temp);
temp1 = global_fmax(E,temp);
return (temp1);
diff --git a/lib/Regional_version_dependent.c b/lib/Regional_version_dependent.c
index d3664a8..d66c7dc 100644
--- a/lib/Regional_version_dependent.c
+++ b/lib/Regional_version_dependent.c
@@ -200,7 +200,7 @@ void regional_construct_boundary( struct All_variables *E)
int max_size = E->lmesh.elx*E->lmesh.ely*E->lmesh.elz
- (E->lmesh.elx-2)*(E->lmesh.ely-2)*(E->lmesh.elz-2) + 1;
- E->boundary.element[CPPR] = (int *)malloc(max_size*sizeof(int));
+ E->boundary.element = (int *)malloc(max_size*sizeof(int));
for(d=1; d<=dims; d++)
E->boundary.normal[CPPR][d] = (int *)malloc(max_size*sizeof(int));
@@ -250,7 +250,7 @@ void regional_construct_boundary( struct All_variables *E)
if(isBoundary) {
el = i + (j-1)*E->lmesh.elz + (k-1)*E->lmesh.elz*E->lmesh.elx;
- E->boundary.element[CPPR][count] = el;
+ E->boundary.element[count] = el;
for(d=1; d<=dims; d++)
E->boundary.normal[CPPR][d][count] = normalFlag[d];
diff --git a/lib/Size_does_matter.c b/lib/Size_does_matter.c
index df50a01..7770f87 100644
--- a/lib/Size_does_matter.c
+++ b/lib/Size_does_matter.c
@@ -348,7 +348,7 @@ void construct_bdry_det(struct All_variables *E)
E->boundary.det[CPPR][side][d] = (double *)malloc((1+E->boundary.nel)*sizeof(double));
for (es=1;es<=E->boundary.nel;es++) {
- el = E->boundary.element[CPPR][es];
+ el = E->boundary.element[es];
for (side=SIDE_BEGIN; side<=SIDE_END; side++) {
get_side_x_cart(E, xx, el, side);
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 77c98fd..9022f46 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -126,7 +126,7 @@ extern const int CPPR;
struct Bdry {
int nel;
- int *element[NCS];
+ int *element;
int *normal[NCS][4];
double *det[NCS][7][5];
};
diff --git a/lib/prototypes.h b/lib/prototypes.h
index d7af833..c9a76bb 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -213,7 +213,7 @@ float global_fmin(struct All_variables *, double);
double global_dmax(struct All_variables *, double);
float global_fmax(struct All_variables *, double);
double Tmaxd(struct All_variables *, double *);
-float Tmax(struct All_variables *, float **);
+float Tmax(struct All_variables *, float *);
double vnorm_nonnewt(struct All_variables *, double *, double *, int);
void sum_across_depth_sph1(struct All_variables *, float *, float *);
void broadcast_vertical(struct All_variables *, float *, float *, int);
More information about the CIG-COMMITS
mailing list