Changeset 12515


Ignore:
Timestamp:
06/22/12 16:56:14 (13 years ago)
Author:
Mathieu Morlighem
Message:

Starting to replace _printf by _pprintString

Location:
issm/trunk-jpl/src/c
Files:
82 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/DataSet.cpp

    r12495 r12515  
    135135        if(this==NULL)_error2_("trying to echo a NULL dataset");
    136136
    137         _printf_(true,"DataSet echo: %i objects\n",objects.size());
     137        if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
    138138
    139139        for ( object=objects.begin() ; object < objects.end(); object++ ){
     
    152152        if(this==NULL)_error2_("trying to echo a NULL dataset");
    153153
    154         _printf_(true,"DataSet echo: %i objects\n",objects.size());
     154        if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
    155155
    156156        for ( object=objects.begin() ; object < objects.end(); object++ ){
  • issm/trunk-jpl/src/c/Container/Observations.cpp

    r12493 r12515  
    7373
    7474        /*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 << ")... ");
    7676        this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth);
    7777
     
    103103                }
    104104        }
    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);
    108108}
    109109/*}}}*/
  • issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp

    r12493 r12515  
    176176        else if(mxIsClass(prhs[0],"cell"))    option=(Option*)OptionCellParse(name,prhs);
    177177        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" << "\".");
    179179                if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
    180180                        option=(Option*)OptionStructParse(name,(const mxArray**)lhs);
  • issm/trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp

    r9761 r12515  
    2525        parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
    2626       
    27         _printf_(VerboseMProcessor(),"      Configuring elements...\n");
     27        if(VerboseMProcessor()) _pprintLine_("      Configuring elements...");
    2828        for (i=0;i<elements->Size();i++){
    2929                element=(Element*)elements->GetObjectByOffset(i);
    3030                element->Configure(elements,loads,nodes,materials,parameters);
    3131        }
    32         _printf_(VerboseMProcessor(),"      Configuring loads...\n");
     32        if(VerboseMProcessor()) _pprintLine_("      Configuring loads...");
    3333        for (i=0;i<loads->Size();i++){
    3434                load=(Load*)loads->GetObjectByOffset(i);
     
    3737                }
    3838        }
    39         _printf_(VerboseMProcessor(),"      Configuring nodes...\n");
     39        if(VerboseMProcessor()) _pprintLine_("      Configuring nodes...");
    4040        for (i=0;i<nodes->Size();i++){
    4141                node=(Node*)nodes->GetObjectByOffset(i);
     
    4545        }
    4646       
    47         _printf_(VerboseMProcessor(),"      Configuring materials...\n");
     47        if(VerboseMProcessor()) _pprintLine_("      Configuring materials...");
    4848        for (i=0;i<materials->Size();i++){
    4949                material=(Material*)materials->GetObjectByOffset(i);
  • issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp

    r9761 r12515  
    2525
    2626        /*Display message*/
    27         _printf_(VerboseModule(),"   Constraining penalties\n");
     27        if(VerboseModule()) _pprintLine_("   Constraining penalties");
    2828
    2929        /*recover parameters: */
  • issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp

    r12467 r12515  
    5656        }
    5757        else if(num_unstable_constraints<=min_mechanical_constraints){
    58                 _printf_(VerboseModule(),"   freezing constraints\n");
     58                if(VerboseModule()) _pprintLine_("   freezing constraints");
    5959                RiftFreezeConstraints(loads,configuration_type);
    6060        }
  • issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp

    r12493 r12515  
    5353        /*synchronize all cpus, as CPU 0 is probably late (it is starting the entire dakota strategy!) : */
    5454        MPI_Barrier(MPI_COMM_WORLD);
    55         _printf_(VerboseQmu(),"qmu iteration: %i\n",counter);
     55        if(VerboseQmu()) _pprintLine_("qmu iteration: " << counter);
    5656       
    5757        /*retrieve parameters: */
     
    6767
    6868        /*Determine solution sequence: */
    69         _printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToStringx(solution_type)," core:");
     69        if(VerboseQmu()) _pprintLine_("" << "Starting " << EnumToStringx(solution_type) << " core:");
    7070        CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type);
    7171        #ifdef _HAVE_CONTROL_
     
    7979
    8080        /*compute responses: */
    81         _printf_(VerboseQmu(),"compute dakota responses:\n");
     81        if(VerboseQmu()) _pprintLine_("compute dakota responses:");
    8282        DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses);
    8383       
  • issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp

    r12511 r12515  
    5050        clock0=clock();
    5151        time0 =time(NULL);
    52         _printf_(true,"\nExp2Kmlx Module -- %s",ctime(&time0));
     52        if(true) _pprintString_("\nExp2Kmlx Module -- " << ctime(&time0));
    5353
    5454        /*read exp file  */
     
    5656        if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
    5757                _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 << "\".");
    5959//      for (i=0; i<nprof; i++)
    6060//              _printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]);
     
    121121
    122122        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.");
    124124                holes=false;
    125125        }
     
    153153                for (i=1; i<nprof; i++) {
    154154                        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.");
    156156                                continue;
    157157                        }
     
    275275/*  write kml file  */
    276276
    277         _printf_(true,"Exp2Kmlx -- Writing kml document to file \"%s\".\n",filkml);
     277        if(true) _pprintLine_("Exp2Kmlx -- Writing kml document to file \"" << filkml << "\".");
    278278        fid=fopen(filkml,"w");
    279279        fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
  • issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp

    r12494 r12515  
    2020        Element* element                          = NULL;
    2121       
    22         _printf_(VerboseModule(),"   Migrating grounding line\n");
     22        if(VerboseModule()) _pprintLine_("   Migrating grounding line");
    2323       
    2424        /*retrieve parameters: */
     
    158158                #ifdef _HAVE_MPI_
    159159                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);
    161161                #else
    162162                nflipped=local_nflipped;
  • issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp

    r12470 r12515  
    3434        num_notconverged=total_notconverged;
    3535        #endif
    36         _printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
     36        if(VerboseConvergence()) _pprintLine_("      #elements above convergence criterion = " << num_notconverged);
    3737
    3838        /*Free ressources:*/
  • issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp

    r12450 r12515  
    2121        clock0=clock();
    2222        time0 =time(NULL);
    23         _printf_(true,"\nKMLFileReadx Module -- %s",ctime(&time0));
     23        if(true) _pprintString_("\nKMLFileReadx Module -- " << ctime(&time0));
    2424
    2525/*  read kml file  */
     
    4343                }
    4444
    45 //              _printf_(true,"%s\n",kstr);
     45//              if(true) _pprintLine_("" << kstr);
    4646                xDelete<char>(kstr);
    4747        }
    4848
    4949        if (kxml) {
    50                 _printf_(true,"XML declaration:\n");
     50                if(true) _pprintLine_("XML declaration:");
    5151                kxml->DeepEcho("  ");
    5252                delete kxml;
    5353        }
    5454        if (kdtd) {
    55                 _printf_(true,"DTD declaration (not yet implemented):\n");
     55                if(true) _pprintLine_("DTD declaration (not yet implemented):");
    5656                kdtd->DeepEcho("  ");
    5757                delete kdtd;
  • issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp

    r12493 r12515  
    2929        clock0=clock();
    3030        time0 =time(NULL);
    31         _printf_(true,"\nKMLMeshWritex Module -- %s",ctime(&time0));
     31        if(true) _pprintString_("\nKMLMeshWritex Module -- " << ctime(&time0));
    3232
    3333/*  construct kml document  */
     
    8383
    8484        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.");
    8686                ipt=0;
    8787                for (i=0; i<mcmap; i++) {
     
    118118
    119119        if (!nodecon) {
    120                 _printf_(true,"Creating the node connectivity table.\n");
     120                if(true) _pprintLine_("Creating the node connectivity table.");
    121121                nncon=mxepg+1;
    122122                nodecon=xNewZeroInit<int>(mncon*nncon);
     
    149149
    150150                else if (mdata == mncon) {
    151                         _printf_(true,"Averaging nodal data to element data.\n");
     151                        if(true) _pprintLine_("Averaging nodal data to element data.");
    152152                        edata=xNewZeroInit<double>(melem*ndata);
    153153                        edfree=true;
     
    193193/*  write kml file  */
    194194
    195         _printf_(true,"Writing kml document to file.\n");
     195        if(true) _pprintLine_("Writing kml document to file.");
    196196        fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
    197197        fprintf(fid,"<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n");
     
    203203                         ((double)(clock0b-clock0a))/CLOCKS_PER_SEC,difftime(time0b,time0a));
    204204
    205         _printf_(true,"Deleting kml document.\n");
     205        if(true) _pprintLine_("Deleting kml document.");
    206206        delete kdoc;
    207207        clock0c=clock();
     
    304304/*  write each element as a polygon placemark  */
    305305
    306         _printf_(true,"Writing %d tria elements as KML polygons.\n",melem);
     306        if(true) _pprintLine_("Writing " << melem << " tria elements as KML polygons.");
    307307
    308308        for (i=0; i<melem; i++) {
     
    356356
    357357//              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.");
    359359        }
    360         _printf_(true,"  %d tria elements written.\n",melem);
     360        if(true) _pprintLine_("  " << melem << " tria elements written.");
    361361
    362362        return(kfold);
  • issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp

    r9761 r12515  
    2828        clock0=clock();
    2929        time0 =time(NULL);
    30         _printf_(true,"\nKMLOverlayx Module -- %s",ctime(&time0));
     30        if(true) _pprintString_("\nKMLOverlayx Module -- " << ctime(&time0));
    3131
    3232/*  construct kml file  */
     
    8282/*  write kml file  */
    8383
    84         _printf_(true,"Writing kml document to file.\n");
     84        if(true) _pprintLine_("Writing kml document to file.");
    8585        fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
    8686        kfile->Write(fid,indent);
  • issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp

    r12493 r12515  
    3838        clock0=clock();
    3939        time0 =time(NULL);
    40         _printf_(true,"\nKml2Expx Module -- %s",ctime(&time0));
     40        if(true) _pprintString_("\nKml2Expx Module -- " << ctime(&time0));
    4141
    4242/*  read kml file  */
     
    4949/*  open exp file  */
    5050
    51         _printf_(true,"Writing exp profiles to file.\n");
     51        if(true) _pprintLine_("Writing exp profiles to file.");
    5252        fido=fopen(filexp,"w");
    5353
  • issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp

    r12493 r12515  
    116116                *pdelta= 45;
    117117                *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).");
    119119        }
    120120        else if (sgn == -1) {
    121121                *pdelta= 0;
    122122                *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).");
    124124        }
    125125        else _error2_("Sign should be either +1 or -1.\n");
  • issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp

    r11679 r12515  
    1717
    1818        /*Display message*/
    19         _printf_(VerboseModule(),"   Merging solution vector from fset to gset\n");
     19        if(VerboseModule()) _pprintLine_("   Merging solution vector from fset to gset");
    2020
    2121        /*first, get gsize, fsize and ssize: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp

    r11815 r12515  
    6868                if(solution_type==SteadystateSolutionEnum && analysis_type==EnthalpyAnalysisEnum && isenthalpy==false) continue;
    6969       
    70                 _printf_(VerboseMProcessor(),"   creating datasets for analysis %s\n",EnumToStringx(analysis_type));
     70                if(VerboseMProcessor()) _pprintLine_("   creating datasets for analysis " << EnumToStringx(analysis_type));
    7171                CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,solution_type,analysis_type,nummodels,i);
    7272        }
  • issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp

    r11699 r12515  
    2222        int         verbose;
    2323
    24         _printf_(VerboseModule(),"   Dirichlet lifting applied to load vector\n");
     24        if(VerboseModule()) _pprintLine_("   Dirichlet lifting applied to load vector");
    2525
    2626        Kfs->GetSize(&global_m,&global_n);
  • issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp

    r12493 r12515  
    2222
    2323        /*Display message*/
    24         _printf_(VerboseModule(),"   Resetting penalties\n");
     24        if(VerboseModule()) _pprintLine_("   Resetting penalties");
    2525
    2626        /*recover parameters: */
  • issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp

    r12493 r12515  
    6868        clock0=clock();
    6969        time0 =time(NULL);
    70         _printf_(true,"\nShp2Kmlx Module -- %s",ctime(&time0));
     70        if(true) _pprintString_("\nShp2Kmlx Module -- " << ctime(&time0));
    7171
    7272/*  note that much of the following code is taken from shpdump.c in shapelib.  */
     
    573573/*  write kml file  */
    574574
    575         _printf_(true,"Writing kml document to file.\n");
     575        if(true) _pprintLine_("Writing kml document to file.");
    576576        fid=fopen(filkml,"w");
    577577        fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
  • issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp

    r12495 r12515  
    4444
    4545        /*Display message*/
    46         _printf_(VerboseModule(),"   Solving\n");
     46        if(VerboseModule()) _pprintLine_("   Solving");
    4747        #if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2)
    4848        if(VerboseSolver())PetscOptionsPrint(stdout);
  • issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp

    r12470 r12515  
    2828
    2929        /*Display message*/
    30         _printf_(VerboseModule(),"   Generating matrices\n");
     30        if(VerboseModule()) _pprintLine_("   Generating matrices");
    3131
    3232        /*retrive parameters: */
  • issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp

    r12470 r12515  
    2222
    2323        /*start module: */
    24         _printf_(VerboseModule(),"%s%g\n","   Updating constraints for time: ",time);
     24        if(VerboseModule()) _pprintLine_("" << "   Updating constraints for time: " << time);
    2525       
    2626        /*First, update dof constraints in nodes, using constraints: */
  • issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp

    r12493 r12515  
    124124                *pdelta= 45;
    125125                *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).");
    127127        }
    128128        else if (sgn == -1) {
    129129                *pdelta= 0;
    130130                *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).");
    132132        }
    133133        else _error2_("Sign should be either +1 or -1.\n");
  • issm/trunk-jpl/src/c/objects/FemModel.cpp

    r12511 r12515  
    5050        for(i=0;i<nummodels;i++){
    5151
    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]) << ":");
    5353                analysis_type=analysis_type_list[i];
    5454                this->SetCurrentConfiguration(analysis_type);
    5555       
    5656                if(i==0){
    57                         _printf_(VerboseMProcessor(),"      creating vertex degrees of freedom\n");
     57                        if(VerboseMProcessor()) _pprintLine_("      creating vertex degrees of freedom");
    5858                        VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices
    5959                }
    6060
    61                 _printf_(VerboseMProcessor(),"      resolving node constraints\n");
     61                if(VerboseMProcessor()) _pprintLine_("      resolving node constraints");
    6262                SpcNodesx(nodes,constraints,parameters,analysis_type);
    6363
    64                 _printf_(VerboseMProcessor(),"      creating nodal degrees of freedom\n");
     64                if(VerboseMProcessor()) _pprintLine_("      creating nodal degrees of freedom");
    6565                NodesDofx(nodes,parameters,analysis_type);
    6666       
    67                 _printf_(VerboseMProcessor(),"      configuring element and loads\n");
     67                if(VerboseMProcessor()) _pprintLine_("      configuring element and loads");
    6868                ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters);
    6969        }
     
    145145        if(this->parameters->Exist(PetscOptionsStringsEnum)){
    146146                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));
    148148        }
    149149        #endif
  • issm/trunk-jpl/src/c/objects/IoModel.cpp

    r12511 r12515  
    7878                for(int i=0;i<MaximumNumberOfEnums;i++){
    7979                        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)");
    8181                        }
    8282                }
  • issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp

    r12493 r12515  
    127127
    128128//      if      (itag)
    129 //              _printf_(true,"tag buffer (length=%d):\n",ibuf);
     129//              if(true) _pprintLine_("tag buffer (length=" << ibuf << "):");
    130130//      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);
    133133
    134134        if (!ibuf)
     
    193193                }
    194194
    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);
    197197
    198198        if (!ibuf)
     
    254254
    255255        ktokn=strtok(ktagi,"< >");
    256 //      _printf_(true,"KMLFileTagName -- initial token=\"%s\".\n",ktokn);
     256//      if(true) _pprintLine_("KMLFileTagName -- initial token=\"" << ktokn << "\".");
    257257
    258258        if (!pname) {
     
    264264
    265265        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.");
    268268                strncpy(pname,ktokn,maxlen);
    269269        }
     
    300300        /*  return first non blank and move past subsequent blank  */
    301301        ktokn=strtok(ktagi," ");
    302 //      _printf_(true,"KMLFileTagAttrib -- initial token=\"%s\".\n",ktokn);
     302//      if(true) _pprintLine_("KMLFileTagAttrib -- initial token=\"" << ktokn << "\".");
    303303
    304304        /*  return next non " =?/>" and move past subsequent " =?/>"  */
     
    307307                /*  return next non quote and move past subsequent quote  */
    308308                ktokv=strtok(NULL,quote);
    309 //              _printf_(true,"KMLFileTagAttrib -- attribute %s=\"%s\".\n",ktokn,ktokv);
     309//              if(true) _pprintLine_("KMLFileTagAttrib -- attribute " << ktokn << "=\"" << ktokv << "\".");
    310310
    311311/*  add the attribute to the dataset  */
     
    323323                (!strncmp(&ktag[0],"<"        ,1) && !strncmp(&ktag[strlen(ktag)-2],"/>",2)))
    324324                isolo=1;
    325 //      _printf_(true,"KMLFileTagAttrib -- isolo=%d.\n",isolo);
     325//      if(true) _pprintLine_("KMLFileTagAttrib -- isolo=" << isolo << ".");
    326326
    327327        return(isolo);
     
    357357                        xfree((void**)&kstr);
    358358
    359 //      _printf_(true,"KMLFileTokenParse -- %s=%d.\n",ktag,*pival);
     359//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pival << ".");
    360360
    361361        return(0);
     
    391391                        xfree((void**)&kstr);
    392392
    393 //      _printf_(true,"KMLFileTokenParse -- %s=%s.\n",ktag,(*pbval ? "true" : "false"));
     393//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << (*pbval ? "true" : "false") << ".");
    394394
    395395        return(0);
     
    428428
    429429        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.");
    432432                strncpy(pstr,kstr,maxlen);
    433433        }
     
    452452                        xfree((void**)&kstr);
    453453
    454 //      _printf_(true,"KMLFileTokenParse -- %s=\"%s\".\n",ktag,pstr);
     454//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=\"" << pstr << "\".");
    455455
    456456        return(pstr);
     
    486486                        xfree((void**)&kstr);
    487487
    488 //      _printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pfval);
     488//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pfval << ".");
    489489
    490490        return(0);
     
    520520                        xfree((void**)&kstr);
    521521
    522 //      _printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pdval);
     522//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pdval << ".");
    523523
    524524        return(0);
     
    578578                        xfree((void**)&kstr);
    579579
    580 //      _printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);
     580//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
    581581//      for (j=0; j<=i; j++)
    582 //              _printf_(true,"   [%d]: %lg\n",j,(*pdval)[j]);
     582//              if(true) _pprintLine_("   [" << j << "]: " << (*pdval)[j] << "g");
    583583
    584584        return(0);
     
    631631
    632632        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.");
    634634
    635635/*  get additional token and compare to closing tag  */
     
    645645                        xfree((void**)&kstr);
    646646
    647 //      _printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);
     647//      if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
    648648//      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");
    650650
    651651        return(0);
     
    661661        opening tag, must find corresponding closing tag  */
    662662
    663         _printf_(true,"KMLFileTagSkip -- input tag %s.\n",ktag);
     663        if(true) _pprintLine_("KMLFileTagSkip -- input tag " << ktag << ".");
    664664
    665665/*  if next token is a closing tag, compare to input  */
     
    670670                                 (kstr[1] == '/') &&
    671671                                 (!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 << ".");
    673673                        xfree((void**)&kstr);
    674674                        return(0);
     
    679679                else if ((kstr[0] == '<') &&
    680680                                 (kstr[1] != '/')) {
    681                         _printf_(true,"KMLFileTagSkip -- opening tag %s.\n",kstr);
     681                        if(true) _pprintLine_("KMLFileTagSkip -- opening tag " << kstr << ".");
    682682                        KMLFileTagSkip(kstr,
    683683                                                   fid);
  • issm/trunk-jpl/src/c/objects/KML/KML_Attribute.cpp

    r12365 r12515  
    4545        bool  flag=true;
    4646
    47         _printf_(flag,"    ");
     47        if(flag) _pprintString_("    ");
    4848        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 << "\"");
    5151
    5252        return;
     
    6969        bool  flag=true;
    7070
    71         _printf_(flag,"%s    ",indent);
     71        if(flag) _pprintString_("" << indent << "    ");
    7272        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 << "\"");
    7575
    7676        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp

    r12493 r12515  
    4545        KML_SubStyle::Echo();
    4646
    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);
    4949
    5050        return;
     
    6868        KML_SubStyle::DeepEcho(indent);
    6969
    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);
    7472}
    7573/*}}}*/
  • issm/trunk-jpl/src/c/objects/KML/KML_Comment.cpp

    r12365 r12515  
    4242        bool  flag=true;
    4343
    44         _printf_(flag,"    ");
    45         _printf_(flag,"%s\n",value);
     44        if(flag) _pprintString_("    ");
     45        if(flag) _pprintLine_("" << value);
    4646
    4747        return;
     
    6363        bool  flag=true;
    6464
    65         _printf_(flag,"%s    ",indent);
    66         _printf_(flag,"%s\n",value);
     65        if(flag) _pprintString_("" << indent << "    ");
     66        if(flag) _pprintLine_("" << value);
    6767
    6868        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp

    r12493 r12515  
    4747        KML_Feature::Echo();
    4848
    49         _printf_(flag,"       feature: (size=%d)\n" ,feature->Size());
     49        if(flag) _pprintLine_("       feature: (size=" << feature->Size() << ")");
    5050
    5151        return;
     
    7878        if (feature->Size())
    7979                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 << "] --------");
    8181                        ((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 << "] --------");
    8383                }
    8484        else
    85                 _printf_(flag,"%s       feature: [empty]\n"    ,indent);
     85                if(flag) _pprintLine_("" << indent << "       feature: [empty]");
    8686
    8787        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp

    r12493 r12515  
    4242        bool  flag=true;
    4343
    44         _printf_(flag,"KML_Document:\n");
     44        if(flag) _pprintLine_("KML_Document:");
    4545        KML_Container::Echo();
    4646
     
    6565        bool  flag=true;
    6666
    67         _printf_(flag,"%sKML_Document:\n",indent);
     67        if(flag) _pprintLine_("" << indent << "KML_Document:");
    6868        KML_Container::DeepEcho(indent);
    6969
  • issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp

    r12493 r12515  
    5454        KML_Object::Echo();
    5555
    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() << ")");
    6363
    6464        return;
    6565}
    6666/*}}}*/
    67 
    6867/*FUNCTION KML_Feature::DeepEcho {{{*/
    6968void  KML_Feature::DeepEcho(){
     
    7675}
    7776/*}}}*/
    78 
    7977/*FUNCTION KML_Feature::DeepEcho {{{*/
    8078void  KML_Feature::DeepEcho(const char* indent){
     
    8684        KML_Object::DeepEcho(indent);
    8785
    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 << "\"");
    9492
    9593/*  loop over any styles for the feature  */
     
    10098        if (style->Size())
    10199                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 << "] --------");
    103101                        ((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 << "] --------");
    105103                }
    106104        else
    107                 _printf_(flag,"%s         style: [empty]\n"    ,indent);
     105                if(flag) _pprintLine_("" << indent << "         style: [empty]");
    108106
    109107        return;
    110108}
    111109/*}}}*/
    112 
    113110/*FUNCTION KML_Feature::Write {{{*/
    114111void  KML_Feature::Write(FILE* filout,const char* indent){
     
    142139}
    143140/*}}}*/
    144 
    145141/*FUNCTION KML_Feature::Read {{{*/
    146142void  KML_Feature::Read(FILE* fid,char* kstr){
     
    182178}
    183179/*}}}*/
    184 
  • issm/trunk-jpl/src/c/objects/KML/KML_File.cpp

    r12493 r12515  
    4242        bool  flag=true;
    4343
    44         _printf_(flag,"KML_File:\n");
     44        if(flag) _pprintLine_("KML_File:");
    4545        KML_Object::Echo();
    4646
     
    6363        bool  flag=true;
    6464
    65         _printf_(flag,"%sKML_File:\n",indent);
     65        if(flag) _pprintLine_("" << indent << "KML_File:");
    6666        KML_Object::DeepEcho(indent);
    6767
  • issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp

    r12493 r12515  
    4242        bool  flag=true;
    4343
    44         _printf_(flag,"KML_Folder:\n");
     44        if(flag) _pprintLine_("KML_Folder:");
    4545        KML_Container::Echo();
    4646
     
    6565        bool  flag=true;
    6666
    67         _printf_(flag,"%sKML_Folder:\n",indent);
     67        if(flag) _pprintLine_("" << indent << "KML_Folder:");
    6868        KML_Container::DeepEcho(indent);
    6969
  • issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp

    r12493 r12515  
    4949        bool  flag=true;
    5050
    51         _printf_(flag,"KML_Icon:\n");
     51        if(flag) _pprintLine_("KML_Icon:");
    5252        KML_Object::Echo();
    5353
    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 << "\"");
    6262
    6363        return;
    6464}
    6565/*}}}*/
    66 
    6766/*FUNCTION KML_Icon::DeepEcho {{{*/
    6867void  KML_Icon::DeepEcho(){
     
    7574}
    7675/*}}}*/
    77 
    7876/*FUNCTION KML_Icon::DeepEcho {{{*/
    7977void  KML_Icon::DeepEcho(const char* indent){
     
    8179        bool  flag=true;
    8280
    83         _printf_(flag,"%sKML_Icon:\n",indent);
     81        if(flag) _pprintLine_("" << indent << "KML_Icon:");
    8482        KML_Object::DeepEcho(indent);
    8583
    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 << "\"");
    9492
    9593        return;
    9694}
    9795/*}}}*/
    98 
    9996/*FUNCTION KML_Icon::Write {{{*/
    10097void  KML_Icon::Write(FILE* filout,const char* indent){
     
    126123}
    127124/*}}}*/
    128 
    129125/*FUNCTION KML_Icon::Read {{{*/
    130126void  KML_Icon::Read(FILE* fid,char* kstr){
     
    185181}
    186182/*}}}*/
    187 
  • issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp

    r12493 r12515  
    5151        bool  flag=true;
    5252
    53         _printf_(flag,"KML_LineString:\n");
     53        if(flag) _pprintLine_("KML_LineString:");
    5454        KML_Geometry::Echo();
    5555
    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 << ")");
    6060
    6161        return;
     
    7878        bool  flag=true;
    7979
    80         _printf_(flag,"%sKML_LineString:\n",indent);
     80        if(flag) _pprintLine_("" << indent << "KML_LineString:");
    8181        KML_Geometry::DeepEcho(indent);
    8282
    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 << ")");
    8787        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] << ")");
    8989
    9090        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp

    r12493 r12515  
    4242        bool  flag=true;
    4343
    44         _printf_(flag,"KML_LineStyle:\n");
     44        if(flag) _pprintLine_("KML_LineStyle:");
    4545        KML_ColorStyle::Echo();
    4646
    47         _printf_(flag,"         width: %g\n"          ,width);
     47        if(flag) _pprintLine_("         width: " << width);
    4848
    4949        return;
     
    6666        bool  flag=true;
    6767
    68         _printf_(flag,"%sKML_LineStyle:\n",indent);
     68        if(flag) _pprintLine_("" << indent << "KML_LineStyle:");
    6969        KML_ColorStyle::DeepEcho(indent);
    7070
    71         _printf_(flag,"%s         width: %g\n"          ,indent,width);
     71        if(flag) _pprintLine_("" << indent << "         width: " << width);
    7272
    7373        return;
     
    137137}
    138138/*}}}*/
    139 
  • issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp

    r12493 r12515  
    5151        bool  flag=true;
    5252
    53         _printf_(flag,"KML_LinearRing:\n");
     53        if(flag) _pprintLine_("KML_LinearRing:");
    5454        KML_Geometry::Echo();
    5555
    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 << ")");
    6060
    6161        return;
     
    7878        bool  flag=true;
    7979
    80         _printf_(flag,"%sKML_LinearRing:\n",indent);
     80        if(flag) _pprintLine_("" << indent << "KML_LinearRing:");
    8181        KML_Geometry::DeepEcho(indent);
    8282
    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 << ")");
    8787        for (i=0; i<ncoord; i++)
    88                 _printf_(flag,"%s                (%g,%g,%g)\n" ,indent,
     88                _printf_(flag,"%s                (%g,%g,%g)\n",indent,
    8989                                coords[3*i+0],coords[3*i+1],coords[3*i+2]);
    9090
  • issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp

    r12493 r12515  
    4545        bool  flag=true;
    4646
    47         _printf_(flag,"KML_Multigeometry:\n");
     47        if(flag) _pprintLine_("KML_Multigeometry:");
    4848        KML_Geometry::Echo();
    4949
    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/*}}}*/
    5655/*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
    5756void  KML_MultiGeometry::DeepEcho(){
     
    6463}
    6564/*}}}*/
    66 
    6765/*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
    6866void  KML_MultiGeometry::DeepEcho(const char* indent){
     
    7270        bool  flag=true;
    7371
    74         _printf_(flag,"%sKML_Multigeometry:\n",indent);
     72        if(flag) _pprintLine_("" << indent << "KML_Multigeometry:");
    7573        KML_Geometry::DeepEcho(indent);
    7674
     
    8280        if (geometry->Size())
    8381                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 << "] --------");
    8583                        ((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 << "] --------");
    8785                }
    8886        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/*}}}*/
    9592/*FUNCTION KML_MultiGeometry::Write {{{*/
    9693void  KML_MultiGeometry::Write(FILE* filout,const char* indent){
     
    120117}
    121118/*}}}*/
    122 
    123119/*FUNCTION KML_MultiGeometry::Read {{{*/
    124120void  KML_MultiGeometry::Read(FILE* fid,char* kstr){
     
    193189}
    194190/*}}}*/
    195 
    196191/*FUNCTION KML_MultiGeometry::WriteExp {{{*/
    197192void  KML_MultiGeometry::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
     
    207202}
    208203/*}}}*/
    209 
  • issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp

    r12493 r12515  
    5555        bool  flag=true;
    5656
    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() << ")");
    6060
    6161        return;
     
    8686                }
    8787        else
    88                 _printf_(flag,"%s        attrib: [empty]\n"    ,indent);
     88                if(flag) _pprintLine_("" << indent << "        attrib: [empty]");
    8989
    9090/*  loop over the comments for the object  */
     
    9595                }
    9696        else
    97                 _printf_(flag,"%s        commnt: [empty]\n"    ,indent);
     97                if(flag) _pprintLine_("" << indent << "        commnt: [empty]");
    9898
    9999/*  loop over the unknown objects for the object  */
     
    104104        if (kmlobj->Size())
    105105                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 << "] --------");
    107107                        ((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 << "] --------");
    109109                }
    110110        else
    111                 _printf_(flag,"%s        kmlobj: [empty]\n"    ,indent);
     111                if(flag) _pprintLine_("" << indent << "        kmlobj: [empty]");
    112112
    113113        return;
     
    253253
    254254        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 << ".");
    256256//              KMLFileTagSkip(kstr,
    257257//                                         fid);
  • issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp

    r12493 r12515  
    4747void  KML_Overlay::Echo(){
    4848
    49         bool  flag=true;
    50 
    5149        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);
    5853}
    5954/*}}}*/
    60 
    6155/*FUNCTION KML_Overlay::DeepEcho {{{*/
    6256void  KML_Overlay::DeepEcho(){
     
    6963}
    7064/*}}}*/
    71 
    7265/*FUNCTION KML_Overlay::DeepEcho {{{*/
    7366void  KML_Overlay::DeepEcho(const char* indent){
    7467
    7568        char  indent2[81];
    76         bool  flag=true;
    77 
    7869        KML_Feature::DeepEcho(indent);
    7970
     
    8172        strcat(indent2,"  ");
    8273
    83         _printf_(flag,"%s         color: %s\n"          ,indent,color);
    84         _printf_(flag,"%s       draword: %d\n"          ,indent,draword);
     74        _pprintLine_("" << indent << "         color: " << color);
     75        _pprintLine_("" << indent << "       draword: " << draword);
    8576        if (icon)
    8677                icon->DeepEcho(indent2);
    8778        else
    88                 _printf_(flag,"%s          icon: %p\n"          ,indent,icon);
    89 
    90         return;
     79                _pprintLine_("" << indent << "          icon: " << icon);
    9180}
    9281/*}}}*/
    93 
    9482/*FUNCTION KML_Overlay::Write {{{*/
    9583void  KML_Overlay::Write(FILE* filout,const char* indent){
     
    112100}
    113101/*}}}*/
    114 
    115102/*FUNCTION KML_Overlay::Read {{{*/
    116103void  KML_Overlay::Read(FILE* fid,char* kstr){
     
    147134}
    148135/*}}}*/
    149 
  • issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp

    r12493 r12515  
    4545        bool  flag=true;
    4646
    47         _printf_(flag,"KML_Placemark:\n");
     47        if(flag) _pprintLine_("KML_Placemark:");
    4848        KML_Feature::Echo();
    4949
    50         _printf_(flag,"      geometry: (size=%d)\n" ,geometry->Size());
     50        if(flag) _pprintLine_("      geometry: (size=" << geometry->Size() << ")");
    5151
    5252        return;
     
    7070        bool  flag=true;
    7171
    72         _printf_(flag,"%sKML_Placemark:\n",indent);
     72        if(flag) _pprintLine_("" << indent << "KML_Placemark:");
    7373        KML_Feature::DeepEcho(indent);
    7474
     
    8080        if (geometry->Size())
    8181                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 << "] --------");
    8383                        ((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 << "] --------");
    8585                }
    8686        else
    87                 _printf_(flag,"%s      geometry: [empty]\n"    ,indent);
     87                if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
    8888
    8989        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp

    r12493 r12515  
    4848        bool  flag=true;
    4949
    50         _printf_(flag,"KML_Point:\n");
     50        if(flag) _pprintLine_("KML_Point:");
    5151        KML_Geometry::Echo();
    5252
    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] << ")");
    5656
    5757        return;
     
    7373        bool  flag=true;
    7474
    75         _printf_(flag,"%sKML_Point:\n",indent);
     75        if(flag) _pprintLine_("" << indent << "KML_Point:");
    7676        KML_Geometry::DeepEcho(indent);
    7777
    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] << ")");
    8181
    8282        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp

    r12493 r12515  
    4343        bool  flag=true;
    4444
    45         _printf_(flag,"KML_PolyStyle:\n");
     45        if(flag) _pprintLine_("KML_PolyStyle:");
    4646        KML_ColorStyle::Echo();
    4747
    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);
    5050
    5151        return;
    5252}
    5353/*}}}*/
    54 
    5554/*FUNCTION KML_PolyStyle::DeepEcho {{{*/
    5655void  KML_PolyStyle::DeepEcho(){
     
    6362}
    6463/*}}}*/
    65 
    6664/*FUNCTION KML_PolyStyle::DeepEcho {{{*/
    6765void  KML_PolyStyle::DeepEcho(const char* indent){
     
    7068        bool  flag=true;
    7169
    72         _printf_(flag,"%sKML_PolyStyle:\n",indent);
     70        if(flag) _pprintLine_("" << indent << "KML_PolyStyle:");
    7371        KML_ColorStyle::DeepEcho(indent);
    7472
    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);
    7775
    7876        return;
    7977}
    8078/*}}}*/
    81 
    8279/*FUNCTION KML_PolyStyle::Write {{{*/
    8380void  KML_PolyStyle::Write(FILE* filout,const char* indent){
     
    9895}
    9996/*}}}*/
    100 
    10197/*FUNCTION KML_PolyStyle::Read {{{*/
    10298void  KML_PolyStyle::Read(FILE* fid,char* kstr){
     
    149145}
    150146/*}}}*/
    151 
  • issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp

    r12493 r12515  
    5555        bool  flag=true;
    5656
    57         _printf_(flag,"KML_Polygon:\n");
     57        if(flag) _pprintLine_("KML_Polygon:");
    5858        KML_Geometry::Echo();
    5959
    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() << ")");
    6565
    6666        return;
     
    8484        bool  flag=true;
    8585
    86         _printf_(flag,"%sKML_Polygon:\n",indent);
     86        if(flag) _pprintLine_("" << indent << "KML_Polygon:");
    8787        KML_Geometry::DeepEcho(indent);
    8888
    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 << "\"");
    9292
    9393        memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
     
    9696        if (outer->Size())
    9797                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 << "] --------");
    9999                        ((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 << "] --------");
    101101                }
    102102        else
    103                 _printf_(flag,"%s         outer: [empty]\n"    ,indent);
     103                if(flag) _pprintLine_("" << indent << "         outer: [empty]");
    104104
    105105        if (inner->Size())
    106106                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 << "] --------");
    108108                        ((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 << "] --------");
    110110                }
    111111        else
    112                 _printf_(flag,"%s         inner: [empty]\n"    ,indent);
     112                if(flag) _pprintLine_("" << indent << "         inner: [empty]");
    113113
    114114        return;
  • issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp

    r12493 r12515  
    7474        bool  flag=true;
    7575
    76         _printf_(flag,"KML_Style:\n");
     76        if(flag) _pprintLine_("KML_Style:");
    7777        KML_StyleSelector::Echo();
    7878
    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/*}}}*/
    9089/*FUNCTION KML_Style::DeepEcho {{{*/
    9190void  KML_Style::DeepEcho(){
     
    9897}
    9998/*}}}*/
    100 
    10199/*FUNCTION KML_Style::DeepEcho {{{*/
    102100void  KML_Style::DeepEcho(const char* indent){
     
    105103        bool  flag=true;
    106104
    107         _printf_(flag,"%sKML_Style:\n",indent);
     105        if(flag) _pprintLine_("" << indent << "KML_Style:");
    108106        KML_StyleSelector::DeepEcho(indent);
    109107
     
    114112//              icon->DeepEcho(indent2);
    115113//      else
    116                 _printf_(flag,"%s          icon: %p\n"          ,indent,icon);
     114                if(flag) _pprintLine_("" << indent << "          icon: " << icon);
    117115//      if (label)
    118116//              label->DeepEcho(indent2);
    119117//      else
    120                 _printf_(flag,"%s         label: %p\n"          ,indent,label);
     118                if(flag) _pprintLine_("" << indent << "         label: " << label);
    121119        if (line)
    122120                line->DeepEcho(indent2);
    123121        else
    124                 _printf_(flag,"%s          line: %p\n"          ,indent,line);
     122                if(flag) _pprintLine_("" << indent << "          line: " << line);
    125123        if (poly)
    126124                poly->DeepEcho(indent2);
    127125        else
    128                 _printf_(flag,"%s          poly: %p\n"          ,indent,poly);
     126                if(flag) _pprintLine_("" << indent << "          poly: " << poly);
    129127//      if (balloon)
    130128//              balloon->DeepEcho(indent2);
    131129//      else
    132                 _printf_(flag,"%s       balloon: %p\n"          ,indent,balloon);
     130                if(flag) _pprintLine_("" << indent << "       balloon: " << balloon);
    133131//      if (list)
    134132//              list->DeepEcho(indent2);
    135133//      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/*}}}*/
    142139/*FUNCTION KML_Style::Write {{{*/
    143140void  KML_Style::Write(FILE* filout,const char* indent){
     
    174171}
    175172/*}}}*/
    176 
    177173/*FUNCTION KML_Style::Read {{{*/
    178174void  KML_Style::Read(FILE* fid,char* kstr){
     
    246242}
    247243/*}}}*/
    248 
  • issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp

    r12493 r12515  
    4444        bool  flag=true;
    4545
    46         _printf_(flag,"KML_Unknown %s:\n",name);
     46        if(flag) _pprintLine_("KML_Unknown " << name << ":");
    4747        KML_Object::Echo();
    4848
    4949        if (value     )
    50                 _printf_(flag,"         value: \"%s\"\n"     ,value);
     50                if(flag) _pprintLine_("         value: \"" << value << "\"");
    5151    else
    52         _printf_(flag,"         value: [none]\n"     );
     52        if(flag) _pprintLine_("         value: [none]");
    5353
    5454        return;
     
    7373        bool         flag=true;
    7474
    75         _printf_(flag,"%sKML_Unknown %s:\n",indent,name);
     75        if(flag) _pprintLine_("" << indent << "KML_Unknown " << name << ":");
    7676        KML_Object::DeepEcho(indent);
    7777
     
    8181       
    8282                vtoken=strtok(valuei,nl);
    83                 _printf_(flag,"%s         value: \"%s"     ,indent,vtoken);
     83                if(flag) _pprintString_("" << indent << "         value: \"" << vtoken);
    8484   
    8585                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_("\"");
    8888
    8989                xfree((void**)&valuei);
    9090        }
    9191    else
    92         _printf_(flag,"%s         value: [none]\n"     ,indent);
     92        if(flag) _pprintLine_("" << indent << "         value: [none]");
    9393
    9494        return;
     
    139139        name=KMLFileTagName(NULL,
    140140                                                kstr);
    141 //      _printf_(true,"KML_Unknown::Read -- opening name=%s.\n",name);
     141//      if(true) _pprintLine_("KML_Unknown::Read -- opening name=" << name << ".");
    142142
    143143/*  get object attributes and check for solo tag  */
     
    151151        while (kstri=KMLFileToken(fid,
    152152                                                          &ncom,&pcom)) {
    153 //              _printf_(true,"KML_Unknown::Read -- kstri=%s.\n",kstri);
     153//              if(true) _pprintLine_("KML_Unknown::Read -- kstri=" << kstri << ".");
    154154                if      (!strncmp(&kstri[0],"</", 2) &&
    155155                                 !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 << ".");
    157157                        xfree((void**)&kstri);
    158158                        break;
  • issm/trunk-jpl/src/c/objects/Options/Option.cpp

    r12454 r12515  
    4747        bool  flag=true;
    4848
    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);
    5252        if(size){
    5353                StringFromSize(cstr,size,ndims);
    54                 _printf_(flag,"          size: %s\n" ,cstr);
     54                if(flag) _pprintLine_("          size: " << cstr);
    5555        }
    56         else _printf_(flag,"          size: [empty]\n" );
     56        else if(flag) _pprintLine_("          size: [empty]");
    5757}
    5858/*}}}*/
     
    7373        bool  flag=true;
    7474
    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);
    7878        if(size){
    7979                StringFromSize(cstr,size,ndims);
    80                 _printf_(flag,"%s          size: %s\n" ,indent,cstr);
     80                if(flag) _pprintLine_("" << indent << "          size: " << cstr);
    8181        }
    82         else _printf_(flag,"%s          size: [empty]\n" ,indent);
     82        else if(flag) _pprintLine_("" << indent << "          size: [empty]");
    8383}
    8484/*}}}*/
  • issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp

    r12473 r12515  
    4646        bool flag     = true;
    4747
    48         _printf_(flag,"OptionCell Echo:\n");
     48        if(flag) _pprintLine_("OptionCell Echo:");
    4949        Option::Echo();
    5050
    5151        if (values && size) {
    5252                StringFromSize(cstr,size,ndims);
    53                 _printf_(flag,"        values: %s %s\n" ,cstr,"cell");
     53                if(flag) _pprintLine_("        values: " << cstr << " " << "cell");
    5454        }
    55         else _printf_(flag,"        values: [empty]\n" );
     55        else if(flag) _pprintLine_("        values: [empty]");
    5656}
    5757/*}}}*/
     
    7575        bool  flag=true;
    7676
    77         _printf_(flag,"%sOptionCell DeepEcho:\n",indent);
     77        if(flag) _pprintLine_("" << indent << "OptionCell DeepEcho:");
    7878        Option::DeepEcho(indent);
    7979
     
    8686                        ColumnWiseDimsFromIndex(dims,i,size,ndims);
    8787                        StringFromDims(cstr,dims,ndims);
    88                         _printf_(flag,"%s        values: -------- begin %s --------\n" ,indent,cstr);
     88                        if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
    8989                        ((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
    90                         _printf_(flag,"%s        values: --------  end  %s --------\n" ,indent,cstr);
     90                        if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
    9191                }
    9292                xDelete<int>(dims);
    9393        }
    94         else _printf_(flag,"%s        values: [empty]\n" ,indent);
     94        else if(flag) _pprintLine_("" << indent << "        values: [empty]");
    9595}
    9696/*}}}*/
  • issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp

    r12493 r12515  
    4343        bool  flag=true;
    4444
    45         _printf_(flag,"OptionChar Echo:\n");
     45        if(flag) _pprintLine_("OptionChar Echo:");
    4646        Option::Echo();
    4747
     
    4949//              if (numel == 1) {
    5050                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 << "\"");
    5353                }
    5454                else {
    5555                        StringFromSize(cstr,size,ndims);
    56                         _printf_(flag,"        values: %s %s\n" ,cstr,"char");
     56                        if(flag) _pprintLine_("        values: " << cstr << " " << "char");
    5757                }
    5858        }
    59         else _printf_(flag,"        values: [empty]\n" );
     59        else if(flag) _pprintLine_("        values: [empty]");
    6060}
    6161/*}}}*/
     
    7979        bool  flag=true;
    8080
    81         _printf_(flag,"%sOptionChar DeepEcho:\n",indent);
     81        if(flag) _pprintLine_("" << indent << "OptionChar DeepEcho:");
    8282        Option::DeepEcho(indent);
    8383
     
    8787        if (values) {
    8888                if (ndims == 2 && size[0] == 1) {
    89                         _printf_(flag,"%s        values: \"%s\"\n" ,indent,values);
     89                        if(flag) _pprintLine_("" << indent << "        values: \"" << values << "\"");
    9090                }
    9191                else {
     
    9797                                RowWiseDimsFromIndex(dims,ipt,size,ndims);
    9898                                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\"");
    100100                                ipt+=size[1];
    101101                        }
     
    103103                }
    104104        }
    105         else _printf_(flag,"%s        values: [empty]\n" ,indent);
     105        else if(flag) _pprintLine_("" << indent << "        values: [empty]");
    106106}
    107107/*}}}*/
  • issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp

    r12493 r12515  
    4343        bool  flag=true;
    4444
    45         _printf_(flag,"OptionDouble Echo:\n");
     45        if(flag) _pprintLine_("OptionDouble Echo:");
    4646        Option::Echo();
    4747
    4848        if (values && size) {
    49                 if(numel == 1) _printf_(flag,"        values: %g\n" ,values[0]);
     49                if(numel == 1) if(flag) _pprintLine_("        values: " << values[0]);
    5050                else {
    5151                        StringFromSize(cstr,size,ndims);
    52                         _printf_(flag,"        values: %s %s\n" ,cstr,"IssmPDouble");
     52                        if(flag) _pprintLine_("        values: " << cstr << " " << "IssmPDouble");
    5353                }
    5454        }
    55         else _printf_(flag,"        values: [empty]\n" );
     55        else if(flag) _pprintLine_("        values: [empty]");
    5656}
    5757/*}}}*/
     
    7575        bool  flag=true;
    7676
    77         _printf_(flag,"%sOptionDouble DeepEcho:\n",indent);
     77        if(flag) _pprintLine_("" << indent << "OptionDouble DeepEcho:");
    7878        Option::DeepEcho(indent);
    7979
     
    8383        if (values) {
    8484                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]);
    8686                else{
    8787                        for (i=0; i<numel; i++) {
    8888                                RowWiseDimsFromIndex(dims,i,size,ndims);
    8989                                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]);
    9191                        }
    9292                }
    9393                xDelete<int>(dims);
    9494        }
    95         else _printf_(flag,"%s        values: [empty]\n" ,indent);
     95        else if(flag) _pprintLine_("" << indent << "        values: [empty]");
    9696}
    9797/*}}}*/
  • issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp

    r12493 r12515  
    4343        bool  flag=true;
    4444
    45         _printf_(flag,"OptionLogical Echo:\n");
     45        if(flag) _pprintLine_("OptionLogical Echo:");
    4646        Option::Echo();
    4747
    4848        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"));
    5050                else{
    5151                        StringFromSize(cstr,size,ndims);
    52                         _printf_(flag,"        values: %s %s\n" ,cstr,"logical");
     52                        if(flag) _pprintLine_("        values: " << cstr << " " << "logical");
    5353                }
    5454        }
    55         else _printf_(flag,"        values: [empty]\n" );
     55        else if(flag) _pprintLine_("        values: [empty]");
    5656}
    5757/*}}}*/
     
    7575        bool  flag=true;
    7676
    77         _printf_(flag,"%sOptionLogical DeepEcho:\n",indent);
     77        if(flag) _pprintLine_("" << indent << "OptionLogical DeepEcho:");
    7878        Option::DeepEcho(indent);
    7979
     
    8282
    8383        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"));
    8585                else{
    8686                        dims=xNew<int>(ndims);
     
    8888                                RowWiseDimsFromIndex(dims,i,size,ndims);
    8989                                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"));
    9191                        }
    9292                        xDelete<int>(dims);
    9393                }
    9494        }
    95         else _printf_(flag,"%s        values: [empty]\n" ,indent);
     95        else if(flag) _pprintLine_("" << indent << "        values: [empty]");
    9696}
    9797/*}}}*/
  • issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp

    r12493 r12515  
    5151        bool  flag=true;
    5252
    53         _printf_(flag,"OptionStruct Echo:\n");
     53        if(flag) _pprintLine_("OptionStruct Echo:");
    5454        Option::Echo();
    5555
    5656        if (values && size) {
    5757                StringFromSize(cstr,size,ndims);
    58                 _printf_(flag,"        values: %s %s\n" ,cstr,"struct");
     58                if(flag) _pprintLine_("        values: " << cstr << " " << "struct");
    5959        }
    60         else _printf_(flag,"        values: [empty]\n" );
     60        else if(flag) _pprintLine_("        values: [empty]");
    6161}
    6262/*}}}*/
     
    8080        bool  flag=true;
    8181
    82         _printf_(flag,"%sOptionStruct DeepEcho:\n",indent);
     82        if(flag) _pprintLine_("" << indent << "OptionStruct DeepEcho:");
    8383        Option::DeepEcho(indent);
    8484
     
    9292                        StringFromDims(cstr,dims,ndims);
    9393                        if (values[i]->Size()){
    94                                 _printf_(flag,"%s        values: -------- begin %s --------\n" ,indent,cstr);
     94                                if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
    9595                                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 << " --------");
    9797                        }
    98                         else _printf_(flag,"%s        values: %s [empty]\n" ,indent,cstr);
     98                        else if(flag) _pprintLine_("" << indent << "        values: " << cstr << " [empty]");
    9999                }
    100100                xDelete<int>(dims);
    101101        }
    102         else _printf_(flag,"%s        values: [empty]\n" ,indent);
     102        else if(flag) _pprintLine_("" << indent << "        values: [empty]");
    103103}
    104104/*}}}*/
  • issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp

    r12512 r12515  
    9191         _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<xbest<<"  "<<setw(12)<<fxbest<<"  "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<"         initial");
    9292        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);
    9494                loop=false;
    9595        }
     
    190190                /*Stop the optimization?*/
    191191                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);
    193193                        loop=false;
    194194                }
    195195                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 << ")");
    197197                        loop=false;
    198198                }
    199199                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);
    201201                        loop=false;
    202202                }
  • issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp

    r12495 r12515  
    5151                sizeof(wgt4 )/sizeof(IssmPDouble)};
    5252
    53         //      _printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
     53        //      if(true) _pprintLine_("Gauss-Legendre recurrence coefficients ngaus=" << ngaus);
    5454        *pxgaus =xNew<IssmPDouble>(ngaus);
    5555        *pxwgt  =xNew<IssmPDouble>(ngaus);
     
    11391139                sizeof(wgt20)/sizeof(IssmPDouble)};
    11401140
    1141         //      _printf_(true,"GaussLegendreTria: iord=%d\n",iord);
     1141        //      if(true) _pprintLine_("GaussLegendreTria: iord=" << iord);
    11421142
    11431143        /*  check to see if Gauss points need to be calculated  */
     
    11991199        }
    12001200
    1201         //      _printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus);
     1201        //      if(true) _pprintLine_("GaussLegendreTria - ngaus=" << *pngaus);
    12021202        //      for (i=0; i<*pngaus; i++)
    12031203        //              _printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",
     
    13981398                sizeof(wgt6 )/sizeof(IssmPDouble)};
    13991399
    1400         //      _printf_(true,"GaussLegendreTetra: iord=%d\n",iord);
     1400        //      if(true) _pprintLine_("GaussLegendreTetra: iord=" << iord);
    14011401
    14021402        /*  check to see if Gauss points need to be calculated  */
     
    15211521                sizeof(wgt5 )/sizeof(IssmPDouble)};
    15221522
    1523         //      _printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
     1523        //      if(true) _pprintLine_("Gauss-Lobatto recurrence coefficients ngaus=" << ngaus);
    15241524        *pxgaus =xNew<IssmPDouble>(ngaus);
    15251525        *pxwgt  =xNew<IssmPDouble>(ngaus);
  • issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp

    r12513 r12515  
    6363                //Stop the optimization?
    6464                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);
    6666                        loop=false;
    6767                }
    6868                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'");
    7070                        loop=false;
    7171                }
  • issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp

    r11679 r12515  
    1515        int    i;
    1616
    17         _printf_(VerboseSolution(),"%s\n","   updating boundary conditions...");
     17        if(VerboseSolution()) _pprintLine_("" << "   updating boundary conditions...");
    1818                       
    1919        /*set current analysis: */
  • issm/trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp

    r11832 r12515  
    2222
    2323        /*compute thickness */
    24         _printf_(VerboseSolution(),"%s\n","   computing thickness");
     24        if(VerboseSolution()) _pprintLine_("" << "   computing thickness");
    2525        femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum);
    2626        solver_linear(femmodel);
     
    3030
    3131        /*compute adjoint*/
    32         _printf_(VerboseSolution(),"%s\n","   computing adjoint");
     32        if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
    3333        femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum,AdjointBalancethicknessAnalysisEnum);
    3434        solver_adjoint_linear(femmodel);
     
    3636        /*Save results*/
    3737        if(save_results){
    38                 _printf_(VerboseSolution(),"   saving results\n");
     38                if(VerboseSolution()) _pprintLine_("   saving results");
    3939                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointEnum);
    4040        }
  • issm/trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp

    r11832 r12515  
    2525
    2626        /*Compute velocities*/
    27         _printf_(VerboseSolution(),"%s\n","   computing velocities");
     27        if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
    2828        femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
    2929        solver_nonlinear(femmodel,conserve_loads);
     
    3333
    3434        /*Compute adjoint*/
    35         _printf_(VerboseSolution(),"%s\n","   computing adjoint");
     35        if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
    3636        femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum);
    3737        solver_adjoint_linear(femmodel);
     
    3939        /*Save results*/
    4040        if(save_results){
    41                 _printf_(VerboseSolution(),"   saving results\n");
     41                if(VerboseSolution()) _pprintLine_("   saving results");
    4242                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum);
    4343                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  
    2424        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
    2525
    26         _printf_(VerboseSolution(),"call computational core:\n");
     26        if(VerboseSolution()) _pprintLine_("call computational core:");
    2727        solver_linear(femmodel);
    2828
    2929        if(save_results){
    30                 _printf_(VerboseSolution(),"   saving results\n");
     30                if(VerboseSolution()) _pprintLine_("   saving results");
    3131                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
    3232        }
  • issm/trunk-jpl/src/c/solutions/bedslope_core.cpp

    r11832 r12515  
    1919        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
    2020
    21         _printf_(VerboseSolution(),"%s\n","   computing slope");
     21        if(VerboseSolution()) _pprintLine_("" << "   computing slope");
    2222
    2323        /*Call on core computations: */
     
    2828       
    2929        if(save_results){
    30                 _printf_(VerboseSolution(),"   saving results\n");
     30                if(VerboseSolution()) _pprintLine_("   saving results");
    3131                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeXEnum);
    3232                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  
    6666
    6767        /*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");
    6969        if(isstokes) solutioncore(femmodel);
    7070
     
    8181
    8282                /*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);
    8484                for(i=0;i<num_responses;i++) step_responses[i]=(int)responses[n*num_responses+i];
    8585                femmodel->parameters->SetParam(step_responses,1,num_responses,StepResponsesEnum);
     
    8888                if(solution_type==SteadystateSolutionEnum) solutioncore(femmodel);
    8989
    90                 _printf_(VerboseControl(),"%s\n","   compute adjoint state:");
     90                if(VerboseControl()) _pprintLine_("" << "   compute adjoint state:");
    9191                adjointcore(femmodel);
    9292                gradient_core(femmodel,n,search_scalar==0);
     
    9898                }
    9999
    100                 _printf_(VerboseControl(),"%s\n","   optimizing along gradient direction");
     100                if(VerboseControl()) _pprintLine_("" << "   optimizing along gradient direction");
    101101                optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
    102102                BrentSearch(&search_scalar,J+n,&optpars,&objectivefunction,&optargs);
    103103
    104                 _printf_(VerboseControl(),"%s\n","   updating parameter using optimized search scalar"); //true means update save controls
     104                if(VerboseControl()) _pprintLine_("" << "   updating parameter using optimized search scalar"); //true means update save controls
    105105                InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true);
    106106               
     
    108108        }
    109109
    110         _printf_(VerboseControl(),"%s\n","   preparing final solution");
     110        if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
    111111        femmodel->parameters->SetParam(true,SaveResultsEnum);
    112112        solutioncore(femmodel);
  • issm/trunk-jpl/src/c/solutions/controlconvergence.cpp

    r12477 r12515  
    2525        if (!isnan(tol_cm) && J<tol_cm){
    2626                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);
    2828        }
    2929
  • issm/trunk-jpl/src/c/solutions/controltao_core.cpp

    r12513 r12515  
    5454        /*Initialize TAO*/
    5555        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)");
    5757        TaoSetFromOptions(tao);
    5858        TaoSetType(tao,"tao_blmvm");
     
    7878
    7979        /*Solver optimization problem*/
    80         _printf_(VerboseControl(),"%s\n","   Starting optimization");
     80        if(VerboseControl()) _pprintLine_("" << "   Starting optimization");
    8181        TaoSolve(tao);
    8282        TaoView(tao,PETSC_VIEWER_STDOUT_WORLD);
     
    8888
    8989        /*Finalize*/
    90         _printf_(VerboseControl(),"%s\n","   preparing final solution");
     90        if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
    9191        femmodel->parameters->SetParam(true,SaveResultsEnum);
    9292        void (*solutioncore)(FemModel*)=NULL;
     
    163163
    164164        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_("-----------------------------------+-----------------------");
    167167        _pprintString_(setw(4)<<its<<"   "<<setw(12)<<setprecision(7)<<f<<"  "<<setw(12)<<setprecision(7)<<gnorm<<"  | ");
    168168
  • issm/trunk-jpl/src/c/solutions/convergence.cpp

    r12493 r12515  
    5555                nF=pf->Norm(NORM_TWO);
    5656                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);
    5858
    5959                //clean up
     
    7171        res=nKUoldF/nF;
    7272        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");
    7474                _error2_("mechanical equilibrium convergence criterion is NaN!");
    7575        }
     
    8181        //print
    8282        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 << " %");
    8484                converged=true;
    8585        }
    8686        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 << " %");
    8888                converged=false;
    8989        }
     
    104104                if (!isnan(eps_rel)){
    105105                        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 << " %");
    107107                        }
    108108                        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 << " %");
    110110                                converged=false;
    111111                        }
    112112                }
    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 << " %");
    114114
    115115        }
     
    129129                if (!isnan(eps_abs)){
    130130                        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");
    132132                        }
    133133                        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");
    135135                                converged=false;
    136136                        }
    137137                }
    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");
    139139
    140140        }
  • issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp

    r12439 r12515  
    5959        if(ishutter){
    6060                       
    61                 _printf_(VerboseSolution(),"%s\n","   computing hutter velocities");
     61                if(VerboseSolution()) _pprintLine_("" << "   computing hutter velocities");
    6262
    6363                //Take the last velocity into account so that the velocity on the MacAyeal domain is not zero
     
    7272        if (ismacayealpattyn ^ isstokes){ // ^ = xor
    7373               
    74                 _printf_(VerboseSolution(),"%s\n","   computing velocities");
     74                if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
    7575                femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
    7676                if(isnewton)
     
    8282        if (ismacayealpattyn && isstokes){
    8383
    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 ");
    8585                solver_stokescoupling_nonlinear(femmodel,conserve_loads);
    8686        }
     
    8888        if (dim==3 & (ishutter || ismacayealpattyn)){
    8989
    90                 _printf_(VerboseSolution(),"%s\n","   computing vertical velocities");
     90                if(VerboseSolution()) _pprintLine_("" << "   computing vertical velocities");
    9191                femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum);
    9292                solver_linear(femmodel);
     
    9595
    9696        if(save_results){
    97                 _printf_(VerboseSolution(),"   saving results\n");
     97                if(VerboseSolution()) _pprintLine_("   saving results");
    9898                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
    9999                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  
    2121        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
    2222
    23         _printf_(VerboseSolution(),"   computing enthalpy\n");
     23        if(VerboseSolution()) _pprintLine_("   computing enthalpy");
    2424        femmodel->SetCurrentConfiguration(EnthalpyAnalysisEnum);
    2525        solver_nonlinear(femmodel,true);
     
    2929
    3030        if(save_results){
    31                 _printf_(VerboseSolution(),"   saving results\n");
     31                if(VerboseSolution()) _pprintLine_("   saving results");
    3232                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum);
    3333                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  
    2323
    2424        /*Compute gradient*/
    25         _printf_(VerboseControl(),"   compute cost function gradient\n");
     25        if(VerboseControl()) _pprintLine_("   compute cost function gradient");
    2626        Gradjx(&gradient,&norm_list,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters);
    2727
    2828        if (orthogonalize){
    29                 _printf_(VerboseControl(),"   orthogonalization\n");
     29                if(VerboseControl()) _pprintLine_("   orthogonalization");
    3030                ControlInputGetGradientx(&old_gradient,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters);
    3131                Orthx(&new_gradient,gradient,old_gradient); xdelete(&old_gradient); xdelete(&gradient);
  • issm/trunk-jpl/src/c/solutions/hydrology_core.cpp

    r12477 r12515  
    4545        for(i=0;i<nsteps;i++){
    4646               
    47                 if(nsteps)_printf_(VerboseSolution(),"time step:%i/%i\n",i+1,nsteps);
     47                if(nsteps)if(VerboseSolution()) _pprintLine_("time step:" << i+1 << "/" << nsteps);
    4848                time+=dt;
    4949                femmodel->parameters->SetParam(time,TimeEnum);
     
    5353
    5454                if(save_results && ((i+1)%output_frequency==0 || (i+1)==nsteps)){
    55                         _printf_(VerboseSolution(),"   saving results \n");
     55                        if(VerboseSolution()) _pprintLine_("   saving results ");
    5656                        //InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,i+1,time);
    5757                        //InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,HydrologyWaterVxEnum,i+1,time);
     
    5959                       
    6060                        /*unload results*/
    61                         _printf_(VerboseSolution(),"   saving temporary results\n");
     61                        if(VerboseSolution()) _pprintLine_("   saving temporary results");
    6262                        OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
    6363                }
  • issm/trunk-jpl/src/c/solutions/hydrology_core_step.cpp

    r12477 r12515  
    1717        bool modify_loads=true;
    1818
    19         _printf_(VerboseSolution(),"   computing water column\n");
     19        if(VerboseSolution()) _pprintLine_("   computing water column");
    2020        femmodel->SetCurrentConfiguration(HydrologyAnalysisEnum);
    2121        solver_nonlinear(femmodel,modify_loads);
  • issm/trunk-jpl/src/c/solutions/issm.cpp

    r12512 r12515  
    6060
    6161        /*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_("");
    6666        ProcessArguments(&solution_type,&binfilename,&outbinfilename,&petscfilename,&lockfilename,argc,argv);
    6767
     
    100100        #endif
    101101
    102         _printf_(true,"call computational core:\n");
     102        if(true) _pprintLine_("call computational core:");
    103103        #ifdef _HAVE_MPI_
    104104        MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
     
    133133        #endif
    134134       
    135         _printf_(true,"write results to disk:\n");
     135        if(true) _pprintLine_("write results to disk:");
    136136        OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
    137137
     
    139139        pfclose(output_fid,lockfilename);
    140140        if (waitonlock>0){
    141                 _printf_(true,"write lock file:\n");
     141                if(true) _pprintLine_("write lock file:");
    142142                WriteLockFile(lockfilename);
    143143        }
     
    174174       
    175175        #ifdef _HAVE_PETSC_
    176         _printf_(true,"closing MPI and Petsc\n");
     176        if(true) _pprintLine_("closing MPI and Petsc");
    177177        PetscFinalize();
    178178        #else
    179179        #ifdef _HAVE_MPI_
    180         _printf_(true,"closing MPI and Petsc\n");
     180        if(true) _pprintLine_("closing MPI and Petsc");
    181181        MPI_Finalize();
    182182        #endif
  • issm/trunk-jpl/src/c/solutions/kriging.cpp

    r12493 r12515  
    5454
    5555        /*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_("");
    6060        ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,argc,argv);
    6161
     
    6565        pfclose(input_fid,binfilename);
    6666
    67         _printf_(true,"call computational core:\n");
     67        if(true) _pprintLine_("call computational core:");
    6868        pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options);
    6969
    70         _printf_(true,"write results to disk:\n");
     70        if(true) _pprintLine_("write results to disk:");
    7171        Results *results = new Results();
    7272        if(my_rank==0){
     
    8282
    8383        /*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:");
    8585        WriteLockFile(lockfilename);
    8686
     
    100100
    101101#ifdef _HAVE_PETSC_
    102         _printf_(true,"closing MPI and Petsc\n");
     102        if(true) _pprintLine_("closing MPI and Petsc");
    103103        PetscFinalize();
    104104#else
    105105#ifdef _HAVE_MPI_
    106         _printf_(true,"closing MPI and Petsc\n");
     106        if(true) _pprintLine_("closing MPI and Petsc");
    107107        MPI_Finalize();
    108108#endif
  • issm/trunk-jpl/src/c/solutions/prognostic_core.cpp

    r12326 r12515  
    2626
    2727        if(ispdd){
    28           _printf_(VerboseSolution(),"   call positive degree day module\n");
     28          if(VerboseSolution()) _pprintLine_("   call positive degree day module");
    2929          PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
    3030        }       
    3131
    32         _printf_(VerboseSolution(),"   call computational core\n");
     32        if(VerboseSolution()) _pprintLine_("   call computational core");
    3333        solver_linear(femmodel);
    3434       
    3535        if(save_results){
    36                 _printf_(VerboseSolution(),"   saving results\n");
     36                if(VerboseSolution()) _pprintLine_("   saving results");
    3737                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
    3838        }
  • issm/trunk-jpl/src/c/solutions/steadystate_core.cpp

    r12493 r12515  
    99#endif
    1010
     11#include "../include/include.h"
    1112#include "../toolkits/toolkits.h"
    1213#include "../objects/objects.h"
     
    1617#include "./solutions.h"
    1718#include "../modules/modules.h"
    18 #include "../include/include.h"
    1919#include "../solvers/solvers.h"
    2020
     
    4343        for(;;){
    4444       
    45                 _printf_(VerboseSolution(),"%s%i\n","   computing temperature and velocity for step: ",step);
     45                if(VerboseSolution()) _pprintLine_("   computing temperature and velocity for step: " << step);
    4646                #ifdef _HAVE_THERMAL_
    4747                if(isenthalpy==0){
     
    5555                #endif
    5656
    57                 _printf_(VerboseSolution(),"%s\n","   computing new velocity");
     57                if(VerboseSolution()) _pprintLine_("" << "   computing new velocity");
    5858                diagnostic_core(femmodel);
    5959
    6060                if (step>1){
    61                         _printf_(VerboseSolution(),"%s\n","   checking velocity, temperature and pressure convergence");
     61                        if(VerboseSolution()) _pprintLine_("" << "   checking velocity, temperature and pressure convergence");
    6262                        if(steadystateconvergence(femmodel)) break;
    6363                }
    6464                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");
    6666                        break;
    6767                }
    6868               
    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");
    7070                InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxPicardEnum);
    7171                InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyPicardEnum);
     
    7979       
    8080        if(save_results){
    81                 _printf_(VerboseSolution(),"   saving results\n");
     81                if(VerboseSolution()) _pprintLine_("   saving results");
    8282                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
    8383                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  
    1919        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
    2020
    21         _printf_(VerboseSolution(),"%s\n","computing slope...");
     21        if(VerboseSolution()) _pprintLine_("" << "computing slope...");
    2222
    2323        /*Call on core computations: */
     
    2828       
    2929        if(save_results){
    30                 _printf_(VerboseSolution(),"saving results:\n");
     30                if(VerboseSolution()) _pprintLine_("saving results:");
    3131                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeXEnum);
    3232                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  
    2929        }
    3030
    31         _printf_(VerboseSolution(),"   computing temperatures\n");
     31        if(VerboseSolution()) _pprintLine_("   computing temperatures");
    3232        femmodel->SetCurrentConfiguration(ThermalAnalysisEnum);
    3333        solver_thermal_nonlinear(femmodel);
    3434
    35         _printf_(VerboseSolution(),"   computing melting\n");
     35        if(VerboseSolution()) _pprintLine_("   computing melting");
    3636        femmodel->SetCurrentConfiguration(MeltingAnalysisEnum);
    3737        solver_linear(femmodel);
    3838
    3939        if(save_results){
    40                 _printf_(VerboseSolution(),"   saving results\n");
     40                if(VerboseSolution()) _pprintLine_("   saving results");
    4141                InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum);
    4242                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  
    8686                femmodel->parameters->SetParam(step,StepEnum);
    8787
    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)");
    8989                if(step%output_frequency==0 || time==finaltime)
    9090                 save_results=true;
     
    9494
    9595                if(isthermal && dim==3){
    96                         _printf_(VerboseSolution(),"   computing temperatures\n");
     96                        if(VerboseSolution()) _pprintLine_("   computing temperatures");
    9797                        #ifdef _HAVE_THERMAL_
    9898                        if(isenthalpy==0){
     
    108108
    109109                if(isdiagnostic){
    110                         _printf_(VerboseSolution(),"   computing new velocity\n");
     110                        if(VerboseSolution()) _pprintLine_("   computing new velocity");
    111111                        #ifdef _HAVE_DIAGNOSTIC_
    112112                        diagnostic_core(femmodel);
     
    117117
    118118                if(isprognostic){
    119                         _printf_(VerboseSolution(),"   computing new thickness\n");
     119                        if(VerboseSolution()) _pprintLine_("   computing new thickness");
    120120                        prognostic_core(femmodel);
    121                         _printf_(VerboseSolution(),"   updating vertices positions\n");
     121                        if(VerboseSolution()) _pprintLine_("   updating vertices positions");
    122122                        UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
    123123                }
    124124
    125125                if(isgroundingline){
    126                         _printf_(VerboseSolution(),"   computing new grounding line position\n");
     126                        if(VerboseSolution()) _pprintLine_("   computing new grounding line position");
    127127                        #ifdef _HAVE_GROUNDINGLINE_
    128128                        GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
     
    134134                /*unload results*/
    135135                if(save_results){
    136                         _printf_(VerboseSolution(),"   saving transient results\n");
     136                        if(VerboseSolution()) _pprintLine_("   saving transient results");
    137137                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceEnum);
    138138                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedEnum);
     
    141141                        RequestedOutputsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,requested_outputs,numoutputs);
    142142
    143                         _printf_(VerboseSolution(),"   saving temporary results\n");
     143                        if(VerboseSolution()) _pprintLine_("   saving temporary results");
    144144                        OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
    145145                }
  • issm/trunk-jpl/src/c/solvers/solver_newton.cpp

    r12477 r12515  
    7575                }
    7676                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");
    7878                        bool max_iteration_state=true;
    7979                        int tempStep=1;
     
    100100        }
    101101
    102         _printf_(VerboseConvergence(),"\n   total number of iterations: %i\n",count-1);
     102        if(VerboseConvergence()) _pprintLine_("\n   total number of iterations: " << count-1);
    103103
    104104        /*clean-up*/
  • issm/trunk-jpl/src/c/solvers/solver_nonlinear.cpp

    r12477 r12515  
    7373
    7474                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);
    7676
    7777                //rift convergence
     
    9393                }
    9494                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");
    9696                        converged=true;
    9797                        InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,converged,ConvergedEnum);
     
    105105        }
    106106
    107         _printf_(VerboseConvergence(),"\n   total number of iterations: %i\n",count-1);
     107        if(VerboseConvergence()) _pprintLine_("\n   total number of iterations: " << count-1);
    108108
    109109        /*clean-up*/
  • issm/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp

    r11679 r12515  
    9191                if(converged==true)break;
    9292                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");
    9494                        break;
    9595                }
  • issm/trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp

    r12477 r12515  
    4747        converged=false;
    4848
    49         _printf_(VerboseSolution(),"%s\n","starting direct shooting method");
     49        if(VerboseSolution()) _pprintLine_("" << "starting direct shooting method");
    5050        InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,true,ResetPenaltiesEnum);
    5151        InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,false,ConvergedEnum);
     
    6666
    6767                if (!converged){
    68                         _printf_(VerboseConvergence(),"%s%i\n","   #unstable constraints = ",num_unstable_constraints);
     68                        if(VerboseConvergence()) _pprintLine_("" << "   #unstable constraints = " << num_unstable_constraints);
    6969                        if (num_unstable_constraints <= thermal_penalty_threshold)converged=true;
    7070                        if (count>=thermal_maxiter){
    7171                                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");
    7373                        }
    7474                }
Note: See TracChangeset for help on using the changeset viewer.