[cig-commits] [commit] rajesh-petsc-schur: Correctly allocate neq elements for E->U and E->u1 (previously neq+1 elements were being allocated, though only 0:neq-1 were being used) (0974150)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:04:25 PST 2014


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

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

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

commit 0974150ef9a1b95fb8249fa4ba2c653ccad94168
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Wed Sep 10 13:34:24 2014 -0700

    Correctly allocate neq elements for E->U and E->u1 (previously neq+1
    elements were being allocated, though only 0:neq-1 were being used)


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

0974150ef9a1b95fb8249fa4ba2c653ccad94168
 lib/Instructions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Instructions.c b/lib/Instructions.c
index 6269f76..5377cdd 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -1186,8 +1186,8 @@ void allocate_velocity_vars(E)
     E->temp[j] = (double *) malloc((E->lmesh.neq+1)*sizeof(double));
     E->temp1[j] = (double *) malloc(E->lmesh.neq*sizeof(double));
     E->F[j] = (double *) malloc(E->lmesh.neq*sizeof(double));
-    E->U[j] = (double *) malloc((E->lmesh.neq+1)*sizeof(double));
-    E->u1[j] = (double *) malloc((E->lmesh.neq+1)*sizeof(double));
+    E->U[j] = (double *) malloc(E->lmesh.neq*sizeof(double));
+    E->u1[j] = (double *) malloc(E->lmesh.neq*sizeof(double));
 
 
     for(i=1;i<=E->mesh.nsd;i++) {



More information about the CIG-COMMITS mailing list