Index: /issm/trunk/src/c/objects/ElementProperties.cpp
===================================================================
--- /issm/trunk/src/c/objects/ElementProperties.cpp	(revision 3383)
+++ /issm/trunk/src/c/objects/ElementProperties.cpp	(revision 3384)
@@ -23,5 +23,4 @@
 	
 	int i;
-
 
 	/*initialize to 0 every value: */
@@ -60,10 +59,17 @@
 
 	if(elementproperties_h)this->h=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->h=NULL;
 	if(elementproperties_s)this->s=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->s=NULL;
 	if(elementproperties_b)this->b=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->b=NULL;
 	if(elementproperties_k)this->k=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->k=NULL;
 	if(elementproperties_melting)this->melting=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->melting=NULL;
 	if(elementproperties_accumulation)this->accumulation=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->accumulation=NULL;
 	if(elementproperties_geothermalflux)this->geothermalflux=(double*)xmalloc(this->numnodes*sizeof(double));
+	else this->geothermalflux=NULL;
 
 	for(i=0;i<this->numnodes;i++){
@@ -324,10 +330,10 @@
 	int i;
 	
-	printf("   h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");
-	printf("   s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");
-	printf("   b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");
-	printf("   melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");
-	printf("   accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");
-	printf("   geothermalflux=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");
+	if (h)              {printf("   h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");}
+	if (s)              {printf("   s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");}
+	if (b)              {printf("   b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");}
+	if (melting)        {printf("   melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");}
+	if (accumulation)   {printf("   accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");}
+	printf("Pointer geothermal flux2= %p\n",this->geothermalflux);
 	printf("   friction_type: %i\n",friction_type);
 	printf("   p: %g\n",p);
Index: /issm/trunk/src/c/objects/Numericalflux.cpp
===================================================================
--- /issm/trunk/src/c/objects/Numericalflux.cpp	(revision 3383)
+++ /issm/trunk/src/c/objects/Numericalflux.cpp	(revision 3384)
@@ -392,4 +392,6 @@
 /*FUNCTION Numericalflux::PenaltyCreateKMatrixInternal {{{1*/
 void  Numericalflux::PenaltyCreateKMatrixInternal(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
+	double   start, finish;
+	start=MPI_Wtime();
 
 	/* local declarations */
@@ -492,6 +494,8 @@
 
 	/*Add Ke_gg to global matrix Kgg: */
+	start=MPI_Wtime();
 	MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES);
-
+	finish=MPI_Wtime();
+	printf("internal inserting K of edge %i matrix: %g\n",id,finish-start);
 
 	xfree((void**)&gauss_coords);
@@ -501,4 +505,6 @@
 /*FUNCTION Numericalflux::PenaltyCreateKMatrixBoundary {{{1*/
 void  Numericalflux::PenaltyCreateKMatrixBoundary(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
+	double   start, finish;
+	start=MPI_Wtime();
 
 	/* local declarations */
@@ -565,4 +571,5 @@
 		return;
 	}
+	printf("%i made it through!\n",id);
 
 	/* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
@@ -603,5 +610,8 @@
 
 	/*Add Ke_gg to global matrix Kgg: */
+	start=MPI_Wtime();
 	MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES);
+	finish=MPI_Wtime();
+	printf("boundary inserting K of edge %i matrix: %g\n",id,finish-start);
 
 	xfree((void**)&gauss_coords);
