[cig-commits] [commit] rajesh-petsc-schur: replaced all occurences of the caps_per_proc iteration variable by CPPR in Topo_gravity.c (6dec4de)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Sep 16 16:14:28 PDT 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/400e8500968f38074f2de7627682299fce9f86bb...1bfd8478d42e61b89bc8cfc1679ae9dcc94936f5
>---------------------------------------------------------------
commit 6dec4de733bb6d29753f6a8ccae9a62c97768175
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Tue Sep 16 11:57:33 2014 -0700
replaced all occurences of the caps_per_proc iteration variable by CPPR in Topo_gravity.c
>---------------------------------------------------------------
6dec4de733bb6d29753f6a8ccae9a62c97768175
lib/Topo_gravity.c | 270 ++++++++++++++++++++++++++---------------------------
1 file changed, 135 insertions(+), 135 deletions(-)
diff --git a/lib/Topo_gravity.c b/lib/Topo_gravity.c
index 5481db6..02daf61 100644
--- a/lib/Topo_gravity.c
+++ b/lib/Topo_gravity.c
@@ -93,15 +93,15 @@ void get_STD_topo(E,tpg,tpgb,divg,vort,ii)
for(m=1;m<=E->sphere.caps_per_proc;m++)
for(snode=1;snode<=E->lmesh.nsf;snode++) {
- node = E->surf_node[m][snode];
- tpg[m][snode] = -2*SZZ[m][node] + SZZ[m][node-1];
- tpgb[m][snode] = 2*SZZ[m][node-E->lmesh.noz+1]- SZZ[m][node-E->lmesh.noz+2];
+ node = E->surf_node[CPPR][snode];
+ tpg[CPPR][snode] = -2*SZZ[CPPR][node] + SZZ[CPPR][node-1];
+ tpgb[CPPR][snode] = 2*SZZ[CPPR][node-E->lmesh.noz+1]- SZZ[CPPR][node-E->lmesh.noz+2];
- tpg[m][snode] = tpg[m][snode] *topo_scaling1;
- tpgb[m][snode] = tpgb[m][snode]*topo_scaling2;
+ tpg[CPPR][snode] = tpg[CPPR][snode] *topo_scaling1;
+ tpgb[CPPR][snode] = tpgb[CPPR][snode]*topo_scaling2;
- divg[m][snode] = 2*divv[m][node]-divv[m][node-1];
- vort[m][snode] = 2*vorv[m][node]-vorv[m][node-1];
+ divg[CPPR][snode] = 2*divv[CPPR][node]-divv[CPPR][node-1];
+ vort[CPPR][snode] = 2*vorv[CPPR][node]-vorv[CPPR][node-1];
}
free_STD_mem(E, SXX, SYY, SZZ, SXY, SXZ, SZY, divv, vorv);
@@ -116,9 +116,9 @@ void get_STD_freesurf(struct All_variables *E,float **freesurf)
if (E->parallel.me_loc[3]==E->parallel.nprocz-1)
for(m=1;m<=E->sphere.caps_per_proc;m++)
for(snode=1;snode<=E->lmesh.nsf;snode++) {
- node = E->surf_node[m][snode];
+ node = E->surf_node[CPPR][snode];
/*freesurf[m][snode] += 0.5*(E->sphere.cap[m].V[3][node]+E->sphere.cap[m].Vprev[3][node])*E->advection.timestep;*/
- freesurf[m][snode] += E->sphere.cap[m].V[3][node]*E->advection.timestep;
+ freesurf[CPPR][snode] += E->sphere.cap[CPPR].V[3][node]*E->advection.timestep;
}
return;
}
@@ -132,26 +132,26 @@ void allocate_STD_mem(struct All_variables *E,
int m, i;
for(m=1;m<=E->sphere.caps_per_proc;m++) {
- SXX[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- SYY[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- SXY[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- SXZ[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- SZY[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- SZZ[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- divv[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
- vorv[m] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ SXX[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ SYY[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ SXY[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ SXZ[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ SZY[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ SZZ[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ divv[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
+ vorv[CPPR] = (float *)malloc((E->lmesh.nno+1)*sizeof(float));
}
for(m=1;m<=E->sphere.caps_per_proc;m++) {
for(i=1;i<=E->lmesh.nno;i++) {
- SZZ[m][i] = 0.0;
- SXX[m][i] = 0.0;
- SYY[m][i] = 0.0;
- SXY[m][i] = 0.0;
- SXZ[m][i] = 0.0;
- SZY[m][i] = 0.0;
- divv[m][i] = 0.0;
- vorv[m][i] = 0.0;
+ SZZ[CPPR][i] = 0.0;
+ SXX[CPPR][i] = 0.0;
+ SYY[CPPR][i] = 0.0;
+ SXY[CPPR][i] = 0.0;
+ SXZ[CPPR][i] = 0.0;
+ SZY[CPPR][i] = 0.0;
+ divv[CPPR][i] = 0.0;
+ vorv[CPPR][i] = 0.0;
}
}
return;
@@ -165,14 +165,14 @@ void free_STD_mem(struct All_variables *E,
{
int m;
for(m=1;m<=E->sphere.caps_per_proc;m++) {
- free((void *)SXX[m]);
- free((void *)SYY[m]);
- free((void *)SXY[m]);
- free((void *)SXZ[m]);
- free((void *)SZY[m]);
- free((void *)SZZ[m]);
- free((void *)divv[m]);
- free((void *)vorv[m]);
+ free((void *)SXX[CPPR]);
+ free((void *)SYY[CPPR]);
+ free((void *)SXY[CPPR]);
+ free((void *)SXZ[CPPR]);
+ free((void *)SZY[CPPR]);
+ free((void *)SZZ[CPPR]);
+ free((void *)divv[CPPR]);
+ free((void *)vorv[CPPR]);
}
}
@@ -255,13 +255,13 @@ void compute_nodal_stress(struct All_variables *E,
div = 0.0;
vor = 0.0;
- get_rtf_at_vpts(E, m, lev, e, rtf);// gets r,theta,phi coordinates at the integration points
- velo_from_element(E,VV,m,e,sphere_key); /* assign node-global
+ get_rtf_at_vpts(E, CPPR, lev, e, rtf);// gets r,theta,phi coordinates at the integration points
+ velo_from_element(E,VV,CPPR,e,sphere_key); /* assign node-global
velocities to nodes
local to the
element */
- dOmega = &(E->gDA[m][e]); /* Jacobian at integration points */
- GNx = &(E->gNX[m][e]); /* derivatives of shape functions at
+ dOmega = &(E->gDA[CPPR][e]); /* Jacobian at integration points */
+ GNx = &(E->gNX[CPPR][e]); /* derivatives of shape functions at
integration points */
/* Vxyz is the strain rate vector, whose relationship with
@@ -276,7 +276,7 @@ void compute_nodal_stress(struct All_variables *E,
*/
for(j=1;j <= vpts;j++) { /* loop through velocity Gauss points */
/* E->EVi[j] = E->EVI[E->mesh.levmax][j]; */
- pre[j] = E->EVi[m][(e-1)*vpts+j]*dOmega->vpt[j];
+ pre[j] = E->EVi[CPPR][(e-1)*vpts+j]*dOmega->vpt[j];
dilation[j] = 0.0;
Vxyz[1][j] = 0.0;
Vxyz[2][j] = 0.0;
@@ -302,7 +302,7 @@ void compute_nodal_stress(struct All_variables *E,
*/
if ((e-1)%E->lmesh.elz==0) {
- construct_c3x3matrix_el(E,e,&E->element_Cc,&E->element_Ccx,lev,m,0);
+ construct_c3x3matrix_el(E,e,&E->element_Cc,&E->element_Ccx,lev,CPPR,0);
}
/* get B at velocity Gauss points */
get_ba(&(E->N), GNx, &E->element_Cc, &E->element_Ccx,rtf, dims, ba);
@@ -375,11 +375,11 @@ void compute_nodal_stress(struct All_variables *E,
*/
get_constitutive(D,rtf[1][i],rtf[2][i],TRUE,
- E->EVIn1[E->mesh.levmax][m][l1],
- E->EVIn2[E->mesh.levmax][m][l1],
- E->EVIn3[E->mesh.levmax][m][l1],
- E->EVI2[E->mesh.levmax][m][l1],
- E->avmode[E->mesh.levmax][m][l1],
+ E->EVIn1[E->mesh.levmax][CPPR][l1],
+ E->EVIn2[E->mesh.levmax][CPPR][l1],
+ E->EVIn3[E->mesh.levmax][CPPR][l1],
+ E->EVI2[E->mesh.levmax][CPPR][l1],
+ E->avmode[E->mesh.levmax][CPPR][l1],
E);
/* deviatoric stress, pressure will be added later */
@@ -422,30 +422,30 @@ void compute_nodal_stress(struct All_variables *E,
}
#endif
/* normalize by volume */
- Sxx /= E->eco[m][e].area;
- Syy /= E->eco[m][e].area;
- Szz /= E->eco[m][e].area;
- Sxy /= E->eco[m][e].area;
- Sxz /= E->eco[m][e].area;
- Szy /= E->eco[m][e].area;
- div /= E->eco[m][e].area;
- vor /= E->eco[m][e].area;
+ Sxx /= E->eco[CPPR][e].area;
+ Syy /= E->eco[CPPR][e].area;
+ Szz /= E->eco[CPPR][e].area;
+ Sxy /= E->eco[CPPR][e].area;
+ Sxz /= E->eco[CPPR][e].area;
+ Szy /= E->eco[CPPR][e].area;
+ div /= E->eco[CPPR][e].area;
+ vor /= E->eco[CPPR][e].area;
/* add the pressure term */
- Szz -= E->P[m][e-1]; /* E->P is now 0-based. Change e-1 to e */
- Sxx -= E->P[m][e-1]; /* when the loop variable e goes from */
- Syy -= E->P[m][e-1]; /* 0 to nel-1, instead of the current 1 to nel */
+ Szz -= E->P[CPPR][e-1]; /* E->P is now 0-based. Change e-1 to e */
+ Sxx -= E->P[CPPR][e-1]; /* when the loop variable e goes from */
+ Syy -= E->P[CPPR][e-1]; /* 0 to nel-1, instead of the current 1 to nel */
for(i=1;i<=ends;i++) {
- node = E->ien[m][e].node[i]; /* assign to global nodes */
- SZZ[m][node] += tww[i] * Szz;
- SXX[m][node] += tww[i] * Sxx;
- SYY[m][node] += tww[i] * Syy;
- SXY[m][node] += tww[i] * Sxy;
- SXZ[m][node] += tww[i] * Sxz;
- SZY[m][node] += tww[i] * Szy;
- divv[m][node]+= tww[i] * div;
- vorv[m][node]+= tww[i] * vor;
+ node = E->ien[CPPR][e].node[i]; /* assign to global nodes */
+ SZZ[CPPR][node] += tww[i] * Szz;
+ SXX[CPPR][node] += tww[i] * Sxx;
+ SYY[CPPR][node] += tww[i] * Syy;
+ SXY[CPPR][node] += tww[i] * Sxy;
+ SXZ[CPPR][node] += tww[i] * Sxz;
+ SZY[CPPR][node] += tww[i] * Szy;
+ divv[CPPR][node]+= tww[i] * div;
+ vorv[CPPR][node]+= tww[i] * vor;
}
} /* end for el */
@@ -464,28 +464,28 @@ void compute_nodal_stress(struct All_variables *E,
for(m=1;m<=E->sphere.caps_per_proc;m++)
for(node=1;node<=E->lmesh.nno;node++) {
- mass_fac = E->Mass[m][node]*stress_scaling;
- SZZ[m][node] *= mass_fac;
- SXX[m][node] *= mass_fac;
- SYY[m][node] *= mass_fac;
- SXY[m][node] *= mass_fac;
- SXZ[m][node] *= mass_fac;
- SZY[m][node] *= mass_fac;
-
- mass_fac = E->Mass[m][node]*velo_scaling;
- vorv[m][node] *= mass_fac;
- divv[m][node] *= mass_fac;
+ mass_fac = E->Mass[CPPR][node]*stress_scaling;
+ SZZ[CPPR][node] *= mass_fac;
+ SXX[CPPR][node] *= mass_fac;
+ SYY[CPPR][node] *= mass_fac;
+ SXY[CPPR][node] *= mass_fac;
+ SXZ[CPPR][node] *= mass_fac;
+ SZY[CPPR][node] *= mass_fac;
+
+ mass_fac = E->Mass[CPPR][node]*velo_scaling;
+ vorv[CPPR][node] *= mass_fac;
+ divv[CPPR][node] *= mass_fac;
}
/* assign stress to all the nodes */
for(m=1;m<=E->sphere.caps_per_proc;m++)
for (node=1;node<=E->lmesh.nno;node++) {
- E->gstress[m][(node-1)*6+1] = SXX[m][node];
- E->gstress[m][(node-1)*6+2] = SYY[m][node];
- E->gstress[m][(node-1)*6+3] = SZZ[m][node];
- E->gstress[m][(node-1)*6+4] = SXY[m][node];
- E->gstress[m][(node-1)*6+5] = SXZ[m][node];
- E->gstress[m][(node-1)*6+6] = SZY[m][node];
+ E->gstress[CPPR][(node-1)*6+1] = SXX[CPPR][node];
+ E->gstress[CPPR][(node-1)*6+2] = SYY[CPPR][node];
+ E->gstress[CPPR][(node-1)*6+3] = SZZ[CPPR][node];
+ E->gstress[CPPR][(node-1)*6+4] = SXY[CPPR][node];
+ E->gstress[CPPR][(node-1)*6+5] = SXZ[CPPR][node];
+ E->gstress[CPPR][(node-1)*6+6] = SZY[CPPR][node];
}
/* replace boundary stresses with boundary conditions (if specified) */
@@ -524,19 +524,19 @@ void stress_conform_bcs(struct All_variables *E)
for(d=1; d<=E->mesh.nsd; d++)
- if(E->node[m][n] & sbc_flag[d]) {
+ if(E->node[CPPR][n] & sbc_flag[d]) {
if(i==1)
- E->gstress[m][(n-1)*6+stress_index[d][2]] = E->sbc.SB[m][SIDE_WEST][d][ E->sbc.node[m][n] ];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][2]] = E->sbc.SB[CPPR][SIDE_WEST][d][ E->sbc.node[CPPR][n] ];
if(i==E->lmesh.noy)
- E->gstress[m][(n-1)*6+stress_index[d][2]] = E->sbc.SB[m][SIDE_EAST][d][ E->sbc.node[m][n] ];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][2]] = E->sbc.SB[CPPR][SIDE_EAST][d][ E->sbc.node[CPPR][n] ];
if(j==1)
- E->gstress[m][(n-1)*6+stress_index[d][1]] = E->sbc.SB[m][SIDE_NORTH][d][ E->sbc.node[m][n] ];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][1]] = E->sbc.SB[CPPR][SIDE_NORTH][d][ E->sbc.node[CPPR][n] ];
if(j==E->lmesh.nox)
- E->gstress[m][(n-1)*6+stress_index[d][1]] = E->sbc.SB[m][SIDE_SOUTH][d][ E->sbc.node[m][n] ];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][1]] = E->sbc.SB[CPPR][SIDE_SOUTH][d][ E->sbc.node[CPPR][n] ];
if(k==1)
- E->gstress[m][(n-1)*6+stress_index[d][3]] = E->sbc.SB[m][SIDE_BOTTOM][d][ E->sbc.node[m][n] ];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][3]] = E->sbc.SB[CPPR][SIDE_BOTTOM][d][ E->sbc.node[CPPR][n] ];
if(k==E->lmesh.noz)
- E->gstress[m][(n-1)*6+stress_index[d][3]] = E->sbc.SB[m][SIDE_TOP][d][ E->sbc.node[m][n] ];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][3]] = E->sbc.SB[CPPR][SIDE_TOP][d][ E->sbc.node[CPPR][n] ];
}
}
@@ -553,9 +553,9 @@ void stress_conform_bcs(struct All_variables *E)
for(k=1; k<=E->lmesh.noz; k++) {
n = k+(j-1)*E->lmesh.noz+(i-1)*noxnoz;
for(d=1; d<=E->mesh.nsd; d++)
- if(E->node[m][n] & sbc_flag[d]) {
+ if(E->node[CPPR][n] & sbc_flag[d]) {
/* apply internal traction vector on horizontal surface */
- E->gstress[m][(n-1)*6+stress_index[d][3]] = E->sphere.cap[m].VB[d][n];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][3]] = E->sphere.cap[CPPR].VB[d][n];
}
}
}else{
@@ -566,13 +566,13 @@ void stress_conform_bcs(struct All_variables *E)
for(k=1; k<=E->lmesh.noz; k++) {
n = k+(j-1)*E->lmesh.noz+(i-1)*noxnoz;
for(d=1; d<=E->mesh.nsd; d++)
- if(E->node[m][n] & sbc_flag[d]) {
+ if(E->node[CPPR][n] & sbc_flag[d]) {
if(i==1 || i==E->lmesh.noy)
- E->gstress[m][(n-1)*6+stress_index[d][2]] = E->sphere.cap[m].VB[d][n];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][2]] = E->sphere.cap[CPPR].VB[d][n];
if(j==1 || j==E->lmesh.nox)
- E->gstress[m][(n-1)*6+stress_index[d][1]] = E->sphere.cap[m].VB[d][n];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][1]] = E->sphere.cap[CPPR].VB[d][n];
if(k==1 || k==E->lmesh.noz)
- E->gstress[m][(n-1)*6+stress_index[d][3]] = E->sphere.cap[m].VB[d][n];
+ E->gstress[CPPR][(n-1)*6+stress_index[d][3]] = E->sphere.cap[CPPR].VB[d][n];
}
}
}
@@ -612,7 +612,7 @@ static void geoid_from_buoyancy(struct All_variables *E,
/* density of one layer */
for(m=1;m<=E->sphere.caps_per_proc;m++)
- TT[m] = (float *) malloc ((E->lmesh.nsf+1)*sizeof(float));
+ TT[CPPR] = (float *) malloc ((E->lmesh.nsf+1)*sizeof(float));
/* cos coeff */
geoid[0] = (float*)malloc(E->sphere.hindice*sizeof(float));
@@ -639,7 +639,7 @@ static void geoid_from_buoyancy(struct All_variables *E,
p = j + (i-1)*E->lmesh.nox;
/* convert non-dimensional buoyancy to */
/* dimensional density */
- TT[m][p] = (E->buoyancy[m][node]+E->buoyancy[m][node+1])
+ TT[CPPR][p] = (E->buoyancy[CPPR][node]+E->buoyancy[CPPR][node+1])
* 0.5 * buoy2rho;
}
@@ -647,10 +647,10 @@ static void geoid_from_buoyancy(struct All_variables *E,
sphere_expansion(E,TT,geoid[0],geoid[1]);
/* thickness of the layer */
- dlayer = (E->sx[1][3][k+1]-E->sx[1][3][k])*radius_m;
+ dlayer = (E->sx[CPPR][3][k+1]-E->sx[CPPR][3][k])*radius_m;
/* mean radius of the layer */
- radius = (E->sx[1][3][k+1]+E->sx[1][3][k])*0.5;
+ radius = (E->sx[CPPR][3][k+1]+E->sx[CPPR][3][k])*0.5;
/* geoid contribution of density at this layer, ignore degree-0 term */
for (ll=1;ll<=E->output.llmax;ll++) {
@@ -677,7 +677,7 @@ static void geoid_from_buoyancy(struct All_variables *E,
sum_across_depth_sph1(E, harm_geoidb[0], harm_geoidb[1]);
for(m=1;m<=E->sphere.caps_per_proc;m++)
- free ((void *)TT[m]);
+ free ((void *)TT[CPPR]);
free ((void *)geoid[0]);
free ((void *)geoid[1]);
@@ -1034,24 +1034,24 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
eltTL = (float *)malloc((1+Tsize)*sizeof(float));
for(j=1;j<=E->sphere.caps_per_proc;j++) {
- SU[j] = (float *)malloc((1+lnsf)*sizeof(float));
- SL[j] = (float *)malloc((1+lnsf)*sizeof(float));
- RU[j] = (float *)malloc((1+lnsf)*sizeof(float));
- RL[j] = (float *)malloc((1+lnsf)*sizeof(float));
+ SU[CPPR] = (float *)malloc((1+lnsf)*sizeof(float));
+ SL[CPPR] = (float *)malloc((1+lnsf)*sizeof(float));
+ RU[CPPR] = (float *)malloc((1+lnsf)*sizeof(float));
+ RL[CPPR] = (float *)malloc((1+lnsf)*sizeof(float));
}
for(j=1;j<=E->sphere.caps_per_proc;j++) {
for(i=0;i<=lnsf;i++)
- RU[j][i] = RL[j][i] = SU[j][i] = SL[j][i] = 0.0;
+ RU[CPPR][i] = RL[CPPR][i] = SU[CPPR][i] = SL[CPPR][i] = 0.0;
/* calculate the element residuals */
for(els=1;els<=E->lmesh.snel;els++) {
- el = E->surf_element[j][els];
+ el = E->surf_element[CPPR][els];
elb = el - elz+1;
- velo_from_element(E,VV,j,elb,sphere_key);
+ velo_from_element(E,VV,CPPR,elb,sphere_key);
for(m=0;m<ends;m++) {
eub [m*dims ] = VV[1][m+1];
@@ -1059,7 +1059,7 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
eub [m*dims+2] = VV[3][m+1];
}
- velo_from_element(E,VV,j,el,sphere_key);
+ velo_from_element(E,VV,CPPR,el,sphere_key);
for(m=0;m<ends;m++) {
eu [m*dims ] = VV[1][m+1];
@@ -1070,22 +1070,22 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
/* The statement order is important:
elb must be executed before el when calling get_elt_f().
Otherwise, construct_c3x3matrix_el() would be skipped incorrectly. */
- get_elt_f(E,elb,eltfb,1,j);
- get_elt_f(E,el,eltf,1,j);
+ get_elt_f(E,elb,eltfb,1,CPPR);
+ get_elt_f(E,el,eltf,1,CPPR);
- get_elt_k(E,elb,eltkb,lev,j,1);
- get_elt_k(E,el,eltk,lev,j,1);
+ get_elt_k(E,elb,eltkb,lev,CPPR,1);
+ get_elt_k(E,el,eltk,lev,CPPR,1);
if (E->control.augmented_Lagr) {
- get_aug_k(E,elb,eltkb,lev,1);
- get_aug_k(E,el,eltk,lev,1);
+ get_aug_k(E,elb,eltkb,lev,CPPR);
+ get_aug_k(E,el,eltk,lev,CPPR);
}
// get_elt_g(E,elb,eltgb,lev,j);
// get_elt_g(E,el,eltg,lev,j);
for(m=0;m<dims*ends;m++) {
- res[m] = eltf[m] - E->elt_del[lev][j][el].g[m][0] * E->P[j][el-1];
- resb[m] = eltfb[m] - E->elt_del[lev][j][elb].g[m][0]* E->P[j][elb-1];
+ res[m] = eltf[m] - E->elt_del[lev][CPPR][el].g[m][0] * E->P[CPPR][el-1];
+ resb[m] = eltfb[m] - E->elt_del[lev][CPPR][elb].g[m][0]* E->P[CPPR][elb-1];
// res[m] = eltf[m] - eltg[m][0] * E->P[j][el];
// resb[m] = eltfb[m] - eltgb[m][0]* E->P[j][elb];
}
@@ -1102,36 +1102,36 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
if (m<=4) {
switch (m) {
case 1:
- nodes = E->sien[j][els].node[1];
+ nodes = E->sien[CPPR][els].node[1];
break;
case 2:
- nodes = E->sien[j][els].node[2];
+ nodes = E->sien[CPPR][els].node[2];
break;
case 3:
- nodes = E->sien[j][els].node[3];
+ nodes = E->sien[CPPR][els].node[3];
break;
case 4:
- nodes = E->sien[j][els].node[4];
+ nodes = E->sien[CPPR][els].node[4];
break;
}
- RL[j][nodes] += resb[(m-1)*dims+2];
+ RL[CPPR][nodes] += resb[(m-1)*dims+2];
}
else {
switch (m) {
case 5:
- nodes = E->sien[j][els].node[1];
+ nodes = E->sien[CPPR][els].node[1];
break;
case 6:
- nodes = E->sien[j][els].node[2];
+ nodes = E->sien[CPPR][els].node[2];
break;
case 7:
- nodes = E->sien[j][els].node[3];
+ nodes = E->sien[CPPR][els].node[3];
break;
case 8:
- nodes = E->sien[j][els].node[4];
+ nodes = E->sien[CPPR][els].node[4];
break;
}
- RU[j][nodes] += res[(m-1)*dims+2];
+ RU[CPPR][nodes] += res[(m-1)*dims+2];
}
} /* end for m */
}
@@ -1143,8 +1143,8 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
el = E->surf_element[j][els];
elb = el - elz+1;
- get_global_1d_shape_fn_L(E,el,&GM,&dGammax,1,j);
- get_global_1d_shape_fn_L(E,elb,&GMb,&dGammabx,0,j);
+ get_global_1d_shape_fn_L(E,el,&GM,&dGammax,1,CPPR);
+ get_global_1d_shape_fn_L(E,elb,&GMb,&dGammabx,0,CPPR);
for(m=1;m<=onedv;m++) {
eltTU[m-1] = 0.0;
@@ -1160,10 +1160,10 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
}
for (m=1;m<=onedv;m++) /* for bottom */
- SL[j][E->sien[j][els].node[m]] += eltTL[m-1];
+ SL[CPPR][E->sien[CPPR][els].node[m]] += eltTL[m-1];
for (m=1;m<=onedv;m++)
- SU[j][E->sien[j][els].node[m]] += eltTU[m-1];
+ SU[CPPR][E->sien[CPPR][els].node[m]] += eltTU[m-1];
}
@@ -1178,7 +1178,7 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
for (j=1;j<=E->sphere.caps_per_proc;j++)
for(i=1;i<=E->lmesh.nsf;i++)
- HB[j][i] = RL[j][i]/SL[j][i];
+ HB[CPPR][i] = RL[CPPR][i]/SL[CPPR][i];
}
/* for top topo */
if(E->parallel.me_loc[3] == E->parallel.nprocz-1) {
@@ -1189,15 +1189,15 @@ void get_CBF_topo(E,H,HB) /* call this only for top and bottom processors*
for (j=1;j<=E->sphere.caps_per_proc;j++)
for(i=1;i<=E->lmesh.nsf;i++)
- H[j][i] = RU[j][i]/SU[j][i];
+ H[CPPR][i] = RU[CPPR][i]/SU[CPPR][i];
}
free((void *)eltTU);
free((void *)eltTL);
for (j=1;j<=E->sphere.caps_per_proc;j++) {
- free((void *)SU[j]);
- free((void *)SL[j]);
- free((void *)RU[j]);
- free((void *)RL[j]);
+ free((void *)SU[CPPR]);
+ free((void *)SL[CPPR]);
+ free((void *)RU[CPPR]);
+ free((void *)RL[CPPR]);
}
return;
}
More information about the CIG-COMMITS
mailing list