[cig-commits] [commit] rajesh-petsc-schur: Fixed PETSc related allocation in Drive_solvers.c; results from this branch are again in agreement with master (8bdec2f)

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


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

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

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

commit 8bdec2f95d6d87ccd7739f43eb98c787033b98d9
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Fri Sep 19 11:00:30 2014 -0700

    Fixed PETSc related allocation in Drive_solvers.c; results from this branch are again in agreement with master


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

8bdec2f95d6d87ccd7739f43eb98c787033b98d9
 lib/Drive_solvers.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/Drive_solvers.c b/lib/Drive_solvers.c
index b2c6bd1..af87a39 100644
--- a/lib/Drive_solvers.c
+++ b/lib/Drive_solvers.c
@@ -89,16 +89,16 @@ void general_stokes_solver_setup(struct All_variables *E)
   E->pcshell_ctx.acc = 1e-6;
   E->pcshell_ctx.level = lev;
 
-  PetscMalloc( neq*sizeof(double), &E->mtx_del2_u.iData[1] );
-  PetscMalloc( neq*sizeof(double), &E->mtx_del2_u.oData[1] );
-  PetscMalloc( nel*sizeof(double), &E->mtx_grad_p.iData[1] );
-  PetscMalloc( neq*sizeof(double), &E->mtx_grad_p.oData[1] );
-  PetscMalloc( neq*sizeof(double), &E->mtx_div_u.iData[1] );
-  PetscMalloc( nel*sizeof(double), &E->mtx_div_u.oData[1] );
-  PetscMalloc( neq*sizeof(double), &E->mtx_div_rho_u.iData[1] );
-  PetscMalloc( npno*sizeof(double), &E->mtx_div_rho_u.oData[1] );
-  PetscMalloc( (E->lmesh.NEQ[lev])*sizeof(double), &E->pcshell_ctx.V[1] );
-  PetscMalloc( (E->lmesh.NEQ[lev])*sizeof(double), &E->pcshell_ctx.RR[1] );
+  PetscMalloc( neq*sizeof(double), &E->mtx_del2_u.iData );
+  PetscMalloc( neq*sizeof(double), &E->mtx_del2_u.oData );
+  PetscMalloc( nel*sizeof(double), &E->mtx_grad_p.iData );
+  PetscMalloc( neq*sizeof(double), &E->mtx_grad_p.oData );
+  PetscMalloc( neq*sizeof(double), &E->mtx_div_u.iData );
+  PetscMalloc( nel*sizeof(double), &E->mtx_div_u.oData );
+  PetscMalloc( neq*sizeof(double), &E->mtx_div_rho_u.iData );
+  PetscMalloc( npno*sizeof(double), &E->mtx_div_rho_u.oData );
+  PetscMalloc( (E->lmesh.NEQ[lev])*sizeof(double), &E->pcshell_ctx.V );
+  PetscMalloc( (E->lmesh.NEQ[lev])*sizeof(double), &E->pcshell_ctx.RR );
 
   // Create a Matrix shell for the K matrix
   MatCreateShell( PETSC_COMM_WORLD, 



More information about the CIG-COMMITS mailing list