[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->x as part of caps_per_proc removal (83b719d)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:11:28 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit 83b719da30afa31b493ff188ae42125538cb85aa
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Tue Sep 23 13:39:47 2014 -0700
Changed the shape of E->x as part of caps_per_proc removal
>---------------------------------------------------------------
83b719da30afa31b493ff188ae42125538cb85aa
lib/Determine_net_rotation.c | 12 ++++++------
lib/Full_tracer_advection.c | 6 +++---
lib/Initial_temperature.c | 6 +++---
lib/Instructions.c | 2 +-
lib/Output.c | 6 +++---
lib/Output_gzdir.c | 4 ++--
lib/Output_vtk.c | 6 +++---
lib/Size_does_matter.c | 36 ++++++++++++++++++------------------
lib/Sphere_util.c | 6 +++---
lib/Tracer_setup.c | 6 +++---
lib/global_defs.h | 2 +-
11 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/lib/Determine_net_rotation.c b/lib/Determine_net_rotation.c
index 833bcf4..d5eacd8 100644
--- a/lib/Determine_net_rotation.c
+++ b/lib/Determine_net_rotation.c
@@ -110,9 +110,9 @@ double determine_model_net_rotation(struct All_variables *E,double *omega)
for(nint=1;nint <= onedvpoints[E->mesh.nsd];nint++) {
for(d=1;d <= onedvpoints[E->mesh.nsd];d++){
vtmp = E->M.vpt[GMVINDEX(d,nint)] * dGamma.vpt[GMVGAMMA(0,nint)];
- x[0] += E->x[CPPR][1][lnode[d]] * vtmp; /* coords */
- x[1] += E->x[CPPR][2][lnode[d]] * vtmp;
- x[2] += E->x[CPPR][3][lnode[d]] * vtmp;
+ x[0] += E->x[1][lnode[d]] * vtmp; /* coords */
+ x[1] += E->x[2][lnode[d]] * vtmp;
+ x[2] += E->x[3][lnode[d]] * vtmp;
v[0] += E->sphere.cap[CPPR].V[1][lnode[d]] * vtmp; /* theta */
v[1] += E->sphere.cap[CPPR].V[2][lnode[d]] * vtmp; /* phi */
@@ -128,9 +128,9 @@ double determine_model_net_rotation(struct All_variables *E,double *omega)
for(nint=1;nint<=onedvpoints[E->mesh.nsd];nint++) {
for(d=1;d<=onedvpoints[E->mesh.nsd];d++){
vtmp = E->M.vpt[GMVINDEX(d,nint)] * dGamma.vpt[GMVGAMMA(1,nint)];
- x[0] += E->x[CPPR][1][lnode[d]] * vtmp; /* coords */
- x[1] += E->x[CPPR][2][lnode[d]] * vtmp;
- x[2] += E->x[CPPR][3][lnode[d]] * vtmp;
+ x[0] += E->x[1][lnode[d]] * vtmp; /* coords */
+ x[1] += E->x[2][lnode[d]] * vtmp;
+ x[2] += E->x[3][lnode[d]] * vtmp;
/* */
v[0] += E->sphere.cap[CPPR].V[1][lnode[d]] * vtmp;
v[1] += E->sphere.cap[CPPR].V[2][lnode[d]] * vtmp;
diff --git a/lib/Full_tracer_advection.c b/lib/Full_tracer_advection.c
index 16e2857..983c604 100644
--- a/lib/Full_tracer_advection.c
+++ b/lib/Full_tracer_advection.c
@@ -2135,9 +2135,9 @@ static int icheck_element_column(struct All_variables *E,
node=E->ien[nel].node[kk+4];
- rnode[kk][1]=E->x[CPPR][1][node];
- rnode[kk][2]=E->x[CPPR][2][node];
- rnode[kk][3]=E->x[CPPR][3][node];
+ rnode[kk][1]=E->x[1][node];
+ rnode[kk][2]=E->x[2][node];
+ rnode[kk][3]=E->x[3][node];
rnode[kk][4]=E->sx[1][node];
rnode[kk][5]=E->sx[2][node];
diff --git a/lib/Initial_temperature.c b/lib/Initial_temperature.c
index eb165d7..ddb1ad5 100644
--- a/lib/Initial_temperature.c
+++ b/lib/Initial_temperature.c
@@ -557,9 +557,9 @@ static void add_spherical_anomaly(struct All_variables *E)
for(j=1; j<=nox;j ++)
for(k=1; k<=noz; k++) {
node = k + (j-1)*noz + (i-1)*nox*noz;
- dx[1] = E->x[CPPR][1][node] - x_center[1];
- dx[2] = E->x[CPPR][2][node] - x_center[2];
- dx[3] = E->x[CPPR][3][node] - x_center[3];
+ dx[1] = E->x[1][node] - x_center[1];
+ dx[2] = E->x[2][node] - x_center[2];
+ dx[3] = E->x[3][node] - x_center[3];
distance = sqrt(dx[1]*dx[1] + dx[2]*dx[2] + dx[3]*dx[3]);
if (distance < radius){
diff --git a/lib/Instructions.c b/lib/Instructions.c
index d48e6f7..a04b9ef 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -1364,7 +1364,7 @@ void set_up_nonmg_aliases(struct All_variables *E)
E->gNX[CPPR] = E->GNX[E->mesh.levmax][CPPR];
for (i=1;i<=E->mesh.nsd;i++) {
- E->x[CPPR][i] = E->X[E->mesh.levmax][CPPR][i];
+ E->x[i] = E->X[E->mesh.levmax][CPPR][i];
E->sx[i] = E->SX[E->mesh.levmax][CPPR][i];
}
}
diff --git a/lib/Output.c b/lib/Output.c
index cc867e7..08ff6c8 100644
--- a/lib/Output.c
+++ b/lib/Output.c
@@ -290,9 +290,9 @@ void output_coord_bin(struct All_variables *E)
header[3] = 0x12345678; /* guard */
fwrite(header, sizeof(int32_t), 4, fp1);
- fwrite(&(E->x[CPPR][1][1]), sizeof(double), E->lmesh.nno, fp1);
- fwrite(&(E->x[CPPR][2][1]), sizeof(double), E->lmesh.nno, fp1);
- fwrite(&(E->x[CPPR][3][1]), sizeof(double), E->lmesh.nno, fp1);
+ fwrite(&(E->x[1][1]), sizeof(double), E->lmesh.nno, fp1);
+ fwrite(&(E->x[2][1]), sizeof(double), E->lmesh.nno, fp1);
+ fwrite(&(E->x[3][1]), sizeof(double), E->lmesh.nno, fp1);
fclose(fp1);
}
diff --git a/lib/Output_gzdir.c b/lib/Output_gzdir.c
index e1fdde6..cf5dbd6 100644
--- a/lib/Output_gzdir.c
+++ b/lib/Output_gzdir.c
@@ -285,7 +285,7 @@ void gzdir_output_coord(struct All_variables *E)
/* write nodal coordinate to file, big endian */
for(i=1;i <= E->lmesh.nno;i++) {
/* cartesian coordinates */
- x[0]=E->x[CPPR][1][i];x[1]=E->x[CPPR][2][i];x[2]=E->x[CPPR][3][i];
+ x[0]=E->x[1][i];x[1]=E->x[2][i];x[2]=E->x[3][i];
if(be_write_float_to_file(x,3,fp1) != 3)
BE_WERROR;
out++;
@@ -401,7 +401,7 @@ void gzdir_output_coord(struct All_variables *E)
gz1 = gzdir_output_open(output_file,"w");
for(i=1;i <= E->lmesh.nno;i++) {
gzprintf(gz1,"%9.6f %9.6f %9.6f\n", /* cartesian nodal coordinates */
- E->x[CPPR][1][i],E->x[CPPR][2][i],E->x[CPPR][3][i]);
+ E->x[1][i],E->x[2][i],E->x[3][i]);
}
gzclose(gz1);
/*
diff --git a/lib/Output_vtk.c b/lib/Output_vtk.c
index 4eab1ab..ca451c4 100644
--- a/lib/Output_vtk.c
+++ b/lib/Output_vtk.c
@@ -188,9 +188,9 @@ static void vtk_output_coord(struct All_variables *E, FILE *fp)
fprintf(fp, " <DataArray type=\"Float32\" Name=\"coordinate\" NumberOfComponents=\"3\" format=\"%s\">\n", E->output.vtk_format);
for(i=1; i<=E->lmesh.nno; i++){
- floatpos[((CPPR-1)*E->lmesh.nno+i-1)*3] = (float)(E->x[CPPR][1][i]);
- floatpos[((CPPR-1)*E->lmesh.nno+i-1)*3+1]=(float)(E->x[CPPR][2][i]);
- floatpos[((CPPR-1)*E->lmesh.nno+i-1)*3+2]=(float)(E->x[CPPR][3][i]);
+ floatpos[((CPPR-1)*E->lmesh.nno+i-1)*3] = (float)(E->x[1][i]);
+ floatpos[((CPPR-1)*E->lmesh.nno+i-1)*3+1]=(float)(E->x[2][i]);
+ floatpos[((CPPR-1)*E->lmesh.nno+i-1)*3+2]=(float)(E->x[3][i]);
}
if (strcmp(E->output.vtk_format, "binary") == 0)
diff --git a/lib/Size_does_matter.c b/lib/Size_does_matter.c
index 6e7a72f..d67474c 100644
--- a/lib/Size_does_matter.c
+++ b/lib/Size_does_matter.c
@@ -268,15 +268,15 @@ void get_side_x_cart(struct All_variables *E, double xx[4][5], int el, int side)
for(i=1;i<=oned;i++) { /* nodes */
s = sidenodes[side][i];
node = E->ien[el].node[s];
- xx[1][i] = E->x[CPPR][1][node]*dxdy[1][1]
- + E->x[CPPR][2][node]*dxdy[1][2]
- + E->x[CPPR][3][node]*dxdy[1][3];
- xx[2][i] = E->x[CPPR][1][node]*dxdy[2][1]
- + E->x[CPPR][2][node]*dxdy[2][2]
- + E->x[CPPR][3][node]*dxdy[2][3];
- xx[3][i] = E->x[CPPR][1][node]*dxdy[3][1]
- + E->x[CPPR][2][node]*dxdy[3][2]
- + E->x[CPPR][3][node]*dxdy[3][3];
+ xx[1][i] = E->x[1][node]*dxdy[1][1]
+ + E->x[2][node]*dxdy[1][2]
+ + E->x[3][node]*dxdy[1][3];
+ xx[2][i] = E->x[1][node]*dxdy[2][1]
+ + E->x[2][node]*dxdy[2][2]
+ + E->x[3][node]*dxdy[2][3];
+ xx[3][i] = E->x[1][node]*dxdy[3][1]
+ + E->x[2][node]*dxdy[3][2]
+ + E->x[3][node]*dxdy[3][3];
}
}
@@ -450,15 +450,15 @@ void get_global_1d_shape_fn_L(E,el,GM,dGammax,top)
for(i=1;i<=oned;i++) { /* nodes */
e = i+ii*oned;
node = E->ien[el].node[e];
- xx[1][i] = E->x[CPPR][1][node]*dxdy[1][1]
- + E->x[CPPR][2][node]*dxdy[1][2]
- + E->x[CPPR][3][node]*dxdy[1][3];
- xx[2][i] = E->x[CPPR][1][node]*dxdy[2][1]
- + E->x[CPPR][2][node]*dxdy[2][2]
- + E->x[CPPR][3][node]*dxdy[2][3];
- xx[3][i] = E->x[CPPR][1][node]*dxdy[3][1]
- + E->x[CPPR][2][node]*dxdy[3][2]
- + E->x[CPPR][3][node]*dxdy[3][3];
+ xx[1][i] = E->x[1][node]*dxdy[1][1]
+ + E->x[2][node]*dxdy[1][2]
+ + E->x[3][node]*dxdy[1][3];
+ xx[2][i] = E->x[1][node]*dxdy[2][1]
+ + E->x[2][node]*dxdy[2][2]
+ + E->x[3][node]*dxdy[2][3];
+ xx[3][i] = E->x[1][node]*dxdy[3][1]
+ + E->x[2][node]*dxdy[3][2]
+ + E->x[3][node]*dxdy[3][3];
}
for(k=1;k<=oned;k++) { /* all of the vpoints*/
diff --git a/lib/Sphere_util.c b/lib/Sphere_util.c
index 10dbf6f..13217e4 100644
--- a/lib/Sphere_util.c
+++ b/lib/Sphere_util.c
@@ -78,9 +78,9 @@ void compute_angle_surf_area (E)
ia[4] = ia[3]-E->lmesh.noz*(E->lmesh.nox-1);
for (i=1;i<=4;i++) {
- xx[1][i] = E->x[CPPR][1][ia[i]]/E->sx[3][ia[1]];
- xx[2][i] = E->x[CPPR][2][ia[i]]/E->sx[3][ia[1]];
- xx[3][i] = E->x[CPPR][3][ia[i]]/E->sx[3][ia[1]];
+ xx[1][i] = E->x[1][ia[i]]/E->sx[3][ia[1]];
+ xx[2][i] = E->x[2][ia[i]]/E->sx[3][ia[1]];
+ xx[3][i] = E->x[3][ia[i]]/E->sx[3][ia[1]];
}
get_angle_sphere_cap(xx,angle);
diff --git a/lib/Tracer_setup.c b/lib/Tracer_setup.c
index 3ba702b..0c91c18 100644
--- a/lib/Tracer_setup.c
+++ b/lib/Tracer_setup.c
@@ -769,9 +769,9 @@ static void generate_random_tracers(struct All_variables *E, int tracers_cap)
xmin = ymin = zmin = E->sphere.ro;
xmax = ymax = zmax = -E->sphere.ro;
for (kk=1; kk<=E->lmesh.nno; kk++) {
- x = E->x[CPPR][1][kk];
- y = E->x[CPPR][2][kk];
- z = E->x[CPPR][3][kk];
+ x = E->x[1][kk];
+ y = E->x[2][kk];
+ z = E->x[3][kk];
xmin = ((xmin < x) ? xmin : x);
xmax = ((xmax > x) ? xmax : x);
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 279f838..efe9f58 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -836,7 +836,7 @@ struct All_variables {
double *Mass, *MASS[MAX_LEVELS];
double *TMass, *NMass;
double *SX[MAX_LEVELS][NCS][4],*X[MAX_LEVELS][NCS][4];
- double *sx[4],*x[NCS][4];
+ double *sx[4],*x[4];
double *surf_det[NCS][5];
double *SinCos[MAX_LEVELS][NCS][4];
More information about the CIG-COMMITS
mailing list