Changeset 12507 for issm/trunk-jpl/src/c/modules
- Timestamp:
- 06/22/12 10:28:55 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/modules
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
r12450 r12507 77 77 } 78 78 printf( "\n" ); 79 printf("Number of zeroes remaining: % 10ld",lines*samps-counter);79 printf("Number of zeroes remaining: %d",lines*samps-counter); 80 80 fflush( stdout ); 81 81 #endif … … 96 96 // n u m b e r o f z e r o e s r e m a i n i n g : 1 2 3 4 5 6 7 8 9 10 97 97 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" ); 98 printf("Number of zeroes remaining: % 10ld",lines*samps-counter);98 printf("Number of zeroes remaining: %d",lines*samps-counter); 99 99 fflush( stdout ); 100 100 #endif -
issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
r12493 r12507 124 124 double *y = gate->y; 125 125 int nods = gate->nods; 126 Vector *data_mesh = gate->data_mesh;126 Vector *data_mesh = gate->data_mesh; 127 127 double *data = gate->data; 128 128 double default_value = gate->default_value; … … 131 131 int N = gate->N; 132 132 133 bool debug = M*N>1? true:false; 134 debug = true; 135 133 136 /*partition loop across threads: */ 134 137 PartitionRange(&i0,&i1,nods,num_threads,my_thread); 135 138 for (i=i0;i<i1;i++) { 136 139 140 if(debug && my_thread==0) 141 _printLine_("\r interpolation progress: "<<setw(5)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%%"); 137 142 x_grid=*(x_mesh+i); 138 143 y_grid=*(y_mesh+i); -
issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp
r11695 r12507 17 17 bool debug; 18 18 int nels_data; 19 double * index_data=NULL;20 double * x_data=NULL;21 double * y_data=NULL;22 double * data=NULL;23 double xmin,xmax;24 double ymin,ymax;25 int nods_prime;26 Vector * data_prime=NULL;27 double * x_prime=NULL;28 double * y_prime=NULL;29 double * default_values=NULL;19 double *index_data = NULL; 20 double *x_data = NULL; 21 double *y_data = NULL; 22 double *data = NULL; 23 double xmin ,xmax; 24 double ymin ,ymax; 25 int nods_prime; 26 Vector *data_prime = NULL; 27 double *x_prime = NULL; 28 double *y_prime = NULL; 29 double *default_values = NULL; 30 30 int num_default_values; 31 double * incontour=NULL;31 double *incontour = NULL; 32 32 33 33 /*intermediary: */ … … 46 46 47 47 /*recover parameters :*/ 48 interpolation_type =gate->interpolation_type;49 debug =gate->debug;50 nels_data =gate->nels_data;51 index_data =gate->index_data;52 x_data =gate->x_data;53 y_data =gate->y_data;54 data =gate->data;55 xmin =gate->xmin;56 xmax =gate->xmax;57 ymin =gate->ymin;58 ymax =gate->ymax;59 nods_prime =gate->nods_prime;60 data_prime =gate->data_prime;61 x_prime =gate->x_prime;62 y_prime =gate->y_prime;63 default_values =gate->default_values;64 num_default_values =gate->num_default_values;65 incontour =gate->incontour;48 interpolation_type = gate->interpolation_type; 49 debug = gate->debug; 50 nels_data = gate->nels_data; 51 index_data = gate->index_data; 52 x_data = gate->x_data; 53 y_data = gate->y_data; 54 data = gate->data; 55 xmin = gate->xmin; 56 xmax = gate->xmax; 57 ymin = gate->ymin; 58 ymax = gate->ymax; 59 nods_prime = gate->nods_prime; 60 data_prime = gate->data_prime; 61 x_prime = gate->x_prime; 62 y_prime = gate->y_prime; 63 default_values = gate->default_values; 64 num_default_values = gate->num_default_values; 65 incontour = gate->incontour; 66 66 67 67 /*partition loop across threads: */ … … 69 69 70 70 /*Loop over the elements*/ 71 if (debug && my_thread==0) printf(" interpolation progress: %5.2lf %%",0.0);72 73 71 for (i=i0;i<i1;i++){ 74 72 75 73 /*display current iteration*/ 76 if (debug && my_thread==0 && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100*num_threads); 74 if (debug && my_thread==0 && fmod((double)i,(double)100)==0) 75 _printString_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%"); 77 76 78 77 /*if there is no point inside the domain, go to next iteration*/ … … 125 124 } 126 125 } 127 if (debug && my_thread==0) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);128 126 if(debug && my_thread==0) 127 _printLine_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 129 128 return NULL; 130 131 129 } -
issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
r12493 r12507 85 85 86 86 /*Loop over the elements*/ 87 if (debug) printf(" interpolation progress: %5.2lf %%",0.0);88 87 for (n=0;n<nels;n++){ 89 88 90 89 /*display current iteration*/ 91 if (debug && fmod((double)n,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)n/nels*100); 90 if (debug && fmod((double)n,(double)100)==0) 91 _printString_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<double(n)/double(nels)*100<<"%"); 92 92 93 93 /*Get extrema coordinates of current elements*/ … … 168 168 } 169 169 } 170 if (debug) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0); 170 if (debug) 171 _printLine_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 171 172 172 173 /*Assign output pointers:*/ -
issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
r12493 r12507 58 58 59 59 /*Loop over the elements*/ 60 if (debug) printf(" interpolation progress: %5.2lf %%",0.0);61 60 for (i=0;i<nels_data;i++){ 62 61 63 62 /*display current iteration*/ 64 if (debug && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100); 63 if (debug && fmod((double)i,(double)100)==0) 64 _printString_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<double(i)/double(nels_data)*100<<"%"); 65 65 66 66 /*Get extrema coordinates of current elements*/ … … 132 132 } 133 133 } 134 if (debug) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0); 134 if (debug) 135 _printLine_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 135 136 136 137 /*Assign output pointers:*/ -
issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
r12493 r12507 96 96 /*launch the thread manager with Krigingxt as a core: */ 97 97 LaunchThread(NearestNeighbort,(void*)&gate,num); 98 printf("\r interpolation progress: 100.00%%\n");98 _printLine_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 99 99 xDelete<double>(gate.percent); 100 100 } … … 115 115 /*launch the thread manager with Krigingxt as a core: */ 116 116 LaunchThread(idwt,(void*)&gate,num); 117 printf("\r interpolation progress: 100.00%%\n");117 _printLine_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 118 118 xDelete<double>(gate.percent); 119 119 } … … 135 135 /*launch the thread manager with Krigingxt as a core: */ 136 136 LaunchThread(Krigingxt,(void*)&gate,num); 137 printf("\r interpolation progress: 100.00%%\n");137 _printLine_("\r interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 138 138 xDelete<double>(gate.percent); 139 139 } … … 190 190 localpercent=percent[0]; 191 191 for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]); 192 printf("\r interpolation progress: %5.2lf%%",localpercent);192 _printString_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%"); 193 193 194 194 /*Kriging interpolation*/ … … 239 239 localpercent=percent[0]; 240 240 for(i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]); 241 printf("\r interpolation progress: %5.2lf%%",localpercent);241 _printString_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%"); 242 242 243 243 observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius); … … 287 287 localpercent=percent[0]; 288 288 for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]); 289 printf("\r interpolation progress: %5.2lf%%",localpercent);289 _printString_("\r interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%"); 290 290 291 291 observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power); -
issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp
r12450 r12507 45 45 46 46 /*Loop over the nodes*/ 47 if (my_thread==0) printf(" loop progress: %5.2lf %%",0.0);48 49 47 for (i=i0;i<i1;i++){ 50 48 51 49 /*display current iteration*/ 52 if (my_thread==0 && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nods*100*num_threads); 50 if (my_thread==0 && fmod((double)i,(double)100)==0) 51 _printString_("\r loop progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%"); 53 52 54 53 distance=mindistance+100; //make sure initialization respects min distance criterion. … … 70 69 } 71 70 } 72 if (my_thread==0) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0); 71 if (my_thread==0) 72 _printLine_("\r loop progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%"); 73 73 74 74 /*Free ressources:*/
Note:
See TracChangeset
for help on using the changeset viewer.