Changeset 3595
- Timestamp:
- 04/21/10 15:54:53 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/BuildNodeSetsx/PartitionSets.cpp
r3570 r3595 13 13 /*output: */ 14 14 Vec partitionb=NULL; 15 Vec partitionb_vec=NULL; 15 16 double* partitionb_local=NULL; 16 17 Vec partitionc=NULL; 18 Vec partitionc_vec=NULL; 17 19 double* partitionc_local=NULL; 18 20 … … 84 86 85 87 /*Now, using the local partitions for b and c, create parallel vectors: */ 86 VecCreateMPIWithArray(MPI_COMM_WORLD,bsize,PETSC_DECIDE,partitionb_local,&partitionb); 87 VecCreateMPIWithArray(MPI_COMM_WORLD,csize,PETSC_DECIDE,partitionc_local,&partitionc); 88 VecCreateMPIWithArray(MPI_COMM_WORLD,bsize,PETSC_DECIDE,partitionb_local,&partitionb_vec); 89 VecCreateMPIWithArray(MPI_COMM_WORLD,csize,PETSC_DECIDE,partitionc_local,&partitionc_vec); 90 91 VecAssemblyBegin(partitionb_vec); 92 VecAssemblyEnd(partitionb_vec); 93 94 VecAssemblyBegin(partitionc_vec); 95 VecAssemblyEnd(partitionc_vec); 96 97 /*Now we must duplicate these vectors because: 98 * 99 * Petsc specifies on http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/VecCreateMPIWithArray.html 100 * "PETSc does NOT free the array when the vector is destroyed via VecDestroy(). 101 * The user should not free the array until the vector is destroyed" 102 * 103 * The only way we can keep the vector partitionb_vec while destroying the array partitionb_local 104 * is to duplicate the vector and then destroy the initial vector as well as the array*/ 105 VecDuplicate(partitionb_vec,&partitionb); VecCopy(partitionb_vec,partitionb); VecFree(&partitionb_vec); xfree((void**)&partitionb_local); 106 VecDuplicate(partitionc_vec,&partitionc); VecCopy(partitionc_vec,partitionc); VecFree(&partitionc_vec); xfree((void**)&partitionc_local); 88 107 89 108 /*Free ressources:*/ … … 93 112 xfree((void**)&flags_c_local); 94 113 95 VecAssemblyBegin(partitionb);96 VecAssemblyEnd(partitionb);97 98 VecAssemblyBegin(partitionc);99 VecAssemblyEnd(partitionc);100 101 114 /*Assign output pointers*/ 102 115 *ppartitionb=partitionb; -
issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp
r3588 r3595 18 18 extern int my_rank; 19 19 20 _printf_(" Configuring elements...\n");20 //_printf_(" Configuring elements...\n"); 21 21 elements->Configure(elements,loads,nodes,vertices,materials,parameters); 22 _printf_(" Configuring loads...\n");22 //_printf_(" Configuring loads...\n"); 23 23 loads->Configure(elements,loads,nodes,vertices,materials,parameters); 24 _printf_(" Configuring nodes...\n");24 //_printf_(" Configuring nodes...\n"); 25 25 nodes->Configure(elements,loads,nodes,vertices,materials,parameters); 26 _printf_(" Configuring parameters...\n");26 //_printf_(" Configuring parameters...\n"); 27 27 parameters->Configure(elements,loads, nodes,vertices, materials,parameters); 28 28 -
issm/trunk/src/c/ContourToMeshx/ContourToMeshxt.cpp
r3332 r3595 62 62 /*Loop through all contours: */ 63 63 for (i=0;i<numcontours;i++){ 64 #ifdef _ISSM_DEBUG_65 printf("\nHandling contour %i/%i\n",i,numcontours);66 #endif67 64 contouri=*(contours+i); 68 65 numgrids=contouri->nods; -
issm/trunk/src/c/ContourToNodesx/ContourToNodesx.cpp
r3332 r3595 23 23 /*Loop through all contours: */ 24 24 for (i=0;i<numcontours;i++){ 25 #ifdef _ISSM_DEBUG_26 printf("\nHandling contour %i/%i\n",i,numcontours);27 #endif28 25 contouri=*(contours+i); 29 26 numgrids=contouri->nods; -
issm/trunk/src/c/DataSet/DataSet.cpp
r3570 r3595 179 179 } 180 180 181 #ifdef _ISSM_DEBUG_182 _printf_("Number of objects in dataset being demarshalled: %i\n",numobjects);183 #endif184 185 181 for(i=0;i<numobjects;i++){ 186 182 … … 1152 1148 Ranks(ranks); 1153 1149 1154 #ifdef _ISSM_DEBUG_1155 for(i=0;i<numberofobjects;i++){1156 _printf_("%i\n",ranks[i]);1157 }1158 #endif1159 1160 1150 /*We need to take the minimum rank for each vertex, and every cpu needs to get that result. That way, 1161 1151 * when we start building the dof list for all vertexs, a cpu can check whether its vertex already has been … … 1163 1153 * order of cpu rank. This is also why we initialized this array to num_procs.*/ 1164 1154 MPI_Allreduce ( (void*)ranks,(void*)minranks,numberofobjects,MPI_INT,MPI_MIN,MPI_COMM_WORLD); 1165 1166 #ifdef _ISSM_DEBUG_1167 for(i=0;i<numberofobjects;i++){1168 _printf_("%i\n",minranks[i]);1169 }1170 #endif1171 1155 1172 1156 /*Now go through all objects, and use minranks to flag which objects are cloned: */ -
issm/trunk/src/c/HoleFillerx/HoleFillerx.cpp
r3332 r3595 43 43 int imageoutsize; 44 44 45 #ifdef _ISSM_DEBUG_46 if ( smooth == 1 ){47 printf("Data patches will be SMOOTHED. \n");48 }49 if ( smooth == 0 ){50 printf("Data patches will NOT be smoothed. \n");51 }52 #endif53 54 45 /*^^^^^^^^^^^^^ Remove pixels close to the holes ^^^^^^^^^^^^^*/ 55 46 image2 = (double*) xmalloc( lines*samps*sizeof(double)); … … 92 83 #endif 93 84 94 #ifdef _ISSM_DEBUG_95 printf( "\n" );96 printf( "Iterations %5ld and %5ld.", count-1, count );97 fflush( stdout );98 #endif99 85 goto afterfirst2; 100 86 … … 115 101 printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" ); 116 102 printf("Number of zeroes remaining: %10ld",lines*samps-counter); 117 fflush( stdout );118 #endif119 120 #ifdef _ISSM_DEBUG_121 printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );122 printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );123 printf( "Iterations %5ld and %5ld.", count-1, count );124 103 fflush( stdout ); 125 104 #endif … … 366 345 } 367 346 368 #ifdef _ISSM_DEBUG_ 369 if ( !(i%100) ){ 370 fprintf(stdout, "\b\b\b\b\b\b%5ld ", i ); /* Count lines on output screen */ 371 fflush(stdout); 372 } 373 #endif 374 } 375 376 #ifdef _ISSM_DEBUG_ 377 fprintf(stdout, "\b\b\b\b\b\b%5ld ", lines ); 378 fflush(stdout); 379 #endif 380 347 } 348 381 349 382 350 there2: … … 388 356 389 357 time(&t2); 390 #ifdef _ISSM_DEBUG_391 printf ( "\n\nEnd "); printf( ctime(&t2) );392 printf( "\n Total time: ");393 printf( "%4.2f minutes. \n", difftime(t2,t1)/60 );394 #endif395 358 396 359 #ifdef _DEBUG2_ … … 402 365 end: 403 366 404 #ifdef _ISSM_DEBUG_405 printf( "Done.\a\n" );406 #endif407 408 367 /*Assign output pointers: */ 409 368 *pimageout=imageout; -
issm/trunk/src/c/MeshPartitionx/MeshPartitionx.cpp
r3332 r3595 81 81 } 82 82 } 83 84 #ifdef _ISSM_DEBUG_85 if(my_rank==0){86 for (i=0;i<numberofelements;i++){87 printf("El %i My rank %i\n",i+1,epart[i]);88 }89 }90 #endif91 83 92 84 /*Assign output pointer:*/ -
issm/trunk/src/c/ModelProcessorx/Partitioning.cpp
r3588 r3595 150 150 xfree((void**)&npart); 151 151 xfree((void**)&epart); 152 xfree((void**)&serial_bordervertices); 152 153 VecFree(&bordervertices); 153 154 -
issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp
r3461 r3595 155 155 param->SetStringArray(responsedescriptors,iomodel->numberofresponses); 156 156 parameters->AddObject(param); 157 158 #ifdef _ISSM_DEBUG_159 for(i=0;i<iomodel->numberofvariables;i++){160 _printf_("variable descriptor %s\n",variabledescriptors[i]);161 }162 163 for(i=0;i<iomodel->numberofresponses;i++){164 _printf_("response descriptor %s\n",responsedescriptors[i]);165 }166 #endif167 168 157 169 158 /*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */ -
issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp
r3567 r3595 307 307 #endif 308 308 309 #ifdef _ISSM_DEBUG_310 printf("Maximum rift penetration2: %g\n",max_penetration);311 #endif312 313 309 /*feed max_penetration to inputs: */ 314 310 inputs->Add("max_penetration",max_penetration); -
issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp
r3483 r3595 27 27 /*Now, figure out maximum value of K_gg, so that we can penalize it correctly: */ 28 28 MatNorm(Kgg,NORM_INFINITY,&kmax); 29 #ifdef _ISSM_DEBUG_30 _printf_(" K_gg infinity norm: %g\n",kmax);31 #endif32 29 33 30 /*Add penalties to stiffnesses, from loads: */ … … 46 43 } 47 44 48 #ifdef _ISSM_DEBUG_49 MatNorm(Kgg,NORM_INFINITY,&kmax2);50 _printf_(" K_gg infinity norm after penalties: %g\n",kmax2);51 #endif52 53 45 /*Assign output pointers:*/ 54 46 if(pkmax)*pkmax=kmax; -
issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp
r3570 r3595 68 68 model->FindParam(&qmu_npart,"qmu_npart"); 69 69 model->FindParam(&qmu_part,NULL,NULL,"qmu_part"); 70 #ifdef _ISSM_DEBUG_71 for(i=0;i<numresponses;i++){72 PetscSynchronizedPrintf(MPI_COMM_WORLD,"response descriptor %i: %s\n",i,responses_descriptors[i]);73 PetscSynchronizedFlush(MPI_COMM_WORLD);74 }75 #endif76 70 77 71 /*broadcast variables: only cpu 0 has correct values*/ … … 79 73 if(my_rank!=0)variables=(double*)xmalloc(numvariables*sizeof(double)); 80 74 MPI_Bcast(variables,numvariables,MPI_DOUBLE,0,MPI_COMM_WORLD); 81 82 #ifdef _ISSM_DEBUG_83 for(i=0;i<numvariables;i++){84 PetscSynchronizedPrintf(MPI_COMM_WORLD,"variable %i: %g\n",i,variables[i]);85 PetscSynchronizedFlush(MPI_COMM_WORLD);86 }87 #endif88 75 89 76 /*broadcast variables_descriptors: */ … … 102 89 } 103 90 104 #ifdef _ISSM_DEBUG_105 for(i=0;i<numvariables;i++){106 PetscSynchronizedPrintf(MPI_COMM_WORLD,"variable descriptor %i: %s value: %g\n",i,variables_descriptors[i],variables[i]);107 PetscSynchronizedFlush(MPI_COMM_WORLD);108 }109 #endif110 111 91 /*broadcast numresponses: */ 112 92 MPI_Bcast(&numresponses,1,MPI_INT,0,MPI_COMM_WORLD); 113 114 #ifdef _ISSM_DEBUG_115 for(i=0;i<numresponses;i++){116 PetscSynchronizedPrintf(MPI_COMM_WORLD,"variable descriptor %i: %s value: %g\n",i,responses_descriptors[i],responses[i]);117 PetscSynchronizedFlush(MPI_COMM_WORLD);118 }119 #endif120 121 93 122 94 _printf_("qmu iteration: %i\n",counter); -
issm/trunk/src/c/Solverx/Solverx.cpp
r3570 r3595 89 89 } 90 90 } 91 92 93 #ifdef _ISSM_DEBUG_94 KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);95 KSPGetInitialGuessNonzero(ksp,&flag);96 _printf_("User provided initial guess solution: %i\n",flag);97 #endif98 91 99 92 KSPSolve(ksp,pf,uf); … … 103 96 if (iteration_number<0){ 104 97 ISSMERROR("%s%i"," Solver diverged at iteration number: ",-iteration_number); 105 }106 else{107 #ifdef _ISSM_DEBUG_108 _printf_("%s%i%s\n","Solver converged after ",iteration_number," iterations");109 #endif110 98 } 111 99 -
issm/trunk/src/c/include/macros.h
r3570 r3595 18 18 #endif 19 19 20 /*Assertion macro*/ 20 /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/ 21 #ifdef _ISSM_DEBUG_ 21 22 #define ISSMASSERT(statement)\ 22 23 if (!(statement)) ISSMERROR("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement) 24 #else 25 #define ISSMASSERT(ignore)\ 26 ((void) 0) 27 #endif 23 28 24 29 /*The following macros hide the error exception handling in a matlab module. Just put -
issm/trunk/src/c/objects/Matice.cpp
r3567 r3595 250 250 } 251 251 } 252 #ifdef _ISSM_DEBUG_253 printf("Viscosity %lf\n",viscosity);254 #endif255 252 256 253 /*Return: */ … … 314 311 } 315 312 } 316 #ifdef _ISSM_DEBUG_317 printf("Viscosity %lf\n",viscosity3d);318 #endif319 313 320 314 /*Assign output pointers:*/ … … 382 376 } 383 377 384 #ifdef _ISSM_DEBUG_385 printf("Viscosity %lf\n",viscosity3d);386 #endif387 388 378 /*Assign output pointers:*/ 389 379 *pviscosity3d=viscosity3d; … … 436 426 } 437 427 438 #ifdef _ISSM_DEBUG_439 printf("viscosity_complement %lf\n",viscosity_complement);440 #endif441 442 428 /*Return: */ 443 429 *pviscosity_complement=viscosity_complement; -
issm/trunk/src/c/objects/Numericalflux.cpp
r3588 r3595 256 256 GetParameterValue(&vy, &vy_list[0],gauss_coord); 257 257 UdotN=vx*normal[0]+vy*normal[1]; 258 if (fabs(UdotN)<1.0e-9) printf("Edge number %i has a flux very small (u.n = %g ), which could lead to unaccurate results\n",id,UdotN); 259 //if (fabs(UdotN)>0 && fabs(UdotN)< 1.0e-7) UdotN= 1.0e-7; 260 //if (fabs(UdotN)<0 && fabs(UdotN)>-1.0e-7) UdotN=-1.0e-7; 258 if (fabs(UdotN)<1.0e-9 && analysis_type==Balancedthickness2AnalysisEnum) printf("Edge number %i has a flux very small (u.n = %g ), which could lead to unaccurate results\n",id,UdotN); 261 259 262 260 /*Get L and B: */ -
issm/trunk/src/c/objects/Numpar.cpp
r3567 r3595 45 45 /*FUNCTION Numpar::destructor {{{1*/ 46 46 Numpar::~Numpar(){ 47 48 /*Free the only pointer*/ 49 xfree((void**)&control_type); 50 47 51 return; 48 52 } -
issm/trunk/src/c/objects/ParameterInputs.cpp
r3570 r3595 361 361 } 362 362 363 #ifdef _ISSM_DEBUG_364 PetscSynchronizedPrintf(MPI_COMM_WORLD,"Parameter vetor:");365 PetscSynchronizedFlush(MPI_COMM_WORLD);366 for(k=0;k<numberofnodes;k++){367 PetscSynchronizedPrintf(MPI_COMM_WORLD," node %i value %g\n",k+1,parameter[k]);368 PetscSynchronizedFlush(MPI_COMM_WORLD);369 }370 #endif371 372 373 363 /*Add parameter to inputs: */ 374 364 this->Add(root,parameter,1,numberofnodes); -
issm/trunk/src/c/objects/Penta.cpp
r3582 r3595 1247 1247 1248 1248 GaussPenta( &num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &area_gauss_weights, &fourth_gauss_vert_coord,&vert_gauss_weights,order_area_gauss,num_vert_gauss); 1249 #ifdef _ISSM_DEBUG_1250 for (i=0;i<num_area_gauss;i++){1251 printf("Area Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(area_gauss_weights+i));1252 }1253 for (i=0;i<num_vert_gauss;i++){1254 printf("Vert Gauss coord %i: %lf Weight: %lf\n",i,*(fourth_gauss_vert_coord+i),*(vert_gauss_weights+i));1255 }1256 #endif1257 1249 1258 1250 /* Start looping on the number of gaussian points: */ … … 1773 1765 1774 1766 GaussPenta( &num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &area_gauss_weights, &fourth_gauss_vert_coord,&vert_gauss_weights,order_area_gauss,num_vert_gauss); 1775 #ifdef _ISSM_DEBUG_1776 for (i=0;i<num_area_gauss;i++){1777 printf("Area Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(area_gauss_weights+i));1778 }1779 for (i=0;i<num_vert_gauss;i++){1780 printf("Vert Gauss coord %i: %lf Weight: %lf\n",i,*(fourth_gauss_vert_coord+i),*(vert_gauss_weights+i));1781 }1782 #endif1783 1767 1784 1768 /* Start looping on the number of gaussian points: */ … … 2177 2161 2178 2162 GaussPenta( &num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &area_gauss_weights, &fourth_gauss_vert_coord,&vert_gauss_weights,order_area_gauss,num_vert_gauss); 2179 #ifdef _ISSM_DEBUG_2180 for (i=0;i<num_area_gauss;i++){2181 printf("Area Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(area_gauss_weights+i));2182 }2183 for (i=0;i<num_vert_gauss;i++){2184 printf("Vert Gauss coord %i: %lf Weight: %lf\n",i,*(fourth_gauss_vert_coord+i),*(vert_gauss_weights+i));2185 }2186 #endif2187 2163 2188 2164 /* Start looping on the number of gaussian points: */ … … 2209 2185 /* Get Jacobian determinant: */ 2210 2186 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss_coord); 2211 #ifdef _ISSM_DEBUG_2212 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet);2213 #endif2214 2187 2215 2188 /*Get nodal functions: */ … … 2697 2670 GetNodalFunctionsDerivatives(&dh1dh6[0][0],xyz_list, gauss_coord); 2698 2671 2699 #ifdef _ISSM_DEBUG_2700 for (i=0;i<numgrids;i++){2701 printf("Node %i dh/dx=%lf dh/dy=%lf dh/dz=%lf\n",i,dh1dh6[0][i],dh1dh6[1][i],dh1dh6[2][i]);2702 }2703 #endif2704 2705 2672 /*Build B: */ 2706 2673 for (i=0;i<numgrids;i++){ … … 2834 2801 /*Get dh1dh6 in actual coordinate system: */ 2835 2802 GetNodalFunctionsDerivatives(&dh1dh6[0][0],xyz_list, gauss_coord); 2836 2837 #ifdef _ISSM_DEBUG_2838 for (i=0;i<numgrids;i++){2839 printf("Node %i dh/dx=%lf dh/dy=%lf dh/dz=%lf\n",i,dh1dh6[0][i],dh1dh6[1][i],dh1dh6[2][i]);2840 }2841 #endif2842 2803 2843 2804 /*Build B: */ … … 2881 2842 /*Get dh1dh6 in actual coordinate system: */ 2882 2843 GetNodalFunctionsDerivatives(&dh1dh6[0][0],xyz_list, gauss_coord); 2883 2884 #ifdef _ISSM_DEBUG_2885 for (i=0;i<numgrids;i++){2886 printf("Node %i dh/dx=%lf dh/dy=%lf dh/dz=%lf\n",i,dh1dh6[0][i],dh1dh6[1][i],dh1dh6[2][i]);2887 }2888 #endif2889 2844 2890 2845 /*Build BPrime: */ … … 2983 2938 2984 2939 GetNodalFunctions(l1l6, gauss_coord); 2985 2986 #ifdef _ISSM_DEBUG_2987 for (i=0;i<6;i++){2988 printf("Node %i dh/dx=%lf dh/dy=%lf dh/dz=%lf \n",i,dh1dh7[0][i],dh1dh7[1][i]);2989 }2990 2991 #endif2992 2940 2993 2941 /*B_primeuild B_prime: */ … … 3063 3011 GetNodalFunctions(l1l6, gauss_coord); 3064 3012 3065 #ifdef _ISSM_DEBUG_3066 for (i=0;i<7;i++){3067 printf("Node %i dh/dx=%lf dh/dy=%lf dh/dz=%lf \n",i,dh1dh7[0][i],dh1dh7[1][i],dh1dh7[2][i]);3068 }3069 3070 #endif3071 3072 3013 /*Build B: */ 3073 3014 for (i=0;i<numgrids+1;i++){ … … 3216 3157 *(J+NDOF3*2+2)=SQRT3/12.0*(z1+z2-2*z3-z4-z5+2*z6)*eta+0.25*(z1-z2-z4+z5)*xi+0.25*(-z1+z5-z2+z4); 3217 3158 3218 #ifdef _ISSM_DEBUG_3219 for(i=0;i<3;i++){3220 for (j=0;j<3;j++){3221 printf("%lf ",*(J+NDOF3*i+j));3222 }3223 printf("\n");3224 }3225 #endif3226 3159 } 3227 3160 /*}}}*/ … … 3841 3774 GetB(&B[0][0], xyz_list, gauss_coord); 3842 3775 3843 #ifdef _ISSM_DEBUG_3844 printf("B for grid1 : [ %lf %lf \n",B[0][0],B[0][1]);3845 printf(" [ %lf %lf \n",B[1][0],B[1][1]);3846 printf(" [ %lf %lf ]\n",B[2][0],B[2][1]);3847 printf(" [ %lf %lf ]\n",B[3][0],B[3][1]);3848 printf(" [ %lf %lf ]\n",B[4][0],B[4][1]);3849 3850 printf("B for grid2 : [ %lf %lf \n",B[0][2],B[0][3]);3851 printf(" [ %lf %lf \n",B[1][2],B[1][3]);3852 printf(" [ %lf %lf ]\n",B[2][2],B[2][3]);3853 printf(" [ %lf %lf ]\n",B[3][2],B[3][3]);3854 printf(" [ %lf %lf ]\n",B[4][2],B[4][3]);3855 3856 printf("B for grid3 : [ %lf %lf \n", B[0][4],B[0][5]);3857 printf(" [ %lf %lf \n", B[1][4],B[1][5]);3858 printf(" [ %lf %lf ]\n",B[2][4],B[2][5]);3859 printf(" [ %lf %lf ]\n",B[3][4],B[3][5]);3860 printf(" [ %lf %lf ]\n",B[4][4],B[4][5]);3861 3862 printf("B for grid4 : [ %lf %lf \n", B[0][6],B[0][7]);3863 printf(" [ %lf %lf \n", B[1][6],B[1][7]);3864 printf(" [ %lf %lf ]\n",B[2][6],B[2][7]);3865 printf(" [ %lf %lf ]\n",B[3][6],B[3][7]);3866 printf(" [ %lf %lf ]\n",B[4][6],B[4][7]);3867 3868 printf("B for grid5 : [ %lf %lf \n", B[0][8],B[0][9]);3869 printf(" [ %lf %lf \n", B[1][8],B[1][9]);3870 printf(" [ %lf %lf ]\n",B[2][8],B[2][9]);3871 printf(" [ %lf %lf ]\n",B[3][8],B[3][9]);3872 printf(" [ %lf %lf ]\n",B[4][8],B[4][9]);3873 3874 printf("B for grid6 : [ %lf %lf \n", B[0][10],B[0][11]);3875 printf(" [ %lf %lf \n", B[1][10],B[1][11]);3876 printf(" [ %lf %lf ]\n",B[2][10],B[2][11]);3877 printf(" [ %lf %lf ]\n",B[3][10],B[3][11]);3878 printf(" [ %lf %lf ]\n",B[4][10],B[4][11]);3879 3880 #endif3881 3882 3776 /*Multiply B by velocity, to get strain rate: */ 3883 3777 MatrixMultiply( &B[0][0],5,NDOF2*numgrids,0, -
issm/trunk/src/c/objects/Riftfront.cpp
r3570 r3595 604 604 *contact slip friction. */ 605 605 606 #ifdef _ISSM_DEBUG_607 printf("Dealing with grid pair (%i,%i)\n",nodes[0]->GetId(),nodes[1]->GetId());608 #endif609 610 606 /*Recover input parameters: */ 611 607 inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes); 612 608 if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts"); 613 609 thickness=h[0]; 614 615 #ifdef _ISSM_DEBUG_616 printf("Thickness at grid (%i,%i): %lg\n",nodes[0]->GetId(),nodes[1]->GetID(),thickness);617 #endif618 610 619 611 /*From Peter Wriggers book (Computational Contact Mechanics, p191): */ … … 708 700 * and we want to avoid zigzagging of the loads, we want lump the loads onto grids, not onto surfaces between grids.:*/ 709 701 710 #ifdef _ISSM_DEBUG_711 _printf_("Grids (%i,%i) are free of constraints\n",nodes[0]->GetId(),nodes[1]->GetID());712 #endif713 714 702 /*Ok, to compute the pressure, we are going to need material properties, thickness and bed for the two grids. We assume those properties to 715 703 * be the same across the rift.: */ -
issm/trunk/src/c/objects/Tria.cpp
r3594 r3595 511 511 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ 512 512 GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2); 513 514 #ifdef _ISSM_DEBUG_515 for (i=0;i<num_gauss;i++){516 printf("Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(gauss_weights+i));517 }518 #endif519 513 520 514 /* Start looping on the number of gaussian points: */ … … 3804 3798 /* Get Jacobian determinant: */ 3805 3799 GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3); 3806 #ifdef _ISSM_DEBUG_3807 printf("Element id %i Jacobian determinant: %g\n",GetId(),Jdet);3808 #endif3809 3800 3810 3801 /* Get nodal functions value at gaussian point:*/ … … 3932 3923 GetNodalFunctionsDerivatives(&dh1dh3[0][0],xyz_list, gauss_l1l2l3); 3933 3924 3934 #ifdef _ISSM_DEBUG_3935 for (i=0;i<3;i++){3936 printf("Node %i dh/dx=%lf dh/dy=%lf \n",i,dh1dh3[0][i],dh1dh3[1][i]);3937 }3938 #endif3939 3940 3925 /*Build B: */ 3941 3926 for (i=0;i<numgrids;i++){ … … 3972 3957 /*Get dh1dh2dh3 in actual coordinate system: */ 3973 3958 GetNodalFunctions(&l1l2l3[0],gauss_l1l2l3); 3974 3975 #ifdef _ISSM_DEBUG_3976 for (i=0;i<3;i++){3977 printf("Node %i h=%lf \n",i,l1l2l3[i]);3978 }3979 #endif3980 3959 3981 3960 /*Build B_prog: */ … … 4556 4535 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ 4557 4536 GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 4); 4558 #ifdef _ISSM_DEBUG_4559 for (i=0;i<num_gauss;i++){4560 printf("Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(gauss_weights+i));4561 }4562 #endif4563 4537 4564 4538 /* Start looping on the number of gaussian points: */ … … 4590 4564 /* Get nodal functions value at gaussian point:*/ 4591 4565 GetNodalFunctions(l1l2l3, gauss_l1l2l3); 4592 #ifdef _ISSM_DEBUG_4593 printf("viscositycomp %g thickness %g dvx [%g %g] dvy [%g %g] dadjx [%g %g] dadjy[%g %g]\n",viscosity_complement,thickness,dvx[0],dvx[1],dvy[0],dvy[1],dadjx[0],dadjx[1],dadjy[0],dadjy[1]);4594 #endif4595 4566 4596 4567 /*Get nodal functions derivatives*/ … … 4797 4768 GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3); 4798 4769 GetParameterValue(&drag, &this->properties.k[0],gauss_l1l2l3); 4799 #ifdef _ISSM_DEBUG_4800 printf("Drag complement: %20.20lf Drag: %20.20lf\n",alpha_complement,drag);4801 #endif4802 4770 4803 4771 /*recover lambda and mu: */ 4804 4772 GetParameterValue(&lambda, &adjx_list[0],gauss_l1l2l3); 4805 4773 GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3); 4806 #ifdef _ISSM_DEBUG_4807 printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu);4808 #endif4809 4774 4810 4775 /*recover vx and vy: */ 4811 4776 GetParameterValue(&vx, &vx_list[0],gauss_l1l2l3); 4812 4777 GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3); 4813 #ifdef _ISSM_DEBUG_4814 printf("Velocity vector %20.20lf %20.20lf\n",vx,vy);4815 #endif4816 4778 4817 4779 /* Get Jacobian determinant: */ 4818 4780 GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3); 4819 #ifdef _ISSM_DEBUG_ 4820 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet); 4821 #endif 4822 4781 4823 4782 /* Get nodal functions value at gaussian point:*/ 4824 4783 GetNodalFunctions(l1l2l3, gauss_l1l2l3); … … 5031 4990 GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3); 5032 4991 GetParameterValue(&drag, &this->properties.k[0],gauss_l1l2l3); 5033 #ifdef _ISSM_DEBUG_5034 printf("Drag complement: %20.20lf Drag: %20.20lf\n",alpha_complement,drag);5035 #endif5036 4992 5037 4993 /*recover lambda mu and xi: */ … … 5039 4995 GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3); 5040 4996 GetParameterValue(&xi, &adjz_list[0],gauss_l1l2l3); 5041 #ifdef _ISSM_DEBUG_5042 printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu);5043 #endif5044 4997 5045 4998 /*recover vx vy and vz: */ … … 5047 5000 GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3); 5048 5001 GetParameterValue(&vz, &vz_list[0],gauss_l1l2l3); 5049 #ifdef _ISSM_DEBUG_5050 printf("Velocity vector %20.20lf %20.20lf\n",vx,vy);5051 5052 /*Get normal vecyor to the bed */5053 SurfaceNormal(&surface_normal[0],xyz_list);5054 5055 bed_normal[0]=-surface_normal[0]; //Program is for surface, so the normal to the bed is the opposite of the result5056 bed_normal[1]=-surface_normal[1];5057 bed_normal[2]=-surface_normal[2];5058 #endif5059 5002 5060 5003 /* Get Jacobian determinant: */ 5061 5004 GetJacobianDeterminant3d(&Jdet, &xyz_list[0][0],gauss_l1l2l3); 5062 #ifdef _ISSM_DEBUG_5063 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet);5064 #endif5065 5005 5066 5006 /* Get nodal functions value at gaussian point:*/ -
issm/trunk/src/c/parallel/balancedthickness.cpp
r3588 r3595 140 140 delete processedresults; 141 141 delete results; 142 delete model; 142 143 delete inputs; 143 144 -
issm/trunk/src/c/parallel/diagnostic.cpp
r3567 r3595 173 173 xfree((void**)&u_g_obs); 174 174 xfree((void**)&weights); 175 xfree((void**)&control_type); 175 176 delete model; 176 177 delete inputs; -
issm/trunk/src/c/parallel/prognostic.cpp
r3567 r3595 25 25 Model* model=NULL; 26 26 27 Vec u_g=NULL;28 27 double* u_g_serial=NULL; 29 28 double* h_g_initial=NULL; … … 141 140 142 141 /*Free ressources:*/ 142 xfree((void**)&u_g_serial); 143 xfree((void**)&h_g_initial); 144 xfree((void**)&melting_g); 145 xfree((void**)&accumulation_g); 143 146 delete processedresults; 144 147 delete results; -
issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp
r3570 r3595 59 59 nprof++; 60 60 } 61 #ifdef _ISSM_DEBUG_62 printf("Number of profiles in domain outline file: %i\n",nprof);63 #endif64 61 65 62 /*Allocate and initialize all the profiles: */ … … 113 110 fclose(fid); 114 111 115 116 #ifdef _ISSM_DEBUG_117 for (i=0;i<nprof;i++){118 printf("Profile #%i\n",i);119 x=pprofx[i];120 y=pprofy[i];121 for (j=0;j<profngrids[i];j++){122 printf(" %lf %lf\n",x[j],y[j]);123 }124 }125 #endif126 127 128 112 cleanupandreturn: 129 113 /*Free ressources: */ -
issm/trunk/src/c/shared/Sorting/binary_search.cpp
r3332 r3595 37 37 else{ 38 38 while((beg <= end) && (*mid != target)){ 39 #ifdef _ISSM_DEBUG_40 printf("1: %i %i %i\n",*beg,*mid,*(end-1));41 #endif42 39 // is the target in lower or upper half? 43 40 if (target < *mid) { … … 49 46 mid = beg + (end-beg)/2; //new middle 50 47 } 51 #ifdef _ISSM_DEBUG_52 printf("2: %i %i %i\n",*beg,*mid,*(end-1));53 #endif54 48 } 55 49 -
issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp
r3335 r3595 161 161 if (el2!=-1){ 162 162 /*el and el2 are on a segment rift, facing one another, plug them into riftsegments_uncompressed: */ 163 #ifdef _ISSM_DEBUG_164 printf("Elements %i and %i are on a rift\n",el+1,el2+1);165 #endif166 163 *(riftsegments_uncompressed+5*i+0)=1; 167 164 *(riftsegments_uncompressed+5*i+1)=el; … … 186 183 } 187 184 188 #ifdef _ISSM_DEBUG_189 for (i=0;i<nriftsegs;i++){190 printf("Elements %i and %i are on a rift, joined by grids %i and %i\n",*(riftsegments+4*i+0)+1,*(riftsegments+4*i+1)+1,*(riftsegments+4*i+2),*(riftsegments+4*i+3));191 }192 #endif193 185 xfree((void**)&riftsegments_uncompressed); 194 186 … … 217 209 /*Build a list of all the elements connected to this grid: */ 218 210 GridElementsList(&GridElements,&NumGridElements,grid,index,nel); 219 #ifdef _ISSM_DEBUG_ 220 printf("Connected elements for grid %i\n",grid); 221 for (k=0;k<NumGridElements;k++){ 222 printf("El %i\n",GridElements[k]+1); 223 } 224 #endif 225 211 226 212 /*Figure out the list of elements that are on the same side of the rift. To do so, we start from one 227 213 * side of the rift and keep rotating in the same direction:*/ … … 232 218 done rotating*/ 233 219 GridElementListOnOneSideOfRift[1]=*(riftsegments+4*segmentnumber+1); 234 #ifdef _ISSM_DEBUG_235 printf("Starting with elements %i and %i for grid %i\n",GridElementListOnOneSideOfRift[0]+1,GridElementListOnOneSideOfRift[1]+1,grid);236 #endif237 220 counter=1; 238 221 for (;;){ … … 240 223 * equal to GridElementListOnOneSideOfRift[counter-1]*/ 241 224 for (k=0;k<NumGridElements;k++){ 242 #ifdef _ISSM_DEBUG_243 printf("k: %i GridElements[k]: %i GridElementListOnOneSideOfRift[counter-1]: %i GridElementListOnOneSideOfRift[counter] %i Neighboor %i\n",k,GridElements[k]+1,244 GridElementListOnOneSideOfRift[counter-1]+1,GridElementListOnOneSideOfRift[counter]+1,IsNeighbor(GridElements[k],GridElementListOnOneSideOfRift[counter],index));245 #endif246 225 if(IsNeighbor(GridElements[k],GridElementListOnOneSideOfRift[counter],index)){ 247 226 /*Verify this element is not already in our list of element on the same side of the rift: */ … … 268 247 GridElementListOnOneSideOfRift[l]=GridElementListOnOneSideOfRift[l+1]; 269 248 } 270 #ifdef _ISSM_DEBUG_271 printf("Grid %i is owned by the following elements on the same side of the rift: \n",grid);272 for (l=0;l<NumGridElementListOnOneSideOfRift;l++){273 printf("%i ",GridElementListOnOneSideOfRift[l]+1);274 }275 printf("\n");276 #endif277 249 break; 278 250 }// for (;;) … … 315 287 for (j=0;j<nsegs;j++){ 316 288 if (*(segments+3*j+2)==(el1+1)){ 317 #ifdef _ISSM_DEBUG_318 printf("Segment %i is the same as rift segment %i\n",j,i);319 #endif320 289 /*segment j is the same as rift segment i.Let's update segments[j][:] using element el1 and the corresponding rift segment. 321 290 *Because riftsegments does not represent a list of rift segments anymore (it got heavily modified in SplitElementsForRifts, … … 350 319 } 351 320 if (*(segments+3*j+2)==(el2+1)){ 352 #ifdef _ISSM_DEBUG_353 printf("Segment %i is the same as rift segment %i\n",j,i);354 #endif355 321 /*segment j is the same as rift segment i.*/ 356 322 /*Let's update segments[j][:] using element el2 and the corresponding rift segment: */ … … 440 406 int n; 441 407 int el=-1; 442 #ifdef _ISSM_DEBUG_443 printf("Looking for %lf %lf\n",A,B);444 #endif445 408 for (n=0;n<nel;n++){ 446 409 if (((*(index+3*n+0)==A) || (*(index+3*n+1)==A) || (*(index+3*n+2)==A) ) && ((*(index+3*n+0)==B) || (*(index+3*n+1)==B) || (*(index+3*n+2)==B))){ 447 410 el=n; 448 #ifdef _ISSM_DEBUG_449 printf("Found them: %lf %lf %lf\n",*(index+3*n+0),*(index+3*n+1),*(index+3*n+2));450 #endif451 411 break; 452 412 } … … 921 881 } 922 882 923 #ifdef _ISSM_DEBUG_924 printf("Tips for rift#%i (%i-%i)\n",i,tip1,tip2);925 #endif926 883 /*Record tips in riftstips: */ 927 884 *(riftstips+2*i+0)=(double)tip1; … … 960 917 } 961 918 962 #ifdef _ISSM_DEBUG_963 for (j=0;j<numsegs;j++){964 printf("%i\n",order[j]);965 }966 #endif967 968 919 /*Using the order vector, and the riftsegments_copy and riftspairs_copy, reorder the segments and the pairs: */ 969 920 for (j=0;j<numsegs;j++){ -
issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp
r3332 r3595 62 62 upper_row--; 63 63 range=upper_row-lower_row+1; 64 #ifdef _ISSM_DEBUG_ 65 PetscSynchronizedPrintf(MPI_COMM_WORLD,"My rank %i Range %i",my_rank,range); 66 PetscSynchronizedFlush(MPI_COMM_WORLD); 67 #endif 68 64 69 65 count=0; 70 66 if (range){ … … 84 80 /*Now each node has a node_rows vectors holding which rows they should extract from matrixA. Create an Index Set from node_rows.*/ 85 81 ISCreateGeneral(MPI_COMM_WORLD,count,node_rows,&row_index); 86 #ifdef _ISSM_DEBUG_87 ISView(row_index,PETSC_VIEWER_STDOUT_WORLD);88 #endif89 82 90 83 /*Same deal for columns*/ … … 94 87 } 95 88 ISCreateGeneral(MPI_COMM_WORLD,col_partition_vector_size,node_cols,&col_index); 96 #ifdef _ISSM_DEBUG_97 ISView(col_index,PETSC_VIEWER_STDOUT_WORLD);98 #endif99 89 100 90 /*Call MatGetSubMatrix*/ -
issm/trunk/src/c/toolkits/petsc/patches/MatlabMatrixToDoubleMatrix.cpp
r1904 r3595 86 86 } 87 87 88 #ifdef _ISSM_DEBUG_89 for(i=0;i<rows;i++){90 for(j=0;j<cols;j++){91 printf("%g ",*(matrix+cols*i+j));92 }93 printf("\n");94 }95 #endif96 97 88 } 98 89 -
issm/trunk/src/c/toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp
r2042 r3595 75 75 else{ 76 76 77 78 77 /*Dealing with dense matrix: recover pointer and size: */ 79 78 mxmatrix_ptr=(double*)mxGetPr(mxmatrix); 80 79 rows=mxGetM(mxmatrix); 81 80 cols=mxGetN(mxmatrix); 82 83 #ifdef _ISSM_DEBUG_84 for(i=0;i<rows;i++){85 for(j=0;j<cols;j++){86 printf("%g ",*(mxmatrix_ptr+cols*j+i));87 }88 printf("\n");89 }90 #endif91 81 92 82 /*transpose, as Petsc now does not allows MAT_COLUMN_ORIENTED matrices in MatSetValues: */ -
issm/trunk/src/c/toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp
r2042 r3595 85 85 MatGetRow(matrix,i,&ncols,&columns,&column_values); 86 86 87 #ifdef _ISSM_DEBUG_88 for(j=0;j<ncols;j++){89 printf("%i %i: %g\n",i,columns[j],column_values[j]);90 }91 #endif92 93 87 /*copy values: */ 94 88 if(ncols)memcpy( val+j, column_values,ncols*sizeof(double)); -
issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp
r3570 r3595 33 33 VecGetSize(B,&MB); 34 34 35 #ifdef _ISSM_DEBUG_36 OutputServerMessages(0,0,"\n%s%s\n",STROFFSET,"Row partition vector:");37 if (my_rank==0){38 int i;39 for (i=0;i<row_partition_vector_size;i++){40 OutputServerMessages(0,0,"%s%lf\n",STROFFSET,*(row_partition_vector+i));41 }42 }43 #endif44 45 35 /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */ 46 36 if ( (row_partition_size !=MB) ){ … … 72 62 VecAssemblyEnd(A); 73 63 74 #ifdef _ISSM_DEBUG_75 _printf_("Vector B:\n");76 fflush(stdout);77 VecView(B,PETSC_VIEWER_STDOUT_WORLD);78 _printf_("Merge into vector A:\n");79 fflush(stdout);80 VecView(A,PETSC_VIEWER_STDOUT_WORLD);81 #endif82 83 64 /*Free ressources:*/ 84 65 xfree((void**)&idxm); -
issm/trunk/src/c/toolkits/petsc/patches/VecPartition.cpp
r3332 r3595 54 54 upper_row--; 55 55 range=upper_row-lower_row+1; 56 #ifdef _ISSM_DEBUG_57 PetscSynchronizedPrintf(MPI_COMM_WORLD,"My rank %i Range %i\n",my_rank,range);58 PetscSynchronizedFlush(MPI_COMM_WORLD);59 #endif60 56 61 57 if (range){ … … 81 77 values=NULL; 82 78 } 83 84 #ifdef _ISSM_DEBUG_85 PetscSynchronizedPrintf(MPI_COMM_WORLD,"My rank: %i My count: %i node_rows: %p values: %p\n",my_rank,count,node_rows,values);86 PetscSynchronizedFlush(MPI_COMM_WORLD);87 #endif88 79 89 80 if (count){ … … 115 106 VecAssemblyBegin(outvector); 116 107 VecAssemblyEnd(outvector); 117 118 108 119 109 } 120 121 #ifdef _ISSM_DEBUG_122 _printf_("Vector A:\n");123 fflush(stdout);124 VecView(vectorA,PETSC_VIEWER_STDOUT_WORLD);125 _printf_("Partition of vector A:\n");126 fflush(stdout);127 VecView(outvector,PETSC_VIEWER_STDOUT_WORLD);128 #endif129 110 130 111 /*Assign output pointers:*/ -
issm/trunk/src/c/toolkits/petsc/patches/VecToMPISerial.cpp
r1904 r3595 64 64 if (my_rank==0){ 65 65 MPI_Recv(buffer,3,MPI_INT,i,1,MPI_COMM_WORLD,&status); 66 #ifdef _ISSM_DEBUG_67 _printf_("Received from node %i: %i-%i\n",buffer[0],buffer[1],buffer[2]);68 #endif69 66 if (buffer[2])MPI_Recv(gathered_vector+buffer[1],buffer[2],MPI_DOUBLE,i,1,MPI_COMM_WORLD,&status); 70 67 } -
issm/trunk/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp
r3332 r3595 35 35 *pnprows=nprows; 36 36 *pnpcols=npcols; 37 #ifdef _ISSM_DEBUG_38 _printf_("Decomposition: %i-%i\n",nprows,npcols);39 #endif40 37 41 38 } … … 51 48 for (i=0;i<input;i++){ 52 49 SmallestPrimeFactor(&prime_factor,*(decomp+i)); 53 #ifdef _ISSM_DEBUG_54 _printf_("Smallest prime factor for term %i : %i\n",i,prime_factor);55 #endif56 50 if (prime_factor==*(decomp+i)){ 57 51 *pdecomp_size=i; … … 63 57 } 64 58 } 65 #ifdef _ISSM_DEBUG_66 _printf_("Prime factor decomposition for integer %i: \n",input);67 for(i=0;i<*pdecomp_size;i++){68 _printf_("%i ",*(decomp+i));69 }70 #endif71 59 72 60 *pdecomp=decomp; -
issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
r3332 r3595 118 118 PLA_API_end(); 119 119 120 #ifdef _ISSM_DEBUG_121 PLA_Global_show("Matrix A",a," %lf","Done with A");122 MatView(*A,PETSC_VIEWER_STDOUT_WORLD);123 #endif124 125 120 /*Call the plapack invert routine*/ 126 121 PLA_General_invert(PLA_METHOD_INV,a); … … 129 124 MatGetType(*A,&type); 130 125 PlapackToPetsc(inv_A,local_mA,local_nA,mA,nA,type,a,templ,nprows,npcols,nb); 131 132 #ifdef _ISSM_DEBUG_133 PLA_Global_show("Inverse of A",a," %lf","Done...");134 MatView(*inv_A,PETSC_VIEWER_STDOUT_WORLD);135 #endif136 126 137 127 /*Free ressources:*/
Note:
See TracChangeset
for help on using the changeset viewer.