Changeset 3384
- Timestamp:
- 04/05/10 08:59:20 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/ElementProperties.cpp
r3383 r3384 23 23 24 24 int i; 25 26 25 27 26 /*initialize to 0 every value: */ … … 60 59 61 60 if(elementproperties_h)this->h=(double*)xmalloc(this->numnodes*sizeof(double)); 61 else this->h=NULL; 62 62 if(elementproperties_s)this->s=(double*)xmalloc(this->numnodes*sizeof(double)); 63 else this->s=NULL; 63 64 if(elementproperties_b)this->b=(double*)xmalloc(this->numnodes*sizeof(double)); 65 else this->b=NULL; 64 66 if(elementproperties_k)this->k=(double*)xmalloc(this->numnodes*sizeof(double)); 67 else this->k=NULL; 65 68 if(elementproperties_melting)this->melting=(double*)xmalloc(this->numnodes*sizeof(double)); 69 else this->melting=NULL; 66 70 if(elementproperties_accumulation)this->accumulation=(double*)xmalloc(this->numnodes*sizeof(double)); 71 else this->accumulation=NULL; 67 72 if(elementproperties_geothermalflux)this->geothermalflux=(double*)xmalloc(this->numnodes*sizeof(double)); 73 else this->geothermalflux=NULL; 68 74 69 75 for(i=0;i<this->numnodes;i++){ … … 324 330 int i; 325 331 326 printf(" h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");327 printf(" s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");328 printf(" b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");329 printf(" melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");330 printf(" accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");331 printf(" geothermalflux=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");332 if (h) {printf(" h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");} 333 if (s) {printf(" s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");} 334 if (b) {printf(" b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");} 335 if (melting) {printf(" melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");} 336 if (accumulation) {printf(" accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");} 337 printf("Pointer geothermal flux2= %p\n",this->geothermalflux); 332 338 printf(" friction_type: %i\n",friction_type); 333 339 printf(" p: %g\n",p); -
issm/trunk/src/c/objects/Numericalflux.cpp
r3378 r3384 392 392 /*FUNCTION Numericalflux::PenaltyCreateKMatrixInternal {{{1*/ 393 393 void Numericalflux::PenaltyCreateKMatrixInternal(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 394 double start, finish; 395 start=MPI_Wtime(); 394 396 395 397 /* local declarations */ … … 492 494 493 495 /*Add Ke_gg to global matrix Kgg: */ 496 start=MPI_Wtime(); 494 497 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 495 498 finish=MPI_Wtime(); 499 printf("internal inserting K of edge %i matrix: %g\n",id,finish-start); 496 500 497 501 xfree((void**)&gauss_coords); … … 501 505 /*FUNCTION Numericalflux::PenaltyCreateKMatrixBoundary {{{1*/ 502 506 void Numericalflux::PenaltyCreateKMatrixBoundary(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 507 double start, finish; 508 start=MPI_Wtime(); 503 509 504 510 /* local declarations */ … … 565 571 return; 566 572 } 573 printf("%i made it through!\n",id); 567 574 568 575 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ … … 603 610 604 611 /*Add Ke_gg to global matrix Kgg: */ 612 start=MPI_Wtime(); 605 613 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 614 finish=MPI_Wtime(); 615 printf("boundary inserting K of edge %i matrix: %g\n",id,finish-start); 606 616 607 617 xfree((void**)&gauss_coords);
Note:
See TracChangeset
for help on using the changeset viewer.