Changeset 12515
- Timestamp:
- 06/22/12 16:56:14 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 82 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Container/DataSet.cpp
r12495 r12515 135 135 if(this==NULL)_error2_("trying to echo a NULL dataset"); 136 136 137 _printf_(true,"DataSet echo: %i objects\n",objects.size());137 if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects"); 138 138 139 139 for ( object=objects.begin() ; object < objects.end(); object++ ){ … … 152 152 if(this==NULL)_error2_("trying to echo a NULL dataset"); 153 153 154 _printf_(true,"DataSet echo: %i objects\n",objects.size());154 if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects"); 155 155 156 156 for ( object=objects.begin() ; object < objects.end(); object++ ){ -
issm/trunk-jpl/src/c/Container/Observations.cpp
r12493 r12515 73 73 74 74 /*Initialize Quadtree*/ 75 _printf_(true,"Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth);75 if(true) _pprintString_("Generating quadtree with a maximum box size " << minlength << " (depth=" << maxdepth << ")... "); 76 76 this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth); 77 77 … … 103 103 } 104 104 } 105 _printf_(true,"done\n");106 _printf_(true,"Initial number of observations: %i\n",n);107 _printf_(true," Final number of observations: %i\n",this->quadtree->NbObs);105 if(true) _pprintLine_("done"); 106 if(true) _pprintLine_("Initial number of observations: " << n); 107 if(true) _pprintLine_(" Final number of observations: " << this->quadtree->NbObs); 108 108 } 109 109 /*}}}*/ -
issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp
r12493 r12515 176 176 else if(mxIsClass(prhs[0],"cell")) option=(Option*)OptionCellParse(name,prhs); 177 177 else { 178 _printf_(true," Converting value of option \"%s\" from unrecognized class \"%s\" to class \"%s\".\n",name,mxGetClassName(prhs[0]),"struct");178 if(true) _pprintLine_(" Converting value of option \"" << name << "\" from unrecognized class \"" << mxGetClassName(prhs[0]) << "\" to class \"" << "struct" << "\"."); 179 179 if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) { 180 180 option=(Option*)OptionStructParse(name,(const mxArray**)lhs); -
issm/trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp
r9761 r12515 25 25 parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 26 26 27 _printf_(VerboseMProcessor()," Configuring elements...\n");27 if(VerboseMProcessor()) _pprintLine_(" Configuring elements..."); 28 28 for (i=0;i<elements->Size();i++){ 29 29 element=(Element*)elements->GetObjectByOffset(i); 30 30 element->Configure(elements,loads,nodes,materials,parameters); 31 31 } 32 _printf_(VerboseMProcessor()," Configuring loads...\n");32 if(VerboseMProcessor()) _pprintLine_(" Configuring loads..."); 33 33 for (i=0;i<loads->Size();i++){ 34 34 load=(Load*)loads->GetObjectByOffset(i); … … 37 37 } 38 38 } 39 _printf_(VerboseMProcessor()," Configuring nodes...\n");39 if(VerboseMProcessor()) _pprintLine_(" Configuring nodes..."); 40 40 for (i=0;i<nodes->Size();i++){ 41 41 node=(Node*)nodes->GetObjectByOffset(i); … … 45 45 } 46 46 47 _printf_(VerboseMProcessor()," Configuring materials...\n");47 if(VerboseMProcessor()) _pprintLine_(" Configuring materials..."); 48 48 for (i=0;i<materials->Size();i++){ 49 49 material=(Material*)materials->GetObjectByOffset(i); -
issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp
r9761 r12515 25 25 26 26 /*Display message*/ 27 _printf_(VerboseModule()," Constraining penalties\n");27 if(VerboseModule()) _pprintLine_(" Constraining penalties"); 28 28 29 29 /*recover parameters: */ -
issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
r12467 r12515 56 56 } 57 57 else if(num_unstable_constraints<=min_mechanical_constraints){ 58 _printf_(VerboseModule()," freezing constraints\n");58 if(VerboseModule()) _pprintLine_(" freezing constraints"); 59 59 RiftFreezeConstraints(loads,configuration_type); 60 60 } -
issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp
r12493 r12515 53 53 /*synchronize all cpus, as CPU 0 is probably late (it is starting the entire dakota strategy!) : */ 54 54 MPI_Barrier(MPI_COMM_WORLD); 55 _printf_(VerboseQmu(),"qmu iteration: %i\n",counter);55 if(VerboseQmu()) _pprintLine_("qmu iteration: " << counter); 56 56 57 57 /*retrieve parameters: */ … … 67 67 68 68 /*Determine solution sequence: */ 69 _printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToStringx(solution_type)," core:");69 if(VerboseQmu()) _pprintLine_("" << "Starting " << EnumToStringx(solution_type) << " core:"); 70 70 CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type); 71 71 #ifdef _HAVE_CONTROL_ … … 79 79 80 80 /*compute responses: */ 81 _printf_(VerboseQmu(),"compute dakota responses:\n");81 if(VerboseQmu()) _pprintLine_("compute dakota responses:"); 82 82 DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses); 83 83 -
issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
r12511 r12515 50 50 clock0=clock(); 51 51 time0 =time(NULL); 52 _printf_(true,"\nExp2Kmlx Module -- %s",ctime(&time0));52 if(true) _pprintString_("\nExp2Kmlx Module -- " << ctime(&time0)); 53 53 54 54 /*read exp file */ … … 56 56 if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp)) 57 57 _error2_("Error reading exp file."); 58 _printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);58 if(true) _pprintLine_("Exp2Kmlx -- Reading " << nprof << " exp profiles from file \"" << filexp << "\"."); 59 59 // for (i=0; i<nprof; i++) 60 60 // _printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]); … … 121 121 122 122 if (holes && nprof && (pnvert[0] <= 1 || pprofx[0][pnvert[0]-1] != pprofx[0][0] || pprofy[0][pnvert[0]-1] != pprofy[0][0])) { 123 _printf_(true,"Warning -- Outer profile is not closed, so \"holes\" option will be ignored.\n");123 if(true) _pprintLine_("Warning -- Outer profile is not closed, so \"holes\" option will be ignored."); 124 124 holes=false; 125 125 } … … 153 153 for (i=1; i<nprof; i++) { 154 154 if (pnvert[i] <= 1 || pprofx[i][pnvert[i]-1] != pprofx[i][0] || pprofy[i][pnvert[i]-1] != pprofy[i][0]) { 155 _printf_(true,"Warning -- Inner profile %d is not closed with \"holes\" specified, so it will be ignored.\n",i+1);155 if(true) _pprintLine_("Warning -- Inner profile " << i+1 << " is not closed with \"holes\" specified, so it will be ignored."); 156 156 continue; 157 157 } … … 275 275 /* write kml file */ 276 276 277 _printf_(true,"Exp2Kmlx -- Writing kml document to file \"%s\".\n",filkml);277 if(true) _pprintLine_("Exp2Kmlx -- Writing kml document to file \"" << filkml << "\"."); 278 278 fid=fopen(filkml,"w"); 279 279 fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); -
issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
r12494 r12515 20 20 Element* element = NULL; 21 21 22 _printf_(VerboseModule()," Migrating grounding line\n");22 if(VerboseModule()) _pprintLine_(" Migrating grounding line"); 23 23 24 24 /*retrieve parameters: */ … … 158 158 #ifdef _HAVE_MPI_ 159 159 MPI_Allreduce(&local_nflipped,&nflipped,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 160 _printf_(VerboseConvergence()," Additional number of vertices allowed to unground: %i\n",nflipped);160 if(VerboseConvergence()) _pprintLine_(" Additional number of vertices allowed to unground: " << nflipped); 161 161 #else 162 162 nflipped=local_nflipped; -
issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
r12470 r12515 34 34 num_notconverged=total_notconverged; 35 35 #endif 36 _printf_(VerboseConvergence()," #elements above convergence criterion = %i\n",num_notconverged);36 if(VerboseConvergence()) _pprintLine_(" #elements above convergence criterion = " << num_notconverged); 37 37 38 38 /*Free ressources:*/ -
issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
r12450 r12515 21 21 clock0=clock(); 22 22 time0 =time(NULL); 23 _printf_(true,"\nKMLFileReadx Module -- %s",ctime(&time0));23 if(true) _pprintString_("\nKMLFileReadx Module -- " << ctime(&time0)); 24 24 25 25 /* read kml file */ … … 43 43 } 44 44 45 // _printf_(true,"%s\n",kstr);45 // if(true) _pprintLine_("" << kstr); 46 46 xDelete<char>(kstr); 47 47 } 48 48 49 49 if (kxml) { 50 _printf_(true,"XML declaration:\n");50 if(true) _pprintLine_("XML declaration:"); 51 51 kxml->DeepEcho(" "); 52 52 delete kxml; 53 53 } 54 54 if (kdtd) { 55 _printf_(true,"DTD declaration (not yet implemented):\n");55 if(true) _pprintLine_("DTD declaration (not yet implemented):"); 56 56 kdtd->DeepEcho(" "); 57 57 delete kdtd; -
issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
r12493 r12515 29 29 clock0=clock(); 30 30 time0 =time(NULL); 31 _printf_(true,"\nKMLMeshWritex Module -- %s",ctime(&time0));31 if(true) _pprintString_("\nKMLMeshWritex Module -- " << ctime(&time0)); 32 32 33 33 /* construct kml document */ … … 83 83 84 84 if (cmap) { 85 _printf_(true,"Writing %d Matlab colors as KML style templates.\n",mcmap);85 if(true) _pprintLine_("Writing " << mcmap << " Matlab colors as KML style templates."); 86 86 ipt=0; 87 87 for (i=0; i<mcmap; i++) { … … 118 118 119 119 if (!nodecon) { 120 _printf_(true,"Creating the node connectivity table.\n");120 if(true) _pprintLine_("Creating the node connectivity table."); 121 121 nncon=mxepg+1; 122 122 nodecon=xNewZeroInit<int>(mncon*nncon); … … 149 149 150 150 else if (mdata == mncon) { 151 _printf_(true,"Averaging nodal data to element data.\n");151 if(true) _pprintLine_("Averaging nodal data to element data."); 152 152 edata=xNewZeroInit<double>(melem*ndata); 153 153 edfree=true; … … 193 193 /* write kml file */ 194 194 195 _printf_(true,"Writing kml document to file.\n");195 if(true) _pprintLine_("Writing kml document to file."); 196 196 fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); 197 197 fprintf(fid,"<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n"); … … 203 203 ((double)(clock0b-clock0a))/CLOCKS_PER_SEC,difftime(time0b,time0a)); 204 204 205 _printf_(true,"Deleting kml document.\n");205 if(true) _pprintLine_("Deleting kml document."); 206 206 delete kdoc; 207 207 clock0c=clock(); … … 304 304 /* write each element as a polygon placemark */ 305 305 306 _printf_(true,"Writing %d tria elements as KML polygons.\n",melem);306 if(true) _pprintLine_("Writing " << melem << " tria elements as KML polygons."); 307 307 308 308 for (i=0; i<melem; i++) { … … 356 356 357 357 // if (!(int)fmod((double)(i+1),1000)) 358 // _printf_(true," %d tria elements written.\n",(i+1));358 // if(true) _pprintLine_(" " << (i+1) << " tria elements written."); 359 359 } 360 _printf_(true," %d tria elements written.\n",melem);360 if(true) _pprintLine_(" " << melem << " tria elements written."); 361 361 362 362 return(kfold); -
issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp
r9761 r12515 28 28 clock0=clock(); 29 29 time0 =time(NULL); 30 _printf_(true,"\nKMLOverlayx Module -- %s",ctime(&time0));30 if(true) _pprintString_("\nKMLOverlayx Module -- " << ctime(&time0)); 31 31 32 32 /* construct kml file */ … … 82 82 /* write kml file */ 83 83 84 _printf_(true,"Writing kml document to file.\n");84 if(true) _pprintLine_("Writing kml document to file."); 85 85 fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); 86 86 kfile->Write(fid,indent); -
issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
r12493 r12515 38 38 clock0=clock(); 39 39 time0 =time(NULL); 40 _printf_(true,"\nKml2Expx Module -- %s",ctime(&time0));40 if(true) _pprintString_("\nKml2Expx Module -- " << ctime(&time0)); 41 41 42 42 /* read kml file */ … … 49 49 /* open exp file */ 50 50 51 _printf_(true,"Writing exp profiles to file.\n");51 if(true) _pprintLine_("Writing exp profiles to file."); 52 52 fido=fopen(filexp,"w"); 53 53 -
issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp
r12493 r12515 116 116 *pdelta= 45; 117 117 *pslat = 70; 118 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");118 if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45)."); 119 119 } 120 120 else if (sgn == -1) { 121 121 *pdelta= 0; 122 122 *pslat = 71; 123 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");123 if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0)."); 124 124 } 125 125 else _error2_("Sign should be either +1 or -1.\n"); -
issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp
r11679 r12515 17 17 18 18 /*Display message*/ 19 _printf_(VerboseModule()," Merging solution vector from fset to gset\n");19 if(VerboseModule()) _pprintLine_(" Merging solution vector from fset to gset"); 20 20 21 21 /*first, get gsize, fsize and ssize: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
r11815 r12515 68 68 if(solution_type==SteadystateSolutionEnum && analysis_type==EnthalpyAnalysisEnum && isenthalpy==false) continue; 69 69 70 _printf_(VerboseMProcessor()," creating datasets for analysis %s\n",EnumToStringx(analysis_type));70 if(VerboseMProcessor()) _pprintLine_(" creating datasets for analysis " << EnumToStringx(analysis_type)); 71 71 CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,¶meters,iomodel,solution_type,analysis_type,nummodels,i); 72 72 } -
issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp
r11699 r12515 22 22 int verbose; 23 23 24 _printf_(VerboseModule()," Dirichlet lifting applied to load vector\n");24 if(VerboseModule()) _pprintLine_(" Dirichlet lifting applied to load vector"); 25 25 26 26 Kfs->GetSize(&global_m,&global_n); -
issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp
r12493 r12515 22 22 23 23 /*Display message*/ 24 _printf_(VerboseModule()," Resetting penalties\n");24 if(VerboseModule()) _pprintLine_(" Resetting penalties"); 25 25 26 26 /*recover parameters: */ -
issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
r12493 r12515 68 68 clock0=clock(); 69 69 time0 =time(NULL); 70 _printf_(true,"\nShp2Kmlx Module -- %s",ctime(&time0));70 if(true) _pprintString_("\nShp2Kmlx Module -- " << ctime(&time0)); 71 71 72 72 /* note that much of the following code is taken from shpdump.c in shapelib. */ … … 573 573 /* write kml file */ 574 574 575 _printf_(true,"Writing kml document to file.\n");575 if(true) _pprintLine_("Writing kml document to file."); 576 576 fid=fopen(filkml,"w"); 577 577 fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); -
issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
r12495 r12515 44 44 45 45 /*Display message*/ 46 _printf_(VerboseModule()," Solving\n");46 if(VerboseModule()) _pprintLine_(" Solving"); 47 47 #if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2) 48 48 if(VerboseSolver())PetscOptionsPrint(stdout); -
issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
r12470 r12515 28 28 29 29 /*Display message*/ 30 _printf_(VerboseModule()," Generating matrices\n");30 if(VerboseModule()) _pprintLine_(" Generating matrices"); 31 31 32 32 /*retrive parameters: */ -
issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
r12470 r12515 22 22 23 23 /*start module: */ 24 _printf_(VerboseModule(),"%s%g\n"," Updating constraints for time: ",time);24 if(VerboseModule()) _pprintLine_("" << " Updating constraints for time: " << time); 25 25 26 26 /*First, update dof constraints in nodes, using constraints: */ -
issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp
r12493 r12515 124 124 *pdelta= 45; 125 125 *pslat = 70; 126 _printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");126 if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45)."); 127 127 } 128 128 else if (sgn == -1) { 129 129 *pdelta= 0; 130 130 *pslat = 71; 131 _printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");131 if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0)."); 132 132 } 133 133 else _error2_("Sign should be either +1 or -1.\n"); -
issm/trunk-jpl/src/c/objects/FemModel.cpp
r12511 r12515 50 50 for(i=0;i<nummodels;i++){ 51 51 52 _printf_(VerboseMProcessor()," Processing finite element model of analysis %s:\n",EnumToStringx(analysis_type_list[i]));52 if(VerboseMProcessor()) _pprintLine_(" Processing finite element model of analysis " << EnumToStringx(analysis_type_list[i]) << ":"); 53 53 analysis_type=analysis_type_list[i]; 54 54 this->SetCurrentConfiguration(analysis_type); 55 55 56 56 if(i==0){ 57 _printf_(VerboseMProcessor()," creating vertex degrees of freedom\n");57 if(VerboseMProcessor()) _pprintLine_(" creating vertex degrees of freedom"); 58 58 VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices 59 59 } 60 60 61 _printf_(VerboseMProcessor()," resolving node constraints\n");61 if(VerboseMProcessor()) _pprintLine_(" resolving node constraints"); 62 62 SpcNodesx(nodes,constraints,parameters,analysis_type); 63 63 64 _printf_(VerboseMProcessor()," creating nodal degrees of freedom\n");64 if(VerboseMProcessor()) _pprintLine_(" creating nodal degrees of freedom"); 65 65 NodesDofx(nodes,parameters,analysis_type); 66 66 67 _printf_(VerboseMProcessor()," configuring element and loads\n");67 if(VerboseMProcessor()) _pprintLine_(" configuring element and loads"); 68 68 ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters); 69 69 } … … 145 145 if(this->parameters->Exist(PetscOptionsStringsEnum)){ 146 146 PetscOptionsFromAnalysis(this->parameters,analysis_type); 147 _printf_(VerboseSolver()," petsc Options set for analysis type: %s\n",EnumToStringx(analysis_type));147 if(VerboseSolver()) _pprintLine_(" petsc Options set for analysis type: " << EnumToStringx(analysis_type)); 148 148 } 149 149 #endif -
issm/trunk-jpl/src/c/objects/IoModel.cpp
r12511 r12515 78 78 for(int i=0;i<MaximumNumberOfEnums;i++){ 79 79 if(this->data[i]){ 80 _printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i));80 if(true) _pprintLine_("Info: previous pointer of " << EnumToStringx(i) << " has not been freed (DeleteData has not been called)"); 81 81 } 82 82 } -
issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
r12493 r12515 127 127 128 128 // if (itag) 129 // _printf_(true,"tag buffer (length=%d):\n",ibuf);129 // if(true) _pprintLine_("tag buffer (length=" << ibuf << "):"); 130 130 // else if (ifield) 131 // _printf_(true,"field buffer (length=%d):\n",ibuf);132 // _printf_(true,"%s\n",buffer);131 // if(true) _pprintLine_("field buffer (length=" << ibuf << "):"); 132 // if(true) _pprintLine_("" << buffer); 133 133 134 134 if (!ibuf) … … 193 193 } 194 194 195 // _printf_(true,"comment buffer (length=%d):\n",ibuf);196 // _printf_(true,"%s\n",buffer);195 // if(true) _pprintLine_("comment buffer (length=" << ibuf << "):"); 196 // if(true) _pprintLine_("" << buffer); 197 197 198 198 if (!ibuf) … … 254 254 255 255 ktokn=strtok(ktagi,"< >"); 256 // _printf_(true,"KMLFileTagName -- initial token=\"%s\".\n",ktokn);256 // if(true) _pprintLine_("KMLFileTagName -- initial token=\"" << ktokn << "\"."); 257 257 258 258 if (!pname) { … … 264 264 265 265 if (maxlen && (maxlen < strlen(ktokn))) { 266 _printf_(true,"KMLFileTagName -- string field too short for %s.\n",ktag);267 _printf_(true,"KMLFileTagName -- \"%s\" truncated to %d characters.\n",ktokn,maxlen);266 if(true) _pprintLine_("KMLFileTagName -- string field too short for " << ktag << "."); 267 if(true) _pprintLine_("KMLFileTagName -- \"" << ktokn << "\" truncated to " << maxlen << " characters."); 268 268 strncpy(pname,ktokn,maxlen); 269 269 } … … 300 300 /* return first non blank and move past subsequent blank */ 301 301 ktokn=strtok(ktagi," "); 302 // _printf_(true,"KMLFileTagAttrib -- initial token=\"%s\".\n",ktokn);302 // if(true) _pprintLine_("KMLFileTagAttrib -- initial token=\"" << ktokn << "\"."); 303 303 304 304 /* return next non " =?/>" and move past subsequent " =?/>" */ … … 307 307 /* return next non quote and move past subsequent quote */ 308 308 ktokv=strtok(NULL,quote); 309 // _printf_(true,"KMLFileTagAttrib -- attribute %s=\"%s\".\n",ktokn,ktokv);309 // if(true) _pprintLine_("KMLFileTagAttrib -- attribute " << ktokn << "=\"" << ktokv << "\"."); 310 310 311 311 /* add the attribute to the dataset */ … … 323 323 (!strncmp(&ktag[0],"<" ,1) && !strncmp(&ktag[strlen(ktag)-2],"/>",2))) 324 324 isolo=1; 325 // _printf_(true,"KMLFileTagAttrib -- isolo=%d.\n",isolo);325 // if(true) _pprintLine_("KMLFileTagAttrib -- isolo=" << isolo << "."); 326 326 327 327 return(isolo); … … 357 357 xfree((void**)&kstr); 358 358 359 // _printf_(true,"KMLFileTokenParse -- %s=%d.\n",ktag,*pival);359 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pival << "."); 360 360 361 361 return(0); … … 391 391 xfree((void**)&kstr); 392 392 393 // _printf_(true,"KMLFileTokenParse -- %s=%s.\n",ktag,(*pbval ? "true" : "false"));393 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << (*pbval ? "true" : "false") << "."); 394 394 395 395 return(0); … … 428 428 429 429 if (maxlen && (maxlen < strlen(kstr))) { 430 _printf_(true,"KMLFileTokenParse -- string field too short for %s.\n",ktag);431 _printf_(true,"KMLFileTokenParse -- \"%s\" truncated to %d characters.\n",kstr,maxlen);430 if(true) _pprintLine_("KMLFileTokenParse -- string field too short for " << ktag << "."); 431 if(true) _pprintLine_("KMLFileTokenParse -- \"" << kstr << "\" truncated to " << maxlen << " characters."); 432 432 strncpy(pstr,kstr,maxlen); 433 433 } … … 452 452 xfree((void**)&kstr); 453 453 454 // _printf_(true,"KMLFileTokenParse -- %s=\"%s\".\n",ktag,pstr);454 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=\"" << pstr << "\"."); 455 455 456 456 return(pstr); … … 486 486 xfree((void**)&kstr); 487 487 488 // _printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pfval);488 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pfval << "."); 489 489 490 490 return(0); … … 520 520 xfree((void**)&kstr); 521 521 522 // _printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pdval);522 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pdval << "."); 523 523 524 524 return(0); … … 578 578 xfree((void**)&kstr); 579 579 580 // _printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);580 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=..."); 581 581 // for (j=0; j<=i; j++) 582 // _printf_(true," [%d]: %lg\n",j,(*pdval)[j]);582 // if(true) _pprintLine_(" [" << j << "]: " << (*pdval)[j] << "g"); 583 583 584 584 return(0); … … 631 631 632 632 if (j != 2) 633 _printf_(true,"KMLFileTokenParse -- Double [m x 3] field for %s does not have multiple of 3 values.\n",ktag);633 if(true) _pprintLine_("KMLFileTokenParse -- Double [m x 3] field for " << ktag << " does not have multiple of 3 values."); 634 634 635 635 /* get additional token and compare to closing tag */ … … 645 645 xfree((void**)&kstr); 646 646 647 // _printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);647 // if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=..."); 648 648 // for (j=0; j<=i; j++) 649 // _printf_(true," [%d][0-2]: %lg,%lg,%lg\n",j,(*pdval3)[j][0],(*pdval3)[j][1],(*pdval3)[j][2]);649 // if(true) _pprintLine_(" [" << j << "][0-2]: " << (*pdval3)[j][0] << "g," << (*pdval3)[j][1] << "g," << (*pdval3)[j][2] << "g"); 650 650 651 651 return(0); … … 661 661 opening tag, must find corresponding closing tag */ 662 662 663 _printf_(true,"KMLFileTagSkip -- input tag %s.\n",ktag);663 if(true) _pprintLine_("KMLFileTagSkip -- input tag " << ktag << "."); 664 664 665 665 /* if next token is a closing tag, compare to input */ … … 670 670 (kstr[1] == '/') && 671 671 (!strncmp(&(kstr[2]),&(ktag[1]),(strcspn(ktag," >")-1)/sizeof(char)))) { 672 _printf_(true,"KMLFileTagSkip -- closing tag %s.\n",kstr);672 if(true) _pprintLine_("KMLFileTagSkip -- closing tag " << kstr << "."); 673 673 xfree((void**)&kstr); 674 674 return(0); … … 679 679 else if ((kstr[0] == '<') && 680 680 (kstr[1] != '/')) { 681 _printf_(true,"KMLFileTagSkip -- opening tag %s.\n",kstr);681 if(true) _pprintLine_("KMLFileTagSkip -- opening tag " << kstr << "."); 682 682 KMLFileTagSkip(kstr, 683 683 fid); -
issm/trunk-jpl/src/c/objects/KML/KML_Attribute.cpp
r12365 r12515 45 45 bool flag=true; 46 46 47 _printf_(flag," ");47 if(flag) _pprintString_(" "); 48 48 for (i=0;i<10-strlen(name);i++) 49 _printf_(flag," ");50 _printf_(flag,"%s: \"%s\"\n",name,value);49 if(flag) _pprintString_(" "); 50 if(flag) _pprintLine_("" << name << ": \"" << value << "\""); 51 51 52 52 return; … … 69 69 bool flag=true; 70 70 71 _printf_(flag,"%s ",indent);71 if(flag) _pprintString_("" << indent << " "); 72 72 for (i=0;i<10-strlen(name);i++) 73 _printf_(flag," ");74 _printf_(flag,"%s: \"%s\"\n",name,value);73 if(flag) _pprintString_(" "); 74 if(flag) _pprintLine_("" << name << ": \"" << value << "\""); 75 75 76 76 return; -
issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
r12493 r12515 45 45 KML_SubStyle::Echo(); 46 46 47 _printf_(flag," color: %s\n" ,color);48 _printf_(flag," colormode: %s\n" ,colormode);47 if(flag) _pprintLine_(" color: " << color); 48 if(flag) _pprintLine_(" colormode: " << colormode); 49 49 50 50 return; … … 68 68 KML_SubStyle::DeepEcho(indent); 69 69 70 _printf_(flag,"%s color: %s\n" ,indent,color); 71 _printf_(flag,"%s colormode: %s\n" ,indent,colormode); 72 73 return; 70 if(flag) _pprintLine_("" << indent << " color: " << color); 71 if(flag) _pprintLine_("" << indent << " colormode: " << colormode); 74 72 } 75 73 /*}}}*/ -
issm/trunk-jpl/src/c/objects/KML/KML_Comment.cpp
r12365 r12515 42 42 bool flag=true; 43 43 44 _printf_(flag," ");45 _printf_(flag,"%s\n",value);44 if(flag) _pprintString_(" "); 45 if(flag) _pprintLine_("" << value); 46 46 47 47 return; … … 63 63 bool flag=true; 64 64 65 _printf_(flag,"%s ",indent);66 _printf_(flag,"%s\n",value);65 if(flag) _pprintString_("" << indent << " "); 66 if(flag) _pprintLine_("" << value); 67 67 68 68 return; -
issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp
r12493 r12515 47 47 KML_Feature::Echo(); 48 48 49 _printf_(flag," feature: (size=%d)\n" ,feature->Size());49 if(flag) _pprintLine_(" feature: (size=" << feature->Size() << ")"); 50 50 51 51 return; … … 78 78 if (feature->Size()) 79 79 for (i=0; i<feature->Size(); i++) { 80 _printf_(flag,"%s feature: -------- begin [%d] --------\n" ,indent,i);80 if(flag) _pprintLine_("" << indent << " feature: -------- begin [" << i << "] --------"); 81 81 ((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2); 82 _printf_(flag,"%s feature: -------- end [%d] --------\n" ,indent,i);82 if(flag) _pprintLine_("" << indent << " feature: -------- end [" << i << "] --------"); 83 83 } 84 84 else 85 _printf_(flag,"%s feature: [empty]\n" ,indent);85 if(flag) _pprintLine_("" << indent << " feature: [empty]"); 86 86 87 87 return; -
issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp
r12493 r12515 42 42 bool flag=true; 43 43 44 _printf_(flag,"KML_Document:\n");44 if(flag) _pprintLine_("KML_Document:"); 45 45 KML_Container::Echo(); 46 46 … … 65 65 bool flag=true; 66 66 67 _printf_(flag,"%sKML_Document:\n",indent);67 if(flag) _pprintLine_("" << indent << "KML_Document:"); 68 68 KML_Container::DeepEcho(indent); 69 69 -
issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp
r12493 r12515 54 54 KML_Object::Echo(); 55 55 56 _printf_(flag," name: \"%s\"\n" ,name);57 _printf_(flag," visibility: %s\n" ,(visibility ? "true" : "false"));58 _printf_(flag," open: %s\n" ,(open ? "true" : "false"));59 _printf_(flag," snippet: \"%s\"\n" ,snippet);60 _printf_(flag," descript: \"%s\"\n" ,descript);61 _printf_(flag," styleurl: \"%s\"\n" ,styleurl);62 _printf_(flag," style: (size=%d)\n" ,style->Size());56 if(flag) _pprintLine_(" name: \"" << name << "\""); 57 if(flag) _pprintLine_(" visibility: " << (visibility ? "true" : "false")); 58 if(flag) _pprintLine_(" open: " << (open ? "true" : "false")); 59 if(flag) _pprintLine_(" snippet: \"" << snippet << "\""); 60 if(flag) _pprintLine_(" descript: \"" << descript << "\""); 61 if(flag) _pprintLine_(" styleurl: \"" << styleurl << "\""); 62 if(flag) _pprintLine_(" style: (size=" << style->Size() << ")"); 63 63 64 64 return; 65 65 } 66 66 /*}}}*/ 67 68 67 /*FUNCTION KML_Feature::DeepEcho {{{*/ 69 68 void KML_Feature::DeepEcho(){ … … 76 75 } 77 76 /*}}}*/ 78 79 77 /*FUNCTION KML_Feature::DeepEcho {{{*/ 80 78 void KML_Feature::DeepEcho(const char* indent){ … … 86 84 KML_Object::DeepEcho(indent); 87 85 88 _printf_(flag,"%s name: \"%s\"\n" ,indent,name);89 _printf_(flag,"%s visibility: %s\n" ,indent,(visibility ? "true" : "false"));90 _printf_(flag,"%s open: %s\n" ,indent,(open ? "true" : "false"));91 _printf_(flag,"%s snippet: \"%s\"\n" ,indent,snippet);92 _printf_(flag,"%s descript: \"%s\"\n" ,indent,descript);93 _printf_(flag,"%s styleurl: \"%s\"\n" ,indent,styleurl);86 if(flag) _pprintLine_("" << indent << " name: \"" << name << "\""); 87 if(flag) _pprintLine_("" << indent << " visibility: " << (visibility ? "true" : "false")); 88 if(flag) _pprintLine_("" << indent << " open: " << (open ? "true" : "false")); 89 if(flag) _pprintLine_("" << indent << " snippet: \"" << snippet << "\""); 90 if(flag) _pprintLine_("" << indent << " descript: \"" << descript << "\""); 91 if(flag) _pprintLine_("" << indent << " styleurl: \"" << styleurl << "\""); 94 92 95 93 /* loop over any styles for the feature */ … … 100 98 if (style->Size()) 101 99 for (i=0; i<style->Size(); i++) { 102 _printf_(flag,"%s style: -------- begin [%d] --------\n" ,indent,i);100 if(flag) _pprintLine_("" << indent << " style: -------- begin [" << i << "] --------"); 103 101 ((KML_Style *)style->GetObjectByOffset(i))->DeepEcho(indent2); 104 _printf_(flag,"%s style: -------- end [%d] --------\n" ,indent,i);102 if(flag) _pprintLine_("" << indent << " style: -------- end [" << i << "] --------"); 105 103 } 106 104 else 107 _printf_(flag,"%s style: [empty]\n" ,indent);105 if(flag) _pprintLine_("" << indent << " style: [empty]"); 108 106 109 107 return; 110 108 } 111 109 /*}}}*/ 112 113 110 /*FUNCTION KML_Feature::Write {{{*/ 114 111 void KML_Feature::Write(FILE* filout,const char* indent){ … … 142 139 } 143 140 /*}}}*/ 144 145 141 /*FUNCTION KML_Feature::Read {{{*/ 146 142 void KML_Feature::Read(FILE* fid,char* kstr){ … … 182 178 } 183 179 /*}}}*/ 184 -
issm/trunk-jpl/src/c/objects/KML/KML_File.cpp
r12493 r12515 42 42 bool flag=true; 43 43 44 _printf_(flag,"KML_File:\n");44 if(flag) _pprintLine_("KML_File:"); 45 45 KML_Object::Echo(); 46 46 … … 63 63 bool flag=true; 64 64 65 _printf_(flag,"%sKML_File:\n",indent);65 if(flag) _pprintLine_("" << indent << "KML_File:"); 66 66 KML_Object::DeepEcho(indent); 67 67 -
issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp
r12493 r12515 42 42 bool flag=true; 43 43 44 _printf_(flag,"KML_Folder:\n");44 if(flag) _pprintLine_("KML_Folder:"); 45 45 KML_Container::Echo(); 46 46 … … 65 65 bool flag=true; 66 66 67 _printf_(flag,"%sKML_Folder:\n",indent);67 if(flag) _pprintLine_("" << indent << "KML_Folder:"); 68 68 KML_Container::DeepEcho(indent); 69 69 -
issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp
r12493 r12515 49 49 bool flag=true; 50 50 51 _printf_(flag,"KML_Icon:\n");51 if(flag) _pprintLine_("KML_Icon:"); 52 52 KML_Object::Echo(); 53 53 54 _printf_(flag," href: \"%s\"\n" ,href);55 _printf_(flag," refmode: \"%s\"\n" ,refmode);56 _printf_(flag," refint: %g\n" ,refint);57 _printf_(flag," vrefmode: \"%s\"\n" ,vrefmode);58 _printf_(flag," vreftime: %g\n" ,vreftime);59 _printf_(flag," vboundsc: %g\n" ,vboundsc);60 _printf_(flag," vformat: \"%s\"\n" ,vformat);61 _printf_(flag," hquery: \"%s\"\n" ,hquery);54 if(flag) _pprintLine_(" href: \"" << href << "\""); 55 if(flag) _pprintLine_(" refmode: \"" << refmode << "\""); 56 if(flag) _pprintLine_(" refint: " << refint); 57 if(flag) _pprintLine_(" vrefmode: \"" << vrefmode << "\""); 58 if(flag) _pprintLine_(" vreftime: " << vreftime); 59 if(flag) _pprintLine_(" vboundsc: " << vboundsc); 60 if(flag) _pprintLine_(" vformat: \"" << vformat << "\""); 61 if(flag) _pprintLine_(" hquery: \"" << hquery << "\""); 62 62 63 63 return; 64 64 } 65 65 /*}}}*/ 66 67 66 /*FUNCTION KML_Icon::DeepEcho {{{*/ 68 67 void KML_Icon::DeepEcho(){ … … 75 74 } 76 75 /*}}}*/ 77 78 76 /*FUNCTION KML_Icon::DeepEcho {{{*/ 79 77 void KML_Icon::DeepEcho(const char* indent){ … … 81 79 bool flag=true; 82 80 83 _printf_(flag,"%sKML_Icon:\n",indent);81 if(flag) _pprintLine_("" << indent << "KML_Icon:"); 84 82 KML_Object::DeepEcho(indent); 85 83 86 _printf_(flag,"%s href: \"%s\"\n" ,indent,href);87 _printf_(flag,"%s refmode: \"%s\"\n" ,indent,refmode);88 _printf_(flag,"%s refint: %g\n" ,indent,refint);89 _printf_(flag,"%s vrefmode: \"%s\"\n" ,indent,vrefmode);90 _printf_(flag,"%s vreftime: %g\n" ,indent,vreftime);91 _printf_(flag,"%s vboundsc: %g\n" ,indent,vboundsc);92 _printf_(flag,"%s vformat: \"%s\"\n" ,indent,vformat);93 _printf_(flag,"%s hquery: \"%s\"\n" ,indent,hquery);84 if(flag) _pprintLine_("" << indent << " href: \"" << href << "\""); 85 if(flag) _pprintLine_("" << indent << " refmode: \"" << refmode << "\""); 86 if(flag) _pprintLine_("" << indent << " refint: " << refint); 87 if(flag) _pprintLine_("" << indent << " vrefmode: \"" << vrefmode << "\""); 88 if(flag) _pprintLine_("" << indent << " vreftime: " << vreftime); 89 if(flag) _pprintLine_("" << indent << " vboundsc: " << vboundsc); 90 if(flag) _pprintLine_("" << indent << " vformat: \"" << vformat << "\""); 91 if(flag) _pprintLine_("" << indent << " hquery: \"" << hquery << "\""); 94 92 95 93 return; 96 94 } 97 95 /*}}}*/ 98 99 96 /*FUNCTION KML_Icon::Write {{{*/ 100 97 void KML_Icon::Write(FILE* filout,const char* indent){ … … 126 123 } 127 124 /*}}}*/ 128 129 125 /*FUNCTION KML_Icon::Read {{{*/ 130 126 void KML_Icon::Read(FILE* fid,char* kstr){ … … 185 181 } 186 182 /*}}}*/ 187 -
issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp
r12493 r12515 51 51 bool flag=true; 52 52 53 _printf_(flag,"KML_LineString:\n");53 if(flag) _pprintLine_("KML_LineString:"); 54 54 KML_Geometry::Echo(); 55 55 56 _printf_(flag," extrude: %s\n" ,(extrude ? "true" : "false"));57 _printf_(flag," tessellate: %s\n" ,(tessellate ? "true" : "false"));58 _printf_(flag," altmode: \"%s\"\n" ,altmode);59 _printf_(flag," coords: (ncoord=%d)\n" ,ncoord);56 if(flag) _pprintLine_(" extrude: " << (extrude ? "true" : "false")); 57 if(flag) _pprintLine_(" tessellate: " << (tessellate ? "true" : "false")); 58 if(flag) _pprintLine_(" altmode: \"" << altmode << "\""); 59 if(flag) _pprintLine_(" coords: (ncoord=" << ncoord << ")"); 60 60 61 61 return; … … 78 78 bool flag=true; 79 79 80 _printf_(flag,"%sKML_LineString:\n",indent);80 if(flag) _pprintLine_("" << indent << "KML_LineString:"); 81 81 KML_Geometry::DeepEcho(indent); 82 82 83 _printf_(flag,"%s extrude: %s\n" ,indent,(extrude ? "true" : "false"));84 _printf_(flag,"%s tessellate: %s\n" ,indent,(tessellate ? "true" : "false"));85 _printf_(flag,"%s altmode: \"%s\"\n" ,indent,altmode);86 _printf_(flag,"%s coords: (ncoord=%d)\n" ,indent,ncoord);83 if(flag) _pprintLine_("" << indent << " extrude: " << (extrude ? "true" : "false")); 84 if(flag) _pprintLine_("" << indent << " tessellate: " << (tessellate ? "true" : "false")); 85 if(flag) _pprintLine_("" << indent << " altmode: \"" << altmode << "\""); 86 if(flag) _pprintLine_("" << indent << " coords: (ncoord=" << ncoord << ")"); 87 87 for (i=0; i<ncoord; i++) 88 _printf_(flag,"%s (%g,%g,%g)\n" ,indent,coords[3*i+0],coords[3*i+1],coords[3*i+2]);88 if(flag) _pprintLine_("" << indent << " (" << coords[3*i+0] << "," << coords[3*i+1] << "," << coords[3*i+2] << ")"); 89 89 90 90 return; -
issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
r12493 r12515 42 42 bool flag=true; 43 43 44 _printf_(flag,"KML_LineStyle:\n");44 if(flag) _pprintLine_("KML_LineStyle:"); 45 45 KML_ColorStyle::Echo(); 46 46 47 _printf_(flag," width: %g\n" ,width);47 if(flag) _pprintLine_(" width: " << width); 48 48 49 49 return; … … 66 66 bool flag=true; 67 67 68 _printf_(flag,"%sKML_LineStyle:\n",indent);68 if(flag) _pprintLine_("" << indent << "KML_LineStyle:"); 69 69 KML_ColorStyle::DeepEcho(indent); 70 70 71 _printf_(flag,"%s width: %g\n" ,indent,width);71 if(flag) _pprintLine_("" << indent << " width: " << width); 72 72 73 73 return; … … 137 137 } 138 138 /*}}}*/ 139 -
issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
r12493 r12515 51 51 bool flag=true; 52 52 53 _printf_(flag,"KML_LinearRing:\n");53 if(flag) _pprintLine_("KML_LinearRing:"); 54 54 KML_Geometry::Echo(); 55 55 56 _printf_(flag," extrude: %s\n" ,(extrude ? "true" : "false"));57 _printf_(flag," tessellate: %s\n" ,(tessellate ? "true" : "false"));58 _printf_(flag," altmode: \"%s\"\n" ,altmode);59 _printf_(flag," coords: (ncoord=%d)\n" ,ncoord);56 if(flag) _pprintLine_(" extrude: " << (extrude ? "true" : "false")); 57 if(flag) _pprintLine_(" tessellate: " << (tessellate ? "true" : "false")); 58 if(flag) _pprintLine_(" altmode: \"" << altmode << "\""); 59 if(flag) _pprintLine_(" coords: (ncoord=" << ncoord << ")"); 60 60 61 61 return; … … 78 78 bool flag=true; 79 79 80 _printf_(flag,"%sKML_LinearRing:\n",indent);80 if(flag) _pprintLine_("" << indent << "KML_LinearRing:"); 81 81 KML_Geometry::DeepEcho(indent); 82 82 83 _printf_(flag,"%s extrude: %s\n" ,indent,(extrude ? "true" : "false"));84 _printf_(flag,"%s tessellate: %s\n" ,indent,(tessellate ? "true" : "false"));85 _printf_(flag,"%s altmode: \"%s\"\n" ,indent,altmode);86 _printf_(flag,"%s coords: (ncoord=%d)\n" ,indent,ncoord);83 if(flag) _pprintLine_("" << indent << " extrude: " << (extrude ? "true" : "false")); 84 if(flag) _pprintLine_("" << indent << " tessellate: " << (tessellate ? "true" : "false")); 85 if(flag) _pprintLine_("" << indent << " altmode: \"" << altmode << "\""); 86 if(flag) _pprintLine_("" << indent << " coords: (ncoord=" << ncoord << ")"); 87 87 for (i=0; i<ncoord; i++) 88 _printf_(flag,"%s (%g,%g,%g)\n" 88 _printf_(flag,"%s (%g,%g,%g)\n",indent, 89 89 coords[3*i+0],coords[3*i+1],coords[3*i+2]); 90 90 -
issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
r12493 r12515 45 45 bool flag=true; 46 46 47 _printf_(flag,"KML_Multigeometry:\n");47 if(flag) _pprintLine_("KML_Multigeometry:"); 48 48 KML_Geometry::Echo(); 49 49 50 _printf_(flag," geometry: (size=%d)\n" ,geometry->Size()); 51 52 return; 53 } 54 /*}}}*/ 55 50 if(flag) _pprintLine_(" geometry: (size=" << geometry->Size() << ")"); 51 52 return; 53 } 54 /*}}}*/ 56 55 /*FUNCTION KML_MultiGeometry::DeepEcho {{{*/ 57 56 void KML_MultiGeometry::DeepEcho(){ … … 64 63 } 65 64 /*}}}*/ 66 67 65 /*FUNCTION KML_MultiGeometry::DeepEcho {{{*/ 68 66 void KML_MultiGeometry::DeepEcho(const char* indent){ … … 72 70 bool flag=true; 73 71 74 _printf_(flag,"%sKML_Multigeometry:\n",indent);72 if(flag) _pprintLine_("" << indent << "KML_Multigeometry:"); 75 73 KML_Geometry::DeepEcho(indent); 76 74 … … 82 80 if (geometry->Size()) 83 81 for (i=0; i<geometry->Size(); i++) { 84 _printf_(flag,"%s geometry: -------- begin [%d] --------\n" ,indent,i);82 if(flag) _pprintLine_("" << indent << " geometry: -------- begin [" << i << "] --------"); 85 83 ((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2); 86 _printf_(flag,"%s geometry: -------- end [%d] --------\n" ,indent,i);84 if(flag) _pprintLine_("" << indent << " geometry: -------- end [" << i << "] --------"); 87 85 } 88 86 else 89 _printf_(flag,"%s geometry: [empty]\n" ,indent); 90 91 return; 92 } 93 /*}}}*/ 94 87 if(flag) _pprintLine_("" << indent << " geometry: [empty]"); 88 89 return; 90 } 91 /*}}}*/ 95 92 /*FUNCTION KML_MultiGeometry::Write {{{*/ 96 93 void KML_MultiGeometry::Write(FILE* filout,const char* indent){ … … 120 117 } 121 118 /*}}}*/ 122 123 119 /*FUNCTION KML_MultiGeometry::Read {{{*/ 124 120 void KML_MultiGeometry::Read(FILE* fid,char* kstr){ … … 193 189 } 194 190 /*}}}*/ 195 196 191 /*FUNCTION KML_MultiGeometry::WriteExp {{{*/ 197 192 void KML_MultiGeometry::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){ … … 207 202 } 208 203 /*}}}*/ 209 -
issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp
r12493 r12515 55 55 bool flag=true; 56 56 57 _printf_(flag," attrib: (size=%d)\n" ,attrib->Size());58 _printf_(flag," commnt: (size=%d)\n" ,commnt->Size());59 _printf_(flag," kmlobj: (size=%d)\n" ,kmlobj->Size());57 if(flag) _pprintLine_(" attrib: (size=" << attrib->Size() << ")"); 58 if(flag) _pprintLine_(" commnt: (size=" << commnt->Size() << ")"); 59 if(flag) _pprintLine_(" kmlobj: (size=" << kmlobj->Size() << ")"); 60 60 61 61 return; … … 86 86 } 87 87 else 88 _printf_(flag,"%s attrib: [empty]\n" ,indent);88 if(flag) _pprintLine_("" << indent << " attrib: [empty]"); 89 89 90 90 /* loop over the comments for the object */ … … 95 95 } 96 96 else 97 _printf_(flag,"%s commnt: [empty]\n" ,indent);97 if(flag) _pprintLine_("" << indent << " commnt: [empty]"); 98 98 99 99 /* loop over the unknown objects for the object */ … … 104 104 if (kmlobj->Size()) 105 105 for (i=0; i<kmlobj->Size(); i++) { 106 _printf_(flag,"%s kmlobj: -------- begin [%d] --------\n" ,indent,i);106 if(flag) _pprintLine_("" << indent << " kmlobj: -------- begin [" << i << "] --------"); 107 107 ((KML_Unknown *)kmlobj->GetObjectByOffset(i))->DeepEcho(indent2); 108 _printf_(flag,"%s kmlobj: -------- end [%d] --------\n" ,indent,i);108 if(flag) _pprintLine_("" << indent << " kmlobj: -------- end [" << i << "] --------"); 109 109 } 110 110 else 111 _printf_(flag,"%s kmlobj: [empty]\n" ,indent);111 if(flag) _pprintLine_("" << indent << " kmlobj: [empty]"); 112 112 113 113 return; … … 253 253 254 254 else if (!strncmp(kstr,"<",1)) { 255 _printf_(true,"KML_Object::Read -- Unrecognized opening tag %s.\n",kstr);255 if(true) _pprintLine_("KML_Object::Read -- Unrecognized opening tag " << kstr << "."); 256 256 // KMLFileTagSkip(kstr, 257 257 // fid); -
issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
r12493 r12515 47 47 void KML_Overlay::Echo(){ 48 48 49 bool flag=true;50 51 49 KML_Feature::Echo(); 52 53 _printf_(flag," color: \"%s\"\n" ,color); 54 _printf_(flag," draword: %d\n" ,draword); 55 _printf_(flag," icon: %p\n" ,icon); 56 57 return; 50 _pprintLine_(" color: \"" << color << "\""); 51 _pprintLine_(" draword: " << draword); 52 _pprintLine_(" icon: " << icon); 58 53 } 59 54 /*}}}*/ 60 61 55 /*FUNCTION KML_Overlay::DeepEcho {{{*/ 62 56 void KML_Overlay::DeepEcho(){ … … 69 63 } 70 64 /*}}}*/ 71 72 65 /*FUNCTION KML_Overlay::DeepEcho {{{*/ 73 66 void KML_Overlay::DeepEcho(const char* indent){ 74 67 75 68 char indent2[81]; 76 bool flag=true;77 78 69 KML_Feature::DeepEcho(indent); 79 70 … … 81 72 strcat(indent2," "); 82 73 83 _p rintf_(flag,"%s color: %s\n" ,indent,color);84 _p rintf_(flag,"%s draword: %d\n" ,indent,draword);74 _pprintLine_("" << indent << " color: " << color); 75 _pprintLine_("" << indent << " draword: " << draword); 85 76 if (icon) 86 77 icon->DeepEcho(indent2); 87 78 else 88 _printf_(flag,"%s icon: %p\n" ,indent,icon); 89 90 return; 79 _pprintLine_("" << indent << " icon: " << icon); 91 80 } 92 81 /*}}}*/ 93 94 82 /*FUNCTION KML_Overlay::Write {{{*/ 95 83 void KML_Overlay::Write(FILE* filout,const char* indent){ … … 112 100 } 113 101 /*}}}*/ 114 115 102 /*FUNCTION KML_Overlay::Read {{{*/ 116 103 void KML_Overlay::Read(FILE* fid,char* kstr){ … … 147 134 } 148 135 /*}}}*/ 149 -
issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
r12493 r12515 45 45 bool flag=true; 46 46 47 _printf_(flag,"KML_Placemark:\n");47 if(flag) _pprintLine_("KML_Placemark:"); 48 48 KML_Feature::Echo(); 49 49 50 _printf_(flag," geometry: (size=%d)\n" ,geometry->Size());50 if(flag) _pprintLine_(" geometry: (size=" << geometry->Size() << ")"); 51 51 52 52 return; … … 70 70 bool flag=true; 71 71 72 _printf_(flag,"%sKML_Placemark:\n",indent);72 if(flag) _pprintLine_("" << indent << "KML_Placemark:"); 73 73 KML_Feature::DeepEcho(indent); 74 74 … … 80 80 if (geometry->Size()) 81 81 for (i=0; i<geometry->Size(); i++) { 82 _printf_(flag,"%s geometry: -------- begin [%d] --------\n" ,indent,i);82 if(flag) _pprintLine_("" << indent << " geometry: -------- begin [" << i << "] --------"); 83 83 ((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2); 84 _printf_(flag,"%s geometry: -------- end [%d] --------\n" ,indent,i);84 if(flag) _pprintLine_("" << indent << " geometry: -------- end [" << i << "] --------"); 85 85 } 86 86 else 87 _printf_(flag,"%s geometry: [empty]\n" ,indent);87 if(flag) _pprintLine_("" << indent << " geometry: [empty]"); 88 88 89 89 return; -
issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp
r12493 r12515 48 48 bool flag=true; 49 49 50 _printf_(flag,"KML_Point:\n");50 if(flag) _pprintLine_("KML_Point:"); 51 51 KML_Geometry::Echo(); 52 52 53 _printf_(flag," extrude: %s\n" ,(extrude ? "true" : "false"));54 _printf_(flag," altmode: \"%s\"\n" ,altmode);55 _printf_(flag," coords: (%g,%g,%g)\n" ,coords[0],coords[1],coords[2]);53 if(flag) _pprintLine_(" extrude: " << (extrude ? "true" : "false")); 54 if(flag) _pprintLine_(" altmode: \"" << altmode << "\""); 55 if(flag) _pprintLine_(" coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")"); 56 56 57 57 return; … … 73 73 bool flag=true; 74 74 75 _printf_(flag,"%sKML_Point:\n",indent);75 if(flag) _pprintLine_("" << indent << "KML_Point:"); 76 76 KML_Geometry::DeepEcho(indent); 77 77 78 _printf_(flag,"%s extrude: %s\n" ,indent,(extrude ? "true" : "false"));79 _printf_(flag,"%s altmode: \"%s\"\n" ,indent,altmode);80 _printf_(flag,"%s coords: (%g,%g,%g)\n" ,indent,coords[0],coords[1],coords[2]);78 if(flag) _pprintLine_("" << indent << " extrude: " << (extrude ? "true" : "false")); 79 if(flag) _pprintLine_("" << indent << " altmode: \"" << altmode << "\""); 80 if(flag) _pprintLine_("" << indent << " coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")"); 81 81 82 82 return; -
issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
r12493 r12515 43 43 bool flag=true; 44 44 45 _printf_(flag,"KML_PolyStyle:\n");45 if(flag) _pprintLine_("KML_PolyStyle:"); 46 46 KML_ColorStyle::Echo(); 47 47 48 _printf_(flag," fill: %d\n" ,fill);49 _printf_(flag," outline: %d\n" ,outline);48 if(flag) _pprintLine_(" fill: " << fill); 49 if(flag) _pprintLine_(" outline: " << outline); 50 50 51 51 return; 52 52 } 53 53 /*}}}*/ 54 55 54 /*FUNCTION KML_PolyStyle::DeepEcho {{{*/ 56 55 void KML_PolyStyle::DeepEcho(){ … … 63 62 } 64 63 /*}}}*/ 65 66 64 /*FUNCTION KML_PolyStyle::DeepEcho {{{*/ 67 65 void KML_PolyStyle::DeepEcho(const char* indent){ … … 70 68 bool flag=true; 71 69 72 _printf_(flag,"%sKML_PolyStyle:\n",indent);70 if(flag) _pprintLine_("" << indent << "KML_PolyStyle:"); 73 71 KML_ColorStyle::DeepEcho(indent); 74 72 75 _printf_(flag,"%s fill: %d\n" ,indent,fill);76 _printf_(flag,"%s outline: %d\n" ,indent,outline);73 if(flag) _pprintLine_("" << indent << " fill: " << fill); 74 if(flag) _pprintLine_("" << indent << " outline: " << outline); 77 75 78 76 return; 79 77 } 80 78 /*}}}*/ 81 82 79 /*FUNCTION KML_PolyStyle::Write {{{*/ 83 80 void KML_PolyStyle::Write(FILE* filout,const char* indent){ … … 98 95 } 99 96 /*}}}*/ 100 101 97 /*FUNCTION KML_PolyStyle::Read {{{*/ 102 98 void KML_PolyStyle::Read(FILE* fid,char* kstr){ … … 149 145 } 150 146 /*}}}*/ 151 -
issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
r12493 r12515 55 55 bool flag=true; 56 56 57 _printf_(flag,"KML_Polygon:\n");57 if(flag) _pprintLine_("KML_Polygon:"); 58 58 KML_Geometry::Echo(); 59 59 60 _printf_(flag," extrude: %s\n" ,(extrude ? "true" : "false"));61 _printf_(flag," tessellate: %s\n" ,(tessellate ? "true" : "false"));62 _printf_(flag," altmode: \"%s\"\n" ,altmode);63 _printf_(flag," outer: (size=%d)\n" ,outer->Size());64 _printf_(flag," inner: (size=%d)\n" ,inner->Size());60 if(flag) _pprintLine_(" extrude: " << (extrude ? "true" : "false")); 61 if(flag) _pprintLine_(" tessellate: " << (tessellate ? "true" : "false")); 62 if(flag) _pprintLine_(" altmode: \"" << altmode << "\""); 63 if(flag) _pprintLine_(" outer: (size=" << outer->Size() << ")"); 64 if(flag) _pprintLine_(" inner: (size=" << inner->Size() << ")"); 65 65 66 66 return; … … 84 84 bool flag=true; 85 85 86 _printf_(flag,"%sKML_Polygon:\n",indent);86 if(flag) _pprintLine_("" << indent << "KML_Polygon:"); 87 87 KML_Geometry::DeepEcho(indent); 88 88 89 _printf_(flag,"%s extrude: %s\n" ,indent,(extrude ? "true" : "false"));90 _printf_(flag,"%s tessellate: %s\n" ,indent,(tessellate ? "true" : "false"));91 _printf_(flag,"%s altmode: \"%s\"\n" ,indent,altmode);89 if(flag) _pprintLine_("" << indent << " extrude: " << (extrude ? "true" : "false")); 90 if(flag) _pprintLine_("" << indent << " tessellate: " << (tessellate ? "true" : "false")); 91 if(flag) _pprintLine_("" << indent << " altmode: \"" << altmode << "\""); 92 92 93 93 memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char)); … … 96 96 if (outer->Size()) 97 97 for (i=0; i<outer->Size(); i++) { 98 _printf_(flag,"%s outer: -------- begin [%d] --------\n" ,indent,i);98 if(flag) _pprintLine_("" << indent << " outer: -------- begin [" << i << "] --------"); 99 99 ((KML_LinearRing *)outer->GetObjectByOffset(i))->DeepEcho(indent2); 100 _printf_(flag,"%s outer: -------- end [%d] --------\n" ,indent,i);100 if(flag) _pprintLine_("" << indent << " outer: -------- end [" << i << "] --------"); 101 101 } 102 102 else 103 _printf_(flag,"%s outer: [empty]\n" ,indent);103 if(flag) _pprintLine_("" << indent << " outer: [empty]"); 104 104 105 105 if (inner->Size()) 106 106 for (i=0; i<inner->Size(); i++) { 107 _printf_(flag,"%s inner: -------- begin [%d] --------\n" ,indent,i);107 if(flag) _pprintLine_("" << indent << " inner: -------- begin [" << i << "] --------"); 108 108 ((KML_LinearRing *)inner->GetObjectByOffset(i))->DeepEcho(indent2); 109 _printf_(flag,"%s inner: -------- end [%d] --------\n" ,indent,i);109 if(flag) _pprintLine_("" << indent << " inner: -------- end [" << i << "] --------"); 110 110 } 111 111 else 112 _printf_(flag,"%s inner: [empty]\n" ,indent);112 if(flag) _pprintLine_("" << indent << " inner: [empty]"); 113 113 114 114 return; -
issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp
r12493 r12515 74 74 bool flag=true; 75 75 76 _printf_(flag,"KML_Style:\n");76 if(flag) _pprintLine_("KML_Style:"); 77 77 KML_StyleSelector::Echo(); 78 78 79 _printf_(flag," icon: %p\n" ,icon); 80 _printf_(flag," label: %p\n" ,label); 81 _printf_(flag," line: %p\n" ,line); 82 _printf_(flag," poly: %p\n" ,poly); 83 _printf_(flag," balloon: %p\n" ,balloon); 84 _printf_(flag," list: %p\n" ,list); 85 86 return; 87 } 88 /*}}}*/ 89 79 if(flag) _pprintLine_(" icon: " << icon); 80 if(flag) _pprintLine_(" label: " << label); 81 if(flag) _pprintLine_(" line: " << line); 82 if(flag) _pprintLine_(" poly: " << poly); 83 if(flag) _pprintLine_(" balloon: " << balloon); 84 if(flag) _pprintLine_(" list: " << list); 85 86 return; 87 } 88 /*}}}*/ 90 89 /*FUNCTION KML_Style::DeepEcho {{{*/ 91 90 void KML_Style::DeepEcho(){ … … 98 97 } 99 98 /*}}}*/ 100 101 99 /*FUNCTION KML_Style::DeepEcho {{{*/ 102 100 void KML_Style::DeepEcho(const char* indent){ … … 105 103 bool flag=true; 106 104 107 _printf_(flag,"%sKML_Style:\n",indent);105 if(flag) _pprintLine_("" << indent << "KML_Style:"); 108 106 KML_StyleSelector::DeepEcho(indent); 109 107 … … 114 112 // icon->DeepEcho(indent2); 115 113 // else 116 _printf_(flag,"%s icon: %p\n" ,indent,icon);114 if(flag) _pprintLine_("" << indent << " icon: " << icon); 117 115 // if (label) 118 116 // label->DeepEcho(indent2); 119 117 // else 120 _printf_(flag,"%s label: %p\n" ,indent,label);118 if(flag) _pprintLine_("" << indent << " label: " << label); 121 119 if (line) 122 120 line->DeepEcho(indent2); 123 121 else 124 _printf_(flag,"%s line: %p\n" ,indent,line);122 if(flag) _pprintLine_("" << indent << " line: " << line); 125 123 if (poly) 126 124 poly->DeepEcho(indent2); 127 125 else 128 _printf_(flag,"%s poly: %p\n" ,indent,poly);126 if(flag) _pprintLine_("" << indent << " poly: " << poly); 129 127 // if (balloon) 130 128 // balloon->DeepEcho(indent2); 131 129 // else 132 _printf_(flag,"%s balloon: %p\n" ,indent,balloon);130 if(flag) _pprintLine_("" << indent << " balloon: " << balloon); 133 131 // if (list) 134 132 // list->DeepEcho(indent2); 135 133 // else 136 _printf_(flag,"%s list: %p\n" ,indent,list); 137 138 return; 139 } 140 /*}}}*/ 141 134 if(flag) _pprintLine_("" << indent << " list: " << list); 135 136 return; 137 } 138 /*}}}*/ 142 139 /*FUNCTION KML_Style::Write {{{*/ 143 140 void KML_Style::Write(FILE* filout,const char* indent){ … … 174 171 } 175 172 /*}}}*/ 176 177 173 /*FUNCTION KML_Style::Read {{{*/ 178 174 void KML_Style::Read(FILE* fid,char* kstr){ … … 246 242 } 247 243 /*}}}*/ 248 -
issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
r12493 r12515 44 44 bool flag=true; 45 45 46 _printf_(flag,"KML_Unknown %s:\n",name);46 if(flag) _pprintLine_("KML_Unknown " << name << ":"); 47 47 KML_Object::Echo(); 48 48 49 49 if (value ) 50 _printf_(flag," value: \"%s\"\n" ,value);50 if(flag) _pprintLine_(" value: \"" << value << "\""); 51 51 else 52 _printf_(flag," value: [none]\n");52 if(flag) _pprintLine_(" value: [none]"); 53 53 54 54 return; … … 73 73 bool flag=true; 74 74 75 _printf_(flag,"%sKML_Unknown %s:\n",indent,name);75 if(flag) _pprintLine_("" << indent << "KML_Unknown " << name << ":"); 76 76 KML_Object::DeepEcho(indent); 77 77 … … 81 81 82 82 vtoken=strtok(valuei,nl); 83 _printf_(flag,"%s value: \"%s" ,indent,vtoken);83 if(flag) _pprintString_("" << indent << " value: \"" << vtoken); 84 84 85 85 while (vtoken=strtok(NULL,nl)) 86 _printf_(flag,"\n%s %s" ,indent,vtoken);87 _printf_(flag,"\"\n");86 if(flag) _pprintString_("\n" << indent << " " << vtoken); 87 if(flag) _pprintLine_("\""); 88 88 89 89 xfree((void**)&valuei); 90 90 } 91 91 else 92 _printf_(flag,"%s value: [none]\n" ,indent);92 if(flag) _pprintLine_("" << indent << " value: [none]"); 93 93 94 94 return; … … 139 139 name=KMLFileTagName(NULL, 140 140 kstr); 141 // _printf_(true,"KML_Unknown::Read -- opening name=%s.\n",name);141 // if(true) _pprintLine_("KML_Unknown::Read -- opening name=" << name << "."); 142 142 143 143 /* get object attributes and check for solo tag */ … … 151 151 while (kstri=KMLFileToken(fid, 152 152 &ncom,&pcom)) { 153 // _printf_(true,"KML_Unknown::Read -- kstri=%s.\n",kstri);153 // if(true) _pprintLine_("KML_Unknown::Read -- kstri=" << kstri << "."); 154 154 if (!strncmp(&kstri[0],"</", 2) && 155 155 !strncmp(&kstri[2],name,strlen(name))) { 156 // _printf_(true,"KML_Unknown::Read -- closing name=%s.\n",name);156 // if(true) _pprintLine_("KML_Unknown::Read -- closing name=" << name << "."); 157 157 xfree((void**)&kstri); 158 158 break; -
issm/trunk-jpl/src/c/objects/Options/Option.cpp
r12454 r12515 47 47 bool flag=true; 48 48 49 _printf_(flag," name: \"%s\"\n" ,name);50 _printf_(flag," numel: %d\n" ,numel);51 _printf_(flag," ndims: %d\n" ,ndims);49 if(flag) _pprintLine_(" name: \"" << name << "\""); 50 if(flag) _pprintLine_(" numel: " << numel); 51 if(flag) _pprintLine_(" ndims: " << ndims); 52 52 if(size){ 53 53 StringFromSize(cstr,size,ndims); 54 _printf_(flag," size: %s\n" ,cstr);54 if(flag) _pprintLine_(" size: " << cstr); 55 55 } 56 else _printf_(flag," size: [empty]\n");56 else if(flag) _pprintLine_(" size: [empty]"); 57 57 } 58 58 /*}}}*/ … … 73 73 bool flag=true; 74 74 75 _printf_(flag,"%s name: \"%s\"\n" ,indent,name);76 _printf_(flag,"%s numel: %d\n" ,indent,numel);77 _printf_(flag,"%s ndims: %d\n" ,indent,ndims);75 if(flag) _pprintLine_("" << indent << " name: \"" << name << "\""); 76 if(flag) _pprintLine_("" << indent << " numel: " << numel); 77 if(flag) _pprintLine_("" << indent << " ndims: " << ndims); 78 78 if(size){ 79 79 StringFromSize(cstr,size,ndims); 80 _printf_(flag,"%s size: %s\n" ,indent,cstr);80 if(flag) _pprintLine_("" << indent << " size: " << cstr); 81 81 } 82 else _printf_(flag,"%s size: [empty]\n" ,indent);82 else if(flag) _pprintLine_("" << indent << " size: [empty]"); 83 83 } 84 84 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp
r12473 r12515 46 46 bool flag = true; 47 47 48 _printf_(flag,"OptionCell Echo:\n");48 if(flag) _pprintLine_("OptionCell Echo:"); 49 49 Option::Echo(); 50 50 51 51 if (values && size) { 52 52 StringFromSize(cstr,size,ndims); 53 _printf_(flag," values: %s %s\n" ,cstr,"cell");53 if(flag) _pprintLine_(" values: " << cstr << " " << "cell"); 54 54 } 55 else _printf_(flag," values: [empty]\n");55 else if(flag) _pprintLine_(" values: [empty]"); 56 56 } 57 57 /*}}}*/ … … 75 75 bool flag=true; 76 76 77 _printf_(flag,"%sOptionCell DeepEcho:\n",indent);77 if(flag) _pprintLine_("" << indent << "OptionCell DeepEcho:"); 78 78 Option::DeepEcho(indent); 79 79 … … 86 86 ColumnWiseDimsFromIndex(dims,i,size,ndims); 87 87 StringFromDims(cstr,dims,ndims); 88 _printf_(flag,"%s values: -------- begin %s --------\n" ,indent,cstr);88 if(flag) _pprintLine_("" << indent << " values: -------- begin " << cstr << " --------"); 89 89 ((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2); 90 _printf_(flag,"%s values: -------- end %s --------\n" ,indent,cstr);90 if(flag) _pprintLine_("" << indent << " values: -------- end " << cstr << " --------"); 91 91 } 92 92 xDelete<int>(dims); 93 93 } 94 else _printf_(flag,"%s values: [empty]\n" ,indent);94 else if(flag) _pprintLine_("" << indent << " values: [empty]"); 95 95 } 96 96 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp
r12493 r12515 43 43 bool flag=true; 44 44 45 _printf_(flag,"OptionChar Echo:\n");45 if(flag) _pprintLine_("OptionChar Echo:"); 46 46 Option::Echo(); 47 47 … … 49 49 // if (numel == 1) { 50 50 if (1) { 51 // _printf_(flag," values: \"%s\"\n" ,values[0]);52 _printf_(flag," values: \"%s\"\n" ,values);51 // if(flag) _pprintLine_(" values: \"" << values[0] << "\""); 52 if(flag) _pprintLine_(" values: \"" << values << "\""); 53 53 } 54 54 else { 55 55 StringFromSize(cstr,size,ndims); 56 _printf_(flag," values: %s %s\n" ,cstr,"char");56 if(flag) _pprintLine_(" values: " << cstr << " " << "char"); 57 57 } 58 58 } 59 else _printf_(flag," values: [empty]\n");59 else if(flag) _pprintLine_(" values: [empty]"); 60 60 } 61 61 /*}}}*/ … … 79 79 bool flag=true; 80 80 81 _printf_(flag,"%sOptionChar DeepEcho:\n",indent);81 if(flag) _pprintLine_("" << indent << "OptionChar DeepEcho:"); 82 82 Option::DeepEcho(indent); 83 83 … … 87 87 if (values) { 88 88 if (ndims == 2 && size[0] == 1) { 89 _printf_(flag,"%s values: \"%s\"\n" ,indent,values);89 if(flag) _pprintLine_("" << indent << " values: \"" << values << "\""); 90 90 } 91 91 else { … … 97 97 RowWiseDimsFromIndex(dims,ipt,size,ndims); 98 98 StringFromDims(cstr,dims,ndims); 99 _printf_(flag,"%s values%s: \"%.*s\"\n" ,indent,cstr,size[1],&(values[ipt]));99 if(flag) _pprintLine_("" << indent << " values" << cstr << ": \"" << size[1] << "*s\""); 100 100 ipt+=size[1]; 101 101 } … … 103 103 } 104 104 } 105 else _printf_(flag,"%s values: [empty]\n" ,indent);105 else if(flag) _pprintLine_("" << indent << " values: [empty]"); 106 106 } 107 107 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp
r12493 r12515 43 43 bool flag=true; 44 44 45 _printf_(flag,"OptionDouble Echo:\n");45 if(flag) _pprintLine_("OptionDouble Echo:"); 46 46 Option::Echo(); 47 47 48 48 if (values && size) { 49 if(numel == 1) _printf_(flag," values: %g\n" ,values[0]);49 if(numel == 1) if(flag) _pprintLine_(" values: " << values[0]); 50 50 else { 51 51 StringFromSize(cstr,size,ndims); 52 _printf_(flag," values: %s %s\n" ,cstr,"IssmPDouble");52 if(flag) _pprintLine_(" values: " << cstr << " " << "IssmPDouble"); 53 53 } 54 54 } 55 else _printf_(flag," values: [empty]\n");55 else if(flag) _pprintLine_(" values: [empty]"); 56 56 } 57 57 /*}}}*/ … … 75 75 bool flag=true; 76 76 77 _printf_(flag,"%sOptionDouble DeepEcho:\n",indent);77 if(flag) _pprintLine_("" << indent << "OptionDouble DeepEcho:"); 78 78 Option::DeepEcho(indent); 79 79 … … 83 83 if (values) { 84 84 dims=xNew<int>(ndims); 85 if(numel==1) _printf_(flag,"%s values: %g\n" ,indent,values[0]);85 if(numel==1) if(flag) _pprintLine_("" << indent << " values: " << values[0]); 86 86 else{ 87 87 for (i=0; i<numel; i++) { 88 88 RowWiseDimsFromIndex(dims,i,size,ndims); 89 89 StringFromDims(cstr,dims,ndims); 90 _printf_(flag,"%s values%s: %g\n" ,indent,cstr,values[i]);90 if(flag) _pprintLine_("" << indent << " values" << cstr << ": " << values[i]); 91 91 } 92 92 } 93 93 xDelete<int>(dims); 94 94 } 95 else _printf_(flag,"%s values: [empty]\n" ,indent);95 else if(flag) _pprintLine_("" << indent << " values: [empty]"); 96 96 } 97 97 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp
r12493 r12515 43 43 bool flag=true; 44 44 45 _printf_(flag,"OptionLogical Echo:\n");45 if(flag) _pprintLine_("OptionLogical Echo:"); 46 46 Option::Echo(); 47 47 48 48 if (values && size) { 49 if(numel == 1) _printf_(flag," values: %s\n" ,(values[0] ? "true" : "false"));49 if(numel == 1) if(flag) _pprintLine_(" values: " << (values[0] ? "true" : "false")); 50 50 else{ 51 51 StringFromSize(cstr,size,ndims); 52 _printf_(flag," values: %s %s\n" ,cstr,"logical");52 if(flag) _pprintLine_(" values: " << cstr << " " << "logical"); 53 53 } 54 54 } 55 else _printf_(flag," values: [empty]\n");55 else if(flag) _pprintLine_(" values: [empty]"); 56 56 } 57 57 /*}}}*/ … … 75 75 bool flag=true; 76 76 77 _printf_(flag,"%sOptionLogical DeepEcho:\n",indent);77 if(flag) _pprintLine_("" << indent << "OptionLogical DeepEcho:"); 78 78 Option::DeepEcho(indent); 79 79 … … 82 82 83 83 if (values) { 84 if(numel==1) _printf_(flag,"%s values: %s\n" ,indent,(values[0] ? "true" : "false"));84 if(numel==1) if(flag) _pprintLine_("" << indent << " values: " << (values[0] ? "true" : "false")); 85 85 else{ 86 86 dims=xNew<int>(ndims); … … 88 88 RowWiseDimsFromIndex(dims,i,size,ndims); 89 89 StringFromDims(cstr,dims,ndims); 90 _printf_(flag,"%s values%s: %s\n" ,indent,cstr,(values[i] ? "true" : "false"));90 if(flag) _pprintLine_("" << indent << " values" << cstr << ": " << (values[i] ? "true" : "false")); 91 91 } 92 92 xDelete<int>(dims); 93 93 } 94 94 } 95 else _printf_(flag,"%s values: [empty]\n" ,indent);95 else if(flag) _pprintLine_("" << indent << " values: [empty]"); 96 96 } 97 97 /*}}}*/ -
issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp
r12493 r12515 51 51 bool flag=true; 52 52 53 _printf_(flag,"OptionStruct Echo:\n");53 if(flag) _pprintLine_("OptionStruct Echo:"); 54 54 Option::Echo(); 55 55 56 56 if (values && size) { 57 57 StringFromSize(cstr,size,ndims); 58 _printf_(flag," values: %s %s\n" ,cstr,"struct");58 if(flag) _pprintLine_(" values: " << cstr << " " << "struct"); 59 59 } 60 else _printf_(flag," values: [empty]\n");60 else if(flag) _pprintLine_(" values: [empty]"); 61 61 } 62 62 /*}}}*/ … … 80 80 bool flag=true; 81 81 82 _printf_(flag,"%sOptionStruct DeepEcho:\n",indent);82 if(flag) _pprintLine_("" << indent << "OptionStruct DeepEcho:"); 83 83 Option::DeepEcho(indent); 84 84 … … 92 92 StringFromDims(cstr,dims,ndims); 93 93 if (values[i]->Size()){ 94 _printf_(flag,"%s values: -------- begin %s --------\n" ,indent,cstr);94 if(flag) _pprintLine_("" << indent << " values: -------- begin " << cstr << " --------"); 95 95 for (j=0; j<values[i]->Size(); j++) ((Option *)values[i]->GetObjectByOffset(j))->DeepEcho(indent2); 96 _printf_(flag,"%s values: -------- end %s --------\n" ,indent,cstr);96 if(flag) _pprintLine_("" << indent << " values: -------- end " << cstr << " --------"); 97 97 } 98 else _printf_(flag,"%s values: %s [empty]\n" ,indent,cstr);98 else if(flag) _pprintLine_("" << indent << " values: " << cstr << " [empty]"); 99 99 } 100 100 xDelete<int>(dims); 101 101 } 102 else _printf_(flag,"%s values: [empty]\n" ,indent);102 else if(flag) _pprintLine_("" << indent << " values: [empty]"); 103 103 } 104 104 /*}}}*/ -
issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
r12512 r12515 91 91 _pprintLine_(" "<<setw(5)<<iter<<" "<<setw(12)<<xbest<<" "<<setw(12)<<fxbest<<" "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<" initial"); 92 92 if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){ 93 _printf_(VerboseControl()," optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);93 if(VerboseControl()) _pprintLine_(" optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump); 94 94 loop=false; 95 95 } … … 190 190 /*Stop the optimization?*/ 191 191 if (sqrt(pow(xbest-xm,2)) < (tol2-0.5*(xmax-xmin))){ 192 _printf_(VerboseControl()," optimization terminated: current x satisfies criteria 'tolx'=%g\n",tolerance);192 if(VerboseControl()) _pprintLine_(" optimization terminated: current x satisfies criteria 'tolx'=" << tolerance); 193 193 loop=false; 194 194 } 195 195 else if (iter>=maxiter){ 196 _printf_(VerboseControl()," exiting: Maximum number of iterations has been exceeded ('maxiter'=%i)\n",maxiter);196 if(VerboseControl()) _pprintLine_(" exiting: Maximum number of iterations has been exceeded ('maxiter'=" << maxiter << ")"); 197 197 loop=false; 198 198 } 199 199 else if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){ 200 _printf_(VerboseControl()," optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);200 if(VerboseControl()) _pprintLine_(" optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump); 201 201 loop=false; 202 202 } -
issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
r12495 r12515 51 51 sizeof(wgt4 )/sizeof(IssmPDouble)}; 52 52 53 // _printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);53 // if(true) _pprintLine_("Gauss-Legendre recurrence coefficients ngaus=" << ngaus); 54 54 *pxgaus =xNew<IssmPDouble>(ngaus); 55 55 *pxwgt =xNew<IssmPDouble>(ngaus); … … 1139 1139 sizeof(wgt20)/sizeof(IssmPDouble)}; 1140 1140 1141 // _printf_(true,"GaussLegendreTria: iord=%d\n",iord);1141 // if(true) _pprintLine_("GaussLegendreTria: iord=" << iord); 1142 1142 1143 1143 /* check to see if Gauss points need to be calculated */ … … 1199 1199 } 1200 1200 1201 // _printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus);1201 // if(true) _pprintLine_("GaussLegendreTria - ngaus=" << *pngaus); 1202 1202 // for (i=0; i<*pngaus; i++) 1203 1203 // _printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n", … … 1398 1398 sizeof(wgt6 )/sizeof(IssmPDouble)}; 1399 1399 1400 // _printf_(true,"GaussLegendreTetra: iord=%d\n",iord);1400 // if(true) _pprintLine_("GaussLegendreTetra: iord=" << iord); 1401 1401 1402 1402 /* check to see if Gauss points need to be calculated */ … … 1521 1521 sizeof(wgt5 )/sizeof(IssmPDouble)}; 1522 1522 1523 // _printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);1523 // if(true) _pprintLine_("Gauss-Lobatto recurrence coefficients ngaus=" << ngaus); 1524 1524 *pxgaus =xNew<IssmPDouble>(ngaus); 1525 1525 *pxwgt =xNew<IssmPDouble>(ngaus); -
issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
r12513 r12515 63 63 //Stop the optimization? 64 64 if ((fabs(x2-x1)+seps)<tolerance || (fabs(fx2-fx1)+seps)<tolerance){ 65 _printf_(VerboseControl()," %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance);65 if(VerboseControl()) _pprintLine_(" " << "optimization terminated: the current x satisfies the termination criteria using 'tolx' of " << tolerance); 66 66 loop=false; 67 67 } 68 68 else if (iter>=maxiter){ 69 _printf_(VerboseControl()," %s\n","exiting: Maximum number of iterations has been exceeded - increase 'maxiter'\n");69 if(VerboseControl()) _pprintLine_(" " << "exiting: Maximum number of iterations has been exceeded - increase 'maxiter'"); 70 70 loop=false; 71 71 } -
issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp
r11679 r12515 15 15 int i; 16 16 17 _printf_(VerboseSolution(),"%s\n"," updating boundary conditions...");17 if(VerboseSolution()) _pprintLine_("" << " updating boundary conditions..."); 18 18 19 19 /*set current analysis: */ -
issm/trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp
r11832 r12515 22 22 23 23 /*compute thickness */ 24 _printf_(VerboseSolution(),"%s\n"," computing thickness");24 if(VerboseSolution()) _pprintLine_("" << " computing thickness"); 25 25 femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum); 26 26 solver_linear(femmodel); … … 30 30 31 31 /*compute adjoint*/ 32 _printf_(VerboseSolution(),"%s\n"," computing adjoint");32 if(VerboseSolution()) _pprintLine_("" << " computing adjoint"); 33 33 femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum,AdjointBalancethicknessAnalysisEnum); 34 34 solver_adjoint_linear(femmodel); … … 36 36 /*Save results*/ 37 37 if(save_results){ 38 _printf_(VerboseSolution()," saving results\n");38 if(VerboseSolution()) _pprintLine_(" saving results"); 39 39 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointEnum); 40 40 } -
issm/trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp
r11832 r12515 25 25 26 26 /*Compute velocities*/ 27 _printf_(VerboseSolution(),"%s\n"," computing velocities");27 if(VerboseSolution()) _pprintLine_("" << " computing velocities"); 28 28 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum); 29 29 solver_nonlinear(femmodel,conserve_loads); … … 33 33 34 34 /*Compute adjoint*/ 35 _printf_(VerboseSolution(),"%s\n"," computing adjoint");35 if(VerboseSolution()) _pprintLine_("" << " computing adjoint"); 36 36 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum); 37 37 solver_adjoint_linear(femmodel); … … 39 39 /*Save results*/ 40 40 if(save_results){ 41 _printf_(VerboseSolution()," saving results\n");41 if(VerboseSolution()) _pprintLine_(" saving results"); 42 42 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum); 43 43 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum); -
issm/trunk-jpl/src/c/solutions/balancethickness_core.cpp
r11832 r12515 24 24 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 25 25 26 _printf_(VerboseSolution(),"call computational core:\n");26 if(VerboseSolution()) _pprintLine_("call computational core:"); 27 27 solver_linear(femmodel); 28 28 29 29 if(save_results){ 30 _printf_(VerboseSolution()," saving results\n");30 if(VerboseSolution()) _pprintLine_(" saving results"); 31 31 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum); 32 32 } -
issm/trunk-jpl/src/c/solutions/bedslope_core.cpp
r11832 r12515 19 19 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 20 20 21 _printf_(VerboseSolution(),"%s\n"," computing slope");21 if(VerboseSolution()) _pprintLine_("" << " computing slope"); 22 22 23 23 /*Call on core computations: */ … … 28 28 29 29 if(save_results){ 30 _printf_(VerboseSolution()," saving results\n");30 if(VerboseSolution()) _pprintLine_(" saving results"); 31 31 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeXEnum); 32 32 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeYEnum); -
issm/trunk-jpl/src/c/solutions/control_core.cpp
r12477 r12515 66 66 67 67 /*Launch once a complete solution to set up all inputs*/ 68 _printf_(VerboseControl(),"%s\n"," preparing initial solution");68 if(VerboseControl()) _pprintLine_("" << " preparing initial solution"); 69 69 if(isstokes) solutioncore(femmodel); 70 70 … … 81 81 82 82 /*Display info*/ 83 _printf_(VerboseControl(),"\n%s%i%s%i\n"," control method step ",n+1,"/",nsteps);83 if(VerboseControl()) _pprintLine_("\n" << " control method step " << n+1 << "/" << nsteps); 84 84 for(i=0;i<num_responses;i++) step_responses[i]=(int)responses[n*num_responses+i]; 85 85 femmodel->parameters->SetParam(step_responses,1,num_responses,StepResponsesEnum); … … 88 88 if(solution_type==SteadystateSolutionEnum) solutioncore(femmodel); 89 89 90 _printf_(VerboseControl(),"%s\n"," compute adjoint state:");90 if(VerboseControl()) _pprintLine_("" << " compute adjoint state:"); 91 91 adjointcore(femmodel); 92 92 gradient_core(femmodel,n,search_scalar==0); … … 98 98 } 99 99 100 _printf_(VerboseControl(),"%s\n"," optimizing along gradient direction");100 if(VerboseControl()) _pprintLine_("" << " optimizing along gradient direction"); 101 101 optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n]; 102 102 BrentSearch(&search_scalar,J+n,&optpars,&objectivefunction,&optargs); 103 103 104 _printf_(VerboseControl(),"%s\n"," updating parameter using optimized search scalar"); //true means update save controls104 if(VerboseControl()) _pprintLine_("" << " updating parameter using optimized search scalar"); //true means update save controls 105 105 InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true); 106 106 … … 108 108 } 109 109 110 _printf_(VerboseControl(),"%s\n"," preparing final solution");110 if(VerboseControl()) _pprintLine_("" << " preparing final solution"); 111 111 femmodel->parameters->SetParam(true,SaveResultsEnum); 112 112 solutioncore(femmodel); -
issm/trunk-jpl/src/c/solutions/controlconvergence.cpp
r12477 r12515 25 25 if (!isnan(tol_cm) && J<tol_cm){ 26 26 converged=true; 27 _printf_(VerboseConvergence()," Convergence criterion reached: J = %g < %g",J,tol_cm);27 if(VerboseConvergence()) _pprintString_(" Convergence criterion reached: J = " << J << " < " << tol_cm); 28 28 } 29 29 -
issm/trunk-jpl/src/c/solutions/controltao_core.cpp
r12513 r12515 54 54 /*Initialize TAO*/ 55 55 TaoCreate(PETSC_COMM_WORLD,&tao); 56 _printf_(VerboseControl(),"%s\n"," Initializing the Toolkit for Advanced Optimization (TAO)");56 if(VerboseControl()) _pprintLine_("" << " Initializing the Toolkit for Advanced Optimization (TAO)"); 57 57 TaoSetFromOptions(tao); 58 58 TaoSetType(tao,"tao_blmvm"); … … 78 78 79 79 /*Solver optimization problem*/ 80 _printf_(VerboseControl(),"%s\n"," Starting optimization");80 if(VerboseControl()) _pprintLine_("" << " Starting optimization"); 81 81 TaoSolve(tao); 82 82 TaoView(tao,PETSC_VIEWER_STDOUT_WORLD); … … 88 88 89 89 /*Finalize*/ 90 _printf_(VerboseControl(),"%s\n"," preparing final solution");90 if(VerboseControl()) _pprintLine_("" << " preparing final solution"); 91 91 femmodel->parameters->SetParam(true,SaveResultsEnum); 92 92 void (*solutioncore)(FemModel*)=NULL; … … 163 163 164 164 TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL); 165 if(its==0) _printf_(true,"Iter Function Residual | List of contributions\n");166 if(its==0) _printf_(true,"-----------------------------------+-----------------------\n");165 if(its==0) if(true) _pprintLine_("Iter Function Residual | List of contributions"); 166 if(its==0) if(true) _pprintLine_("-----------------------------------+-----------------------"); 167 167 _pprintString_(setw(4)<<its<<" "<<setw(12)<<setprecision(7)<<f<<" "<<setw(12)<<setprecision(7)<<gnorm<<" | "); 168 168 -
issm/trunk-jpl/src/c/solutions/convergence.cpp
r12493 r12515 55 55 nF=pf->Norm(NORM_TWO); 56 56 solver_residue=nKUF/nF; 57 _printf_(true,"\n%s%g\n"," solver residue: norm(KU-F)/norm(F)=",solver_residue);57 if(true) _pprintLine_("\n" << " solver residue: norm(KU-F)/norm(F)=" << solver_residue); 58 58 59 59 //clean up … … 71 71 res=nKUoldF/nF; 72 72 if (isnan(res)){ 73 _printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);73 if(true) _pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f"); 74 74 _error2_("mechanical equilibrium convergence criterion is NaN!"); 75 75 } … … 81 81 //print 82 82 if(res<eps_res){ 83 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");83 if(VerboseConvergence()) _pprintLine_("" << " mechanical equilibrium convergence criterion" << "50s" << res*100 << " < " << eps_res*100 << " %"); 84 84 converged=true; 85 85 } 86 86 else{ 87 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");87 if(VerboseConvergence()) _pprintLine_("" << " mechanical equilibrium convergence criterion" << "50s" << res*100 << " > " << eps_res*100 << " %"); 88 88 converged=false; 89 89 } … … 104 104 if (!isnan(eps_rel)){ 105 105 if((ndu/nu)<eps_rel){ 106 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");106 if(VerboseConvergence()) _pprintLine_("" << " Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %"); 107 107 } 108 108 else{ 109 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");109 if(VerboseConvergence()) _pprintLine_("" << " Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " > " << eps_rel*100 << " %"); 110 110 converged=false; 111 111 } 112 112 } 113 else _printf_(true,"%-50s%g%s\n"," Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %");113 else if(true) _pprintLine_("" << " Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %"); 114 114 115 115 } … … 129 129 if (!isnan(eps_abs)){ 130 130 if ((nduinf*yts)<eps_abs){ 131 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");131 if(VerboseConvergence()) _pprintLine_("" << " Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr"); 132 132 } 133 133 else{ 134 _printf_(VerboseConvergence(),"%-50s%g%s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");134 if(VerboseConvergence()) _pprintLine_("" << " Convergence criterion: max(du)" << "50s" << nduinf*yts << " > " << eps_abs << " m/yr"); 135 135 converged=false; 136 136 } 137 137 } 138 else _printf_(true,"%-50s%g%s\n"," Convergence criterion: max(du)",nduinf*yts," m/yr");138 else if(true) _pprintLine_("" << " Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr"); 139 139 140 140 } -
issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp
r12439 r12515 59 59 if(ishutter){ 60 60 61 _printf_(VerboseSolution(),"%s\n"," computing hutter velocities");61 if(VerboseSolution()) _pprintLine_("" << " computing hutter velocities"); 62 62 63 63 //Take the last velocity into account so that the velocity on the MacAyeal domain is not zero … … 72 72 if (ismacayealpattyn ^ isstokes){ // ^ = xor 73 73 74 _printf_(VerboseSolution(),"%s\n"," computing velocities");74 if(VerboseSolution()) _pprintLine_("" << " computing velocities"); 75 75 femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum); 76 76 if(isnewton) … … 82 82 if (ismacayealpattyn && isstokes){ 83 83 84 _printf_(VerboseSolution(),"%s\n"," computing coupling macayealpattyn and stokes velocities and pressure ");84 if(VerboseSolution()) _pprintLine_("" << " computing coupling macayealpattyn and stokes velocities and pressure "); 85 85 solver_stokescoupling_nonlinear(femmodel,conserve_loads); 86 86 } … … 88 88 if (dim==3 & (ishutter || ismacayealpattyn)){ 89 89 90 _printf_(VerboseSolution(),"%s\n"," computing vertical velocities");90 if(VerboseSolution()) _pprintLine_("" << " computing vertical velocities"); 91 91 femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum); 92 92 solver_linear(femmodel); … … 95 95 96 96 if(save_results){ 97 _printf_(VerboseSolution()," saving results\n");97 if(VerboseSolution()) _pprintLine_(" saving results"); 98 98 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum); 99 99 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum); -
issm/trunk-jpl/src/c/solutions/enthalpy_core.cpp
r11830 r12515 21 21 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 22 22 23 _printf_(VerboseSolution()," computing enthalpy\n");23 if(VerboseSolution()) _pprintLine_(" computing enthalpy"); 24 24 femmodel->SetCurrentConfiguration(EnthalpyAnalysisEnum); 25 25 solver_nonlinear(femmodel,true); … … 29 29 30 30 if(save_results){ 31 _printf_(VerboseSolution()," saving results\n");31 if(VerboseSolution()) _pprintLine_(" saving results"); 32 32 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum); 33 33 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum); -
issm/trunk-jpl/src/c/solutions/gradient_core.cpp
r12493 r12515 23 23 24 24 /*Compute gradient*/ 25 _printf_(VerboseControl()," compute cost function gradient\n");25 if(VerboseControl()) _pprintLine_(" compute cost function gradient"); 26 26 Gradjx(&gradient,&norm_list,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters); 27 27 28 28 if (orthogonalize){ 29 _printf_(VerboseControl()," orthogonalization\n");29 if(VerboseControl()) _pprintLine_(" orthogonalization"); 30 30 ControlInputGetGradientx(&old_gradient,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters); 31 31 Orthx(&new_gradient,gradient,old_gradient); xdelete(&old_gradient); xdelete(&gradient); -
issm/trunk-jpl/src/c/solutions/hydrology_core.cpp
r12477 r12515 45 45 for(i=0;i<nsteps;i++){ 46 46 47 if(nsteps) _printf_(VerboseSolution(),"time step:%i/%i\n",i+1,nsteps);47 if(nsteps)if(VerboseSolution()) _pprintLine_("time step:" << i+1 << "/" << nsteps); 48 48 time+=dt; 49 49 femmodel->parameters->SetParam(time,TimeEnum); … … 53 53 54 54 if(save_results && ((i+1)%output_frequency==0 || (i+1)==nsteps)){ 55 _printf_(VerboseSolution()," saving results \n");55 if(VerboseSolution()) _pprintLine_(" saving results "); 56 56 //InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,i+1,time); 57 57 //InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,HydrologyWaterVxEnum,i+1,time); … … 59 59 60 60 /*unload results*/ 61 _printf_(VerboseSolution()," saving temporary results\n");61 if(VerboseSolution()) _pprintLine_(" saving temporary results"); 62 62 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results); 63 63 } -
issm/trunk-jpl/src/c/solutions/hydrology_core_step.cpp
r12477 r12515 17 17 bool modify_loads=true; 18 18 19 _printf_(VerboseSolution()," computing water column\n");19 if(VerboseSolution()) _pprintLine_(" computing water column"); 20 20 femmodel->SetCurrentConfiguration(HydrologyAnalysisEnum); 21 21 solver_nonlinear(femmodel,modify_loads); -
issm/trunk-jpl/src/c/solutions/issm.cpp
r12512 r12515 60 60 61 61 /*First process inputs*/ 62 _printf_(true,"\n");63 _printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);64 _printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);65 _printf_(true,"\n");62 if(true) _pprintLine_(""); 63 if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION); 64 if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")"); 65 if(true) _pprintLine_(""); 66 66 ProcessArguments(&solution_type,&binfilename,&outbinfilename,&petscfilename,&lockfilename,argc,argv); 67 67 … … 100 100 #endif 101 101 102 _printf_(true,"call computational core:\n");102 if(true) _pprintLine_("call computational core:"); 103 103 #ifdef _HAVE_MPI_ 104 104 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); … … 133 133 #endif 134 134 135 _printf_(true,"write results to disk:\n");135 if(true) _pprintLine_("write results to disk:"); 136 136 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results); 137 137 … … 139 139 pfclose(output_fid,lockfilename); 140 140 if (waitonlock>0){ 141 _printf_(true,"write lock file:\n");141 if(true) _pprintLine_("write lock file:"); 142 142 WriteLockFile(lockfilename); 143 143 } … … 174 174 175 175 #ifdef _HAVE_PETSC_ 176 _printf_(true,"closing MPI and Petsc\n");176 if(true) _pprintLine_("closing MPI and Petsc"); 177 177 PetscFinalize(); 178 178 #else 179 179 #ifdef _HAVE_MPI_ 180 _printf_(true,"closing MPI and Petsc\n");180 if(true) _pprintLine_("closing MPI and Petsc"); 181 181 MPI_Finalize(); 182 182 #endif -
issm/trunk-jpl/src/c/solutions/kriging.cpp
r12493 r12515 54 54 55 55 /*First process inputs*/ 56 _printf_(true,"\n");57 _printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);58 _printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);59 _printf_(true,"\n");56 if(true) _pprintLine_(""); 57 if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION); 58 if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")"); 59 if(true) _pprintLine_(""); 60 60 ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,argc,argv); 61 61 … … 65 65 pfclose(input_fid,binfilename); 66 66 67 _printf_(true,"call computational core:\n");67 if(true) _pprintLine_("call computational core:"); 68 68 pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options); 69 69 70 _printf_(true,"write results to disk:\n");70 if(true) _pprintLine_("write results to disk:"); 71 71 Results *results = new Results(); 72 72 if(my_rank==0){ … … 82 82 83 83 /*Close output and petsc options file and write lock file if requested*/ 84 _printf_(true,"write lock file:\n");84 if(true) _pprintLine_("write lock file:"); 85 85 WriteLockFile(lockfilename); 86 86 … … 100 100 101 101 #ifdef _HAVE_PETSC_ 102 _printf_(true,"closing MPI and Petsc\n");102 if(true) _pprintLine_("closing MPI and Petsc"); 103 103 PetscFinalize(); 104 104 #else 105 105 #ifdef _HAVE_MPI_ 106 _printf_(true,"closing MPI and Petsc\n");106 if(true) _pprintLine_("closing MPI and Petsc"); 107 107 MPI_Finalize(); 108 108 #endif -
issm/trunk-jpl/src/c/solutions/prognostic_core.cpp
r12326 r12515 26 26 27 27 if(ispdd){ 28 _printf_(VerboseSolution()," call positive degree day module\n");28 if(VerboseSolution()) _pprintLine_(" call positive degree day module"); 29 29 PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters); 30 30 } 31 31 32 _printf_(VerboseSolution()," call computational core\n");32 if(VerboseSolution()) _pprintLine_(" call computational core"); 33 33 solver_linear(femmodel); 34 34 35 35 if(save_results){ 36 _printf_(VerboseSolution()," saving results\n");36 if(VerboseSolution()) _pprintLine_(" saving results"); 37 37 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum); 38 38 } -
issm/trunk-jpl/src/c/solutions/steadystate_core.cpp
r12493 r12515 9 9 #endif 10 10 11 #include "../include/include.h" 11 12 #include "../toolkits/toolkits.h" 12 13 #include "../objects/objects.h" … … 16 17 #include "./solutions.h" 17 18 #include "../modules/modules.h" 18 #include "../include/include.h"19 19 #include "../solvers/solvers.h" 20 20 … … 43 43 for(;;){ 44 44 45 _printf_(VerboseSolution(),"%s%i\n"," computing temperature and velocity for step: ",step);45 if(VerboseSolution()) _pprintLine_(" computing temperature and velocity for step: " << step); 46 46 #ifdef _HAVE_THERMAL_ 47 47 if(isenthalpy==0){ … … 55 55 #endif 56 56 57 _printf_(VerboseSolution(),"%s\n"," computing new velocity");57 if(VerboseSolution()) _pprintLine_("" << " computing new velocity"); 58 58 diagnostic_core(femmodel); 59 59 60 60 if (step>1){ 61 _printf_(VerboseSolution(),"%s\n"," checking velocity, temperature and pressure convergence");61 if(VerboseSolution()) _pprintLine_("" << " checking velocity, temperature and pressure convergence"); 62 62 if(steadystateconvergence(femmodel)) break; 63 63 } 64 64 if(step>maxiter){ 65 _printf_(VerboseSolution(),"%s%i%s\n"," maximum number steadystate iterations ",maxiter," reached");65 if(VerboseSolution()) _pprintLine_("" << " maximum number steadystate iterations " << maxiter << " reached"); 66 66 break; 67 67 } 68 68 69 _printf_(VerboseSolution(),"%s\n"," saving velocity, temperature and pressure to check for convergence at next step");69 if(VerboseSolution()) _pprintLine_("" << " saving velocity, temperature and pressure to check for convergence at next step"); 70 70 InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxPicardEnum); 71 71 InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyPicardEnum); … … 79 79 80 80 if(save_results){ 81 _printf_(VerboseSolution()," saving results\n");81 if(VerboseSolution()) _pprintLine_(" saving results"); 82 82 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum); 83 83 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum); -
issm/trunk-jpl/src/c/solutions/surfaceslope_core.cpp
r11832 r12515 19 19 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 20 20 21 _printf_(VerboseSolution(),"%s\n","computing slope...");21 if(VerboseSolution()) _pprintLine_("" << "computing slope..."); 22 22 23 23 /*Call on core computations: */ … … 28 28 29 29 if(save_results){ 30 _printf_(VerboseSolution(),"saving results:\n");30 if(VerboseSolution()) _pprintLine_("saving results:"); 31 31 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeXEnum); 32 32 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeYEnum); -
issm/trunk-jpl/src/c/solutions/thermal_core.cpp
r12477 r12515 29 29 } 30 30 31 _printf_(VerboseSolution()," computing temperatures\n");31 if(VerboseSolution()) _pprintLine_(" computing temperatures"); 32 32 femmodel->SetCurrentConfiguration(ThermalAnalysisEnum); 33 33 solver_thermal_nonlinear(femmodel); 34 34 35 _printf_(VerboseSolution()," computing melting\n");35 if(VerboseSolution()) _pprintLine_(" computing melting"); 36 36 femmodel->SetCurrentConfiguration(MeltingAnalysisEnum); 37 37 solver_linear(femmodel); 38 38 39 39 if(save_results){ 40 _printf_(VerboseSolution()," saving results\n");40 if(VerboseSolution()) _pprintLine_(" saving results"); 41 41 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum); 42 42 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BasalforcingsMeltingRateEnum); -
issm/trunk-jpl/src/c/solutions/transient_core.cpp
r12493 r12515 86 86 femmodel->parameters->SetParam(step,StepEnum); 87 87 88 _printf_(VerboseSolution(),"iteration %i/%g time [yr]: %-7.3g (time step: %.2g)\n",step,floor((finaltime-time)/dt)+step,time/yts,dt/yts);88 if(VerboseSolution()) _pprintLine_("iteration " << step << "/" << floor((finaltime-time)/dt)+step << " time [yr]: " << time/yts << "7.3g (time step: " << dt/yts << "2g)"); 89 89 if(step%output_frequency==0 || time==finaltime) 90 90 save_results=true; … … 94 94 95 95 if(isthermal && dim==3){ 96 _printf_(VerboseSolution()," computing temperatures\n");96 if(VerboseSolution()) _pprintLine_(" computing temperatures"); 97 97 #ifdef _HAVE_THERMAL_ 98 98 if(isenthalpy==0){ … … 108 108 109 109 if(isdiagnostic){ 110 _printf_(VerboseSolution()," computing new velocity\n");110 if(VerboseSolution()) _pprintLine_(" computing new velocity"); 111 111 #ifdef _HAVE_DIAGNOSTIC_ 112 112 diagnostic_core(femmodel); … … 117 117 118 118 if(isprognostic){ 119 _printf_(VerboseSolution()," computing new thickness\n");119 if(VerboseSolution()) _pprintLine_(" computing new thickness"); 120 120 prognostic_core(femmodel); 121 _printf_(VerboseSolution()," updating vertices positions\n");121 if(VerboseSolution()) _pprintLine_(" updating vertices positions"); 122 122 UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 123 123 } 124 124 125 125 if(isgroundingline){ 126 _printf_(VerboseSolution()," computing new grounding line position\n");126 if(VerboseSolution()) _pprintLine_(" computing new grounding line position"); 127 127 #ifdef _HAVE_GROUNDINGLINE_ 128 128 GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters); … … 134 134 /*unload results*/ 135 135 if(save_results){ 136 _printf_(VerboseSolution()," saving transient results\n");136 if(VerboseSolution()) _pprintLine_(" saving transient results"); 137 137 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceEnum); 138 138 InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedEnum); … … 141 141 RequestedOutputsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,requested_outputs,numoutputs); 142 142 143 _printf_(VerboseSolution()," saving temporary results\n");143 if(VerboseSolution()) _pprintLine_(" saving temporary results"); 144 144 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results); 145 145 } -
issm/trunk-jpl/src/c/solvers/solver_newton.cpp
r12477 r12515 75 75 } 76 76 if(count>=max_nonlinear_iterations){ 77 _printf_(true," maximum number of Newton iterations (%i) exceeded\n",max_nonlinear_iterations);77 if(true) _pprintLine_(" maximum number of Newton iterations (" << max_nonlinear_iterations << ") exceeded"); 78 78 bool max_iteration_state=true; 79 79 int tempStep=1; … … 100 100 } 101 101 102 _printf_(VerboseConvergence(),"\n total number of iterations: %i\n",count-1);102 if(VerboseConvergence()) _pprintLine_("\n total number of iterations: " << count-1); 103 103 104 104 /*clean-up*/ -
issm/trunk-jpl/src/c/solvers/solver_nonlinear.cpp
r12477 r12515 73 73 74 74 ConstraintsStatex(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters); 75 _printf_(VerboseConvergence()," number of unstable constraints: %i\n",num_unstable_constraints);75 if(VerboseConvergence()) _pprintLine_(" number of unstable constraints: " << num_unstable_constraints); 76 76 77 77 //rift convergence … … 93 93 } 94 94 if(count>=max_nonlinear_iterations){ 95 _printf_(true," maximum number of nonlinear iterations (%i) exceeded\n",max_nonlinear_iterations);95 if(true) _pprintLine_(" maximum number of nonlinear iterations (" << max_nonlinear_iterations << ") exceeded"); 96 96 converged=true; 97 97 InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,converged,ConvergedEnum); … … 105 105 } 106 106 107 _printf_(VerboseConvergence(),"\n total number of iterations: %i\n",count-1);107 if(VerboseConvergence()) _pprintLine_("\n total number of iterations: " << count-1); 108 108 109 109 /*clean-up*/ -
issm/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp
r11679 r12515 91 91 if(converged==true)break; 92 92 if(count>=max_nonlinear_iterations){ 93 _printf_(true," maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations);93 if(true) _pprintLine_(" maximum number of iterations (" << max_nonlinear_iterations << ") exceeded"); 94 94 break; 95 95 } -
issm/trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp
r12477 r12515 47 47 converged=false; 48 48 49 _printf_(VerboseSolution(),"%s\n","starting direct shooting method");49 if(VerboseSolution()) _pprintLine_("" << "starting direct shooting method"); 50 50 InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,true,ResetPenaltiesEnum); 51 51 InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,false,ConvergedEnum); … … 66 66 67 67 if (!converged){ 68 _printf_(VerboseConvergence(),"%s%i\n"," #unstable constraints = ",num_unstable_constraints);68 if(VerboseConvergence()) _pprintLine_("" << " #unstable constraints = " << num_unstable_constraints); 69 69 if (num_unstable_constraints <= thermal_penalty_threshold)converged=true; 70 70 if (count>=thermal_maxiter){ 71 71 converged=true; 72 _printf_(true," maximum number of iterations (%i) exceeded\n",thermal_maxiter);72 if(true) _pprintLine_(" maximum number of iterations (" << thermal_maxiter << ") exceeded"); 73 73 } 74 74 }
Note:
See TracChangeset
for help on using the changeset viewer.