[cig-commits] [commit] rajesh-petsc-schur: replaced all occurences of the caps_per_proc iteration variable by CPPR in Sphere_harmonics.c (b698f77)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:06:15 PST 2014


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

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

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

commit b698f777eda359633e481ba37f310e4e24387fee
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Tue Sep 16 11:11:46 2014 -0700

    replaced all occurences of the caps_per_proc iteration variable by CPPR in Sphere_harmonics.c


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

b698f777eda359633e481ba37f310e4e24387fee
 lib/Sphere_harmonics.c | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/lib/Sphere_harmonics.c b/lib/Sphere_harmonics.c
index eaeb59f..e4cde31 100644
--- a/lib/Sphere_harmonics.c
+++ b/lib/Sphere_harmonics.c
@@ -122,17 +122,17 @@ void sphere_expansion(E,TG,sphc,sphs)
 
                     for(nint=1;nint<=onedvpoints[E->mesh.nsd];nint++)   {
                         for(d=1;d<=onedvpoints[E->mesh.nsd];d++)   {
-                            j = E->sien[m][es].node[d];
-                            sphc[p] += TG[m][E->sien[m][es].node[d]]
-                                * E->sphere.tablesplm[m][j][p]
-                                * E->sphere.tablescosf[m][j][mm]
+                            j = E->sien[CPPR][es].node[d];
+                            sphc[p] += TG[CPPR][E->sien[CPPR][es].node[d]]
+                                * E->sphere.tablesplm[CPPR][j][p]
+                                * E->sphere.tablescosf[CPPR][j][mm]
                                 * E->M.vpt[GMVINDEX(d,nint)]
-                                * E->surf_det[m][nint][es];
-                            sphs[p] += TG[m][E->sien[m][es].node[d]]
-                                * E->sphere.tablesplm[m][j][p]
-                                * E->sphere.tablessinf[m][j][mm]
+                                * E->surf_det[CPPR][nint][es];
+                            sphs[p] += TG[CPPR][E->sien[CPPR][es].node[d]]
+                                * E->sphere.tablesplm[CPPR][j][p]
+                                * E->sphere.tablessinf[CPPR][j][mm]
                                 * E->M.vpt[GMVINDEX(d,nint)]
-                                * E->surf_det[m][nint][es];
+                                * E->surf_det[CPPR][nint][es];
                         }
                     }
 
@@ -156,7 +156,7 @@ void debug_sphere_expansion(struct All_variables *E)
     float *TT[NCS], *sph_harm[2];
 
     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));
 
     /* sin coeff */
     sph_harm[0] = (float*)malloc(E->sphere.hindice*sizeof(float));
@@ -169,7 +169,7 @@ void debug_sphere_expansion(struct All_variables *E)
                 for(j=1;j<=E->lmesh.nox;j++)  {
                     node= k + (j-1)*E->lmesh.noz + (i-1)*E->lmesh.nox*E->lmesh.noz;
                     p = j + (i-1)*E->lmesh.nox;
-                    TT[m][p] = E->T[m][node];
+                    TT[CPPR][p] = E->T[CPPR][node];
                 }
 
         /* expand TT into spherical harmonics */
@@ -203,32 +203,32 @@ static void  compute_sphereh_table(E)
     
 
     for(m=1;m<=E->sphere.caps_per_proc;m++)  {
-        E->sphere.tablesplm[m]   = (double **) malloc((E->lmesh.nsf+1)*sizeof(double*));
-        E->sphere.tablescosf[m] = (double **) malloc((E->lmesh.nsf+1)*sizeof(double*));
-        E->sphere.tablessinf[m] = (double **) malloc((E->lmesh.nsf+1)*sizeof(double*));
+        E->sphere.tablesplm[CPPR]   = (double **) malloc((E->lmesh.nsf+1)*sizeof(double*));
+        E->sphere.tablescosf[CPPR] = (double **) malloc((E->lmesh.nsf+1)*sizeof(double*));
+        E->sphere.tablessinf[CPPR] = (double **) malloc((E->lmesh.nsf+1)*sizeof(double*));
 
         for (i=1;i<=E->lmesh.nsf;i++)   {
-            E->sphere.tablesplm[m][i]= (double *)malloc((E->sphere.hindice)*sizeof(double));
-            E->sphere.tablescosf[m][i]= (double *)malloc((E->output.llmax+1)*sizeof(double));
-            E->sphere.tablessinf[m][i]= (double *)malloc((E->output.llmax+1)*sizeof(double));
+            E->sphere.tablesplm[CPPR][i]= (double *)malloc((E->sphere.hindice)*sizeof(double));
+            E->sphere.tablescosf[CPPR][i]= (double *)malloc((E->output.llmax+1)*sizeof(double));
+            E->sphere.tablessinf[CPPR][i]= (double *)malloc((E->output.llmax+1)*sizeof(double));
         }
     }
 
     for(m=1;m<=E->sphere.caps_per_proc;m++)  {
         for (j=1;j<=E->lmesh.nsf;j++)  {
             node = j*E->lmesh.noz;
-            f=E->sx[m][2][node];
-            t=E->sx[m][1][node];
+            f=E->sx[CPPR][2][node];
+            t=E->sx[CPPR][1][node];
             for (mm=0;mm<=E->output.llmax;mm++)   {
 	      mmf = (double)(mm)*f;
-                E->sphere.tablescosf[m][j][mm] = cos( mmf );
-                E->sphere.tablessinf[m][j][mm] = sin( mmf );
+                E->sphere.tablescosf[CPPR][j][mm] = cos( mmf );
+                E->sphere.tablessinf[CPPR][j][mm] = sin( mmf );
             }
 
             for (ll=0;ll<=E->output.llmax;ll++)
                 for (mm=0;mm<=ll;mm++)  {
                     p = E->sphere.hindex[ll][mm];
-                    E->sphere.tablesplm[m][j][p] = modified_plgndr_a(ll,mm,t) ;
+                    E->sphere.tablesplm[CPPR][j][p] = modified_plgndr_a(ll,mm,t) ;
                 }
         }
     }



More information about the CIG-COMMITS mailing list