Changeset 1192
- Timestamp:
- 07/01/09 08:09:42 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/InterpFromMesh2dx/InterpFromMesh2dx.cpp
r1189 r1192 17 17 int i,j; 18 18 int interpolation_type; 19 bool debug; 19 20 double area; 20 21 double area_1,area_2,area_3; … … 27 28 throw ErrorException(__FUNCT__,"nothing to be done according to the mesh given in input"); 28 29 } 30 31 /*Set debug to 1 if there are lots of elements*/ 32 debug=(bool)((double)nels_data*(double)nods_prime >= pow(10,9)); 29 33 30 34 /*figure out what kind of interpolation is needed*/ … … 53 57 54 58 /*Loop over the elements*/ 55 printf("\n interpolation progress: %5.2lf %%",0.0);59 if (debug) printf("\n interpolation progress: %5.2lf %%",0.0); 56 60 for (i=0;i<nels_data;i++){ 57 61 58 62 /*display current iteration*/ 59 if (fmod(i,100)==0){ 60 printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100); 61 } 63 if (debug && fmod(i,100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100); 62 64 63 65 /*if there is no point inside the domain, go to next iteration*/ … … 104 106 } 105 107 } 106 printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);108 if (debug) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0); 107 109 108 110 /*Assign output pointers:*/ -
issm/trunk/src/c/InterpFromMesh3dx/InterpFromMesh3dx.cpp
r1189 r1192 17 17 int i,j; 18 18 int interpolation_type; 19 bool debug; 19 20 double area; 20 21 double area_1,area_2,area_3; … … 28 29 throw ErrorException(__FUNCT__,"nothing to be done according to the mesh given in input"); 29 30 } 31 32 /*Set debug to 1 if there are lots of elements*/ 33 debug=(bool)((double)nels_data*(double)nods_prime >= pow(10,9)); 30 34 31 35 /*figure out what kind of interpolation is needed*/ … … 54 58 55 59 /*Loop over the elements*/ 56 printf("\n interpolation progress: %5.2lf %%",0.0);60 if (debug) printf("\n interpolation progress: %5.2lf %%",0.0); 57 61 for (i=0;i<nels_data;i++){ 58 62 59 63 /*display current iteration*/ 60 if (fmod(i,100)==0){ 61 printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100); 62 } 64 if (debug && fmod(i,100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100); 63 65 64 66 /*if there is no point inside the domain, go to next iteration*/ … … 114 116 } 115 117 } 116 printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);118 if (debug) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0); 117 119 118 120 /*Assign output pointers:*/
Note:
See TracChangeset
for help on using the changeset viewer.