[cig-commits] [commit] rajesh-petsc-schur: Corrected the signature of inject_vector and un_inject_vector (5072627)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:10:43 PST 2014


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

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

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

commit 5072627d428088855ae7ee582eb9d43ea53dbe19
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Fri Sep 19 10:03:24 2014 -0700

    Corrected the signature of inject_vector and un_inject_vector


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

5072627d428088855ae7ee582eb9d43ea53dbe19
 lib/Solver_multigrid.c | 14 +++++++-------
 lib/prototypes.h       |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/Solver_multigrid.c b/lib/Solver_multigrid.c
index 1b87bc3..8fdce41 100644
--- a/lib/Solver_multigrid.c
+++ b/lib/Solver_multigrid.c
@@ -87,7 +87,7 @@ void inject_scalar(E,start_lev,AU,AD)
 void inject_vector(E,start_lev,AU,AD)
      struct All_variables *E;
      int start_lev;
-     double **AU,**AD;  /* data on upper/lower mesh  */
+     double *AU,*AD;  /* data on upper/lower mesh  */
 
 {
     int i,j,m,el,node_coarse,node_fine,sl_minus,eqn_fine,eqn_coarse;
@@ -111,7 +111,7 @@ void inject_vector(E,start_lev,AU,AD)
           for (j=1;j<=dims;j++)    {
             eqn_fine   = E->ID[start_lev][CPPR][node_fine].doff[j];
             eqn_coarse = E->ID[sl_minus][CPPR][node_coarse].doff[j];
-            AD[CPPR][eqn_coarse] = AU[CPPR][eqn_fine];
+            AD[eqn_coarse] = AU[eqn_fine];
             }
           }
 }
@@ -126,7 +126,7 @@ void un_inject_vector(E,start_lev,AD,AU)
 
      struct All_variables *E;
      int start_lev;
-     double **AU,**AD;  /* data on upper/lower mesh  */
+     double *AU,*AD;  /* data on upper/lower mesh  */
 {
     int i,m;
     int el,node,node_plus;
@@ -143,7 +143,7 @@ void un_inject_vector(E,start_lev,AD,AU)
     assert(start_lev != E->mesh.levmax  /* un_injection */);
 
     for(i=1;i<neq;i++)
-      AU[CPPR][i]=0.0;
+      AU[i]=0.0;
 
       for(el=1;el<=nels;el++)
         for(i=1;i<=ENODES3D;i++)  {
@@ -156,9 +156,9 @@ void un_inject_vector(E,start_lev,AD,AU)
 	  eqn_plus1 = E->ID[sl_plus][CPPR][node_plus].doff[1];
 	  eqn_plus2 = E->ID[sl_plus][CPPR][node_plus].doff[2];
 	  eqn_plus3 = E->ID[sl_plus][CPPR][node_plus].doff[3];
-	  AU[CPPR][eqn_plus1] = AD[CPPR][eqn1];
-	  AU[CPPR][eqn_plus2] = AD[CPPR][eqn2];
-	  AU[CPPR][eqn_plus3] = AD[CPPR][eqn3];
+	  AU[eqn_plus1] = AD[eqn1];
+	  AU[eqn_plus2] = AD[eqn2];
+	  AU[eqn_plus3] = AD[eqn3];
 	  }
 }
 
diff --git a/lib/prototypes.h b/lib/prototypes.h
index 15b6cf4..6329a22 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -465,8 +465,8 @@ void assemble_forces_iterative(struct All_variables *);
 void set_mg_defaults(struct All_variables *);
 void mg_allocate_vars(struct All_variables *);
 void inject_scalar(struct All_variables *, int, float **, float **);
-void inject_vector(struct All_variables *, int, double **, double **);
-void un_inject_vector(struct All_variables *, int, double **, double **);
+void inject_vector(struct All_variables *, int, double *, double *);
+void un_inject_vector(struct All_variables *, int, double *, double *);
 void interp_vector(struct All_variables *, int, double *, double *);
 void project_viscosity(struct All_variables *);
 void inject_scalar_e(struct All_variables *, int, float **, float **);



More information about the CIG-COMMITS mailing list