Changeset 2330


Ignore:
Timestamp:
09/25/09 17:00:28 (15 years ago)
Author:
Mathieu Morlighem
Message:

renamed debug -> verbose

Location:
issm/trunk/src
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp

    r2312 r2330  
    7171        parameters->AddObject(param);
    7272
    73         /*debug: */
    74         param= new Param(count,"debug",INTEGER);
    75         param->SetInteger(iomodel->debug);
     73        /*verbose: */
     74        param= new Param(count,"verbose",INTEGER);
     75        param->SetInteger(iomodel->verbose);
    7676        parameters->AddObject(param);
    7777
  • issm/trunk/src/c/ModelProcessorx/IoModel.cpp

    r2312 r2330  
    119119        iomodel->mincontrolconstraint=0;
    120120        iomodel->maxcontrolconstraint=0;
    121         iomodel->debug=0;
     121        iomodel->verbose=0;
    122122        iomodel->plot=0;
    123123        iomodel->eps_res=0;
     
    329329        IoModelFetchData((void**)&iomodel->meanvel,NULL,NULL,iomodel_handle,"meanvel","Scalar",NULL);
    330330        IoModelFetchData((void**)&iomodel->epsvel,NULL,NULL,iomodel_handle,"epsvel","Scalar",NULL);
    331         IoModelFetchData((void**)&iomodel->debug,NULL,NULL,iomodel_handle,"debug","Integer",NULL);
     331        IoModelFetchData((void**)&iomodel->verbose,NULL,NULL,iomodel_handle,"verbose","Integer",NULL);
    332332        IoModelFetchData((void**)&iomodel->plot,NULL,NULL,iomodel_handle,"plot","Integer",NULL);
    333333        IoModelFetchData((void**)&iomodel->artificial_diffusivity,NULL,NULL,iomodel_handle,"artificial_diffusivity","Integer",NULL);
  • issm/trunk/src/c/ModelProcessorx/IoModel.h

    r2312 r2330  
    117117        double  mincontrolconstraint;
    118118        double  maxcontrolconstraint;
    119         int     debug;
     119        int     verbose;
    120120        int     plot;
    121121        double  eps_res;
  • issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp

    r2115 r2330  
    5050        double* qmu_part=NULL;
    5151        int     qmu_npart;
    52         int     debug=0;
     52        int     verbose=0;
    5353
    5454        extern int my_rank;
     
    5959       
    6060        /*some parameters needed: */
    61         model->FindParam(&debug,"debug");
     61        model->FindParam(&verbose,"verbose");
    6262               
    6363        /*First off, recover the response descriptors for the response functions: */
     
    146146        if(analysis_type==DiagnosticAnalysisEnum()){
    147147                       
    148                 if(debug)_printf_("Starting diagnostic core\n");
     148                if(verbose)_printf_("Starting diagnostic core\n");
    149149
    150150                diagnostic_core(results,model,inputs);
     
    153153        else if(analysis_type==ThermalAnalysisEnum()){
    154154               
    155                 if(debug)_printf_("Starting thermal core\n");
     155                if(verbose)_printf_("Starting thermal core\n");
    156156                thermal_core(results,model,inputs);
    157157
     
    159159        else if(analysis_type==PrognosticAnalysisEnum()){
    160160
    161                 if(debug)_printf_("Starting prognostic core\n");
     161                if(verbose)_printf_("Starting prognostic core\n");
    162162                prognostic_core(results,model,inputs);
    163163
     
    165165        else if(analysis_type==TransientAnalysisEnum()){
    166166
    167                 if(debug)_printf_("Starting transient core\n");
     167                if(verbose)_printf_("Starting transient core\n");
    168168                transient_core(results,model,inputs);
    169169
     
    174174
    175175        /*Now process the outputs, before computing the dakota responses: */
    176         if(debug)_printf_("process results:\n");
     176        if(verbose)_printf_("process results:\n");
    177177
    178178        ProcessResults(&processed_results,results,model,analysis_type);
    179179
    180180        /*compute responses on cpu 0: dummy for now! */
    181         if(debug)_printf_("compute dakota responses:\n");
     181        if(verbose)_printf_("compute dakota responses:\n");
    182182        DakotaResponses(responses,responses_descriptors,numresponses,model,results,processed_results,analysis_type,sub_analysis_type);
    183183
  • issm/trunk/src/c/parallel/ControlInitialization.cpp

    r2316 r2330  
    3434
    3535        /*flags: */
    36         int debug=0;
     36        int verbose=0;
    3737        int dim=-1;
    3838        int ishutter=0;
     
    5454
    5555        /*first recover parameters common to all solutions:*/
    56         model->FindParam(&debug,"debug");
     56        model->FindParam(&verbose,"verbose");
    5757        model->FindParam(&dim,"dim");
    5858        model->FindParam(&ishutter,"ishutter");
     
    8383
    8484        //compute slopes
    85         if(debug)_printf_("%s\n","computing bed slope (x and y derivatives)...");
     85        if(verbose)_printf_("%s\n","computing bed slope (x and y derivatives)...");
    8686        diagnostic_core_linear(&slopex,fem_sl,inputs,SlopeComputeAnalysisEnum(),BedXAnalysisEnum());
    8787        diagnostic_core_linear(&slopey,fem_sl,inputs,SlopeComputeAnalysisEnum(),BedYAnalysisEnum());
     
    9797
    9898        //horizontal velocity
    99         if(debug)_printf_("%s\n"," computing horizontal velocities...");
     99        if(verbose)_printf_("%s\n"," computing horizontal velocities...");
    100100        diagnostic_core_nonlinear(&ug,NULL,NULL,NULL,fem_dh,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum());
    101         if(debug)_printf_("%s\n"," extruding horizontal velocities...");
     101        if(verbose)_printf_("%s\n"," extruding horizontal velocities...");
    102102        VecDuplicatePatch(&ug_horiz,ug); FieldExtrudex( ug_horiz,fem_dh->elements,fem_dh->nodes, fem_dh->loads,fem_dh-> materials,"velocity",1);
    103103
    104104        //vertical velocity
    105         if(debug)_printf_("%s\n"," computing vertical velocities...");
     105        if(verbose)_printf_("%s\n"," computing vertical velocities...");
    106106        inputs->Add("velocity",ug_horiz,numberofdofspernode_dh,numberofnodes);
    107107        diagnostic_core_linear(&ug_vert,fem_dv,inputs,DiagnosticAnalysisEnum(),VertAnalysisEnum());
    108108
    109109        //Create 3d u_g
    110         if(debug)_printf_("%s\n"," combining horizontal and vertical velocities...");
     110        if(verbose)_printf_("%s\n"," combining horizontal and vertical velocities...");
    111111        VecFree(&ug); ug=NewVec(numberofnodes*3);
    112112        xfree((void**)&dofset);dofset=dofsetgen(2,&dof01[0],3,numberofnodes*3); VecMerge(ug,ug_horiz,dofset,numberofnodes*2);
     
    115115
    116116        //Create 4d u_g
    117         if(debug)_printf_("%s\n"," computing pressure according to Pattyn...");
     117        if(verbose)_printf_("%s\n"," computing pressure according to Pattyn...");
    118118        ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->loads,  fem_dh->materials, numberofnodes);
    119119        VecScale(pg,1.0/stokesreconditioning);
     
    127127
    128128        //update spcs
    129         if(debug)_printf_("%s\n"," update boundary conditions for stokes using velocities previously computed...");
     129        if(verbose)_printf_("%s\n"," update boundary conditions for stokes using velocities previously computed...");
    130130        xfree((void**)&dofset);dofset=dofsetgen(3,dof012,4,numberofnodes*4); VecMerge(fem_ds->yg->vector,ug,dofset,3*numberofnodes);
    131131       
     
    134134
    135135        //Compute Stokes velocities to speed up later runs
    136         if(debug)_printf_("%s\n"," computing stokes velocities and pressure ...");
     136        if(verbose)_printf_("%s\n"," computing stokes velocities and pressure ...");
    137137        VecFree(&ug);
    138138        diagnostic_core_nonlinear(&ug,NULL,NULL,NULL,fem_ds,inputs,DiagnosticAnalysisEnum(),StokesAnalysisEnum());
  • issm/trunk/src/c/parallel/control_core.cpp

    r2267 r2330  
    5252        int sub_analysis_type;
    5353        int     control_steady;
    54         int debug=0;
     54        int verbose=0;
    5555        int convergence=0;
    5656        int numberofnodes;
  • issm/trunk/src/c/parallel/convergence.cpp

    r2106 r2330  
    3030        double eps_rel;
    3131        double eps_abs;
    32         int    debug;
     32        int    verbose;
    3333        double yts;
    3434
     
    3838        parameters->FindParam((void*)&eps_abs,"eps_abs");
    3939        parameters->FindParam((void*)&yts,"yts");
    40         parameters->FindParam((void*)&debug,"debug");
     40        parameters->FindParam((void*)&verbose,"verbose");
    4141
    4242        /*Display solver caracteristics*/
    43         if (debug>1){
     43        if (verbose>1){
    4444
    4545                //compute KUF = KU - F = K*U - F
     
    8181        //print
    8282        if(res<eps_res){
    83                 if (debug) _printf_("%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," \%");
     83                if (verbose) _printf_("%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," \%");
    8484                converged=1;
    8585        }
    8686        else{
    87                 if (debug) _printf_("%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," \%");
     87                if (verbose) _printf_("%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," \%");
    8888                converged=0;
    8989        }
    9090
    9191        /*Relative criterion (optional)*/
    92         if (!isnan(eps_rel) || (debug>1)){
     92        if (!isnan(eps_rel) || (verbose>1)){
    9393
    9494                //compute norm(du)/norm(u)
     
    104104                if (!isnan(eps_rel)){
    105105                        if((ndu/nu)<eps_rel){
    106                                 if (debug) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," \%");
     106                                if (verbose) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," \%");
    107107                        }
    108108                        else{
    109                                 if (debug) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," \%");
     109                                if (verbose) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," \%");
    110110                                converged=0;
    111111                        }
     
    116116
    117117        /*Absolute criterion (Optional) = max(du)*/
    118         if (!isnan(eps_abs) || (debug>1)){
     118        if (!isnan(eps_abs) || (verbose>1)){
    119119
    120120                //compute max(du)
     
    129129                if (!isnan(eps_abs)){
    130130                        if ((nduinf*yts)<eps_abs){
    131                                 if (debug) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");
     131                                if (verbose) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");
    132132                        }
    133133                        else{
    134                                 if (debug) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");
     134                                if (verbose) _printf_("%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");
    135135                                converged=0;
    136136                        }
  • issm/trunk/src/c/parallel/diagnostic_core.cpp

    r2324 r2330  
    3939
    4040        /*flags: */
    41         int debug=0;
     41        int verbose=0;
    4242        int qmu_analysis=0;
    4343        int dim=-1;
     
    6262
    6363        //first recover parameters common to all solutions
    64         model->FindParam(&debug,"debug");
     64        model->FindParam(&verbose,"verbose");
    6565        model->FindParam(&dim,"dim");
    6666        model->FindParam(&ishutter,"ishutter");
     
    9292        if(ishutter){
    9393                       
    94                 if(debug)_printf_("%s\n","computing surface slope (x and y derivatives)...");
     94                if(verbose)_printf_("%s\n","computing surface slope (x and y derivatives)...");
    9595                diagnostic_core_linear(&slopex,fem_sl,inputs,SlopeComputeAnalysisEnum(),SurfaceXAnalysisEnum());
    9696                diagnostic_core_linear(&slopey,fem_sl,inputs,SlopeComputeAnalysisEnum(),SurfaceYAnalysisEnum());
     
    9898                if (dim==3){
    9999               
    100                         if(debug)_printf_("%s\n","extruding slopes in 3d...");
     100                        if(verbose)_printf_("%s\n","extruding slopes in 3d...");
    101101                        FieldExtrudex( slopex, fem_sl->elements,fem_sl->nodes,fem_sl->loads,fem_sl->materials,"slopex",0);
    102102                        FieldExtrudex( slopey, fem_sl->elements,fem_sl->nodes,fem_sl->loads,fem_sl->materials,"slopex",0);
    103103                }
    104104
    105                 if(debug)_printf_("%s\n"," adding slopes in inputs...");
     105                if(verbose)_printf_("%s\n"," adding slopes in inputs...");
    106106                inputs->Add("surfaceslopex",slopex,numberofdofspernode_sl,numberofnodes);
    107107                inputs->Add("surfaceslopey",slopey,numberofdofspernode_sl,numberofnodes);
    108108                VecFree(&slopex); VecFree(&slopey);
    109109
    110                 if(debug)_printf_("%s\n"," computing hutter velocities...");
     110                if(verbose)_printf_("%s\n"," computing hutter velocities...");
    111111                diagnostic_core_linear(&ug,fem_dhu,inputs,DiagnosticAnalysisEnum(),HutterAnalysisEnum());
    112112
    113                 if(debug)_printf_("%s\n"," computing pressure according to MacAyeal...");
     113                if(verbose)_printf_("%s\n"," computing pressure according to MacAyeal...");
    114114                ComputePressurex( &pg,fem_dhu->elements,fem_dhu->nodes,fem_dhu->loads,fem_dhu->materials, numberofnodes);
    115115
    116                 if(debug)_printf_("%s\n"," update boundary conditions for macyeal pattyn using hutter results...");
     116                if(verbose)_printf_("%s\n"," update boundary conditions for macyeal pattyn using hutter results...");
    117117                if (ismacayealpattyn){
    118118                        VecFree(&fem_dh->yg->vector); VecFree(&fem_dh->ys);VecFree(&fem_dh->ys0);
     
    125125        if (ismacayealpattyn){
    126126               
    127                 if(debug)_printf_("%s\n"," computing horizontal velocities...");
     127                if(verbose)_printf_("%s\n"," computing horizontal velocities...");
    128128                diagnostic_core_nonlinear(&ug,NULL,NULL,fem_dh->loads,fem_dh,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum());
    129129
    130130                if(dim==2){
    131                         if(debug)_printf_("%s\n"," computing pressure according to MacAyeal...");
     131                        if(verbose)_printf_("%s\n"," computing pressure according to MacAyeal...");
    132132                        ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->loads,  fem_dh->materials, numberofnodes);
    133133                }
     
    138138        if (dim==3){
    139139
    140                 if(debug)_printf_("%s\n"," extruding horizontal velocities...");
     140                if(verbose)_printf_("%s\n"," extruding horizontal velocities...");
    141141                VecDuplicatePatch(&ug_horiz,ug); FieldExtrudex( ug_horiz,fem_dh->elements,fem_dh->nodes, fem_dh->loads,fem_dh->materials,"velocity",1);
    142142
    143                 if(debug)_printf_("%s\n"," computing vertical velocities...");
     143                if(verbose)_printf_("%s\n"," computing vertical velocities...");
    144144                inputs->Add("velocity",ug_horiz,numberofdofspernode_dh,numberofnodes);
    145145                diagnostic_core_linear(&ug_vert,fem_dv,inputs,DiagnosticAnalysisEnum(),VertAnalysisEnum());
    146146
    147                 if(debug)_printf_("%s\n"," combining horizontal and vertical velocities...");
     147                if(verbose)_printf_("%s\n"," combining horizontal and vertical velocities...");
    148148                VecFree(&ug); ug=NewVec(numberofnodes*3);
    149149
     
    152152                VecFree(&ug_horiz); VecFree(&ug_vert);
    153153
    154                 if(debug)_printf_("%s\n"," computing pressure according to Pattyn...");
     154                if(verbose)_printf_("%s\n"," computing pressure according to Pattyn...");
    155155                ComputePressurex( &pg,fem_dh->elements, fem_dh->nodes, fem_dh->loads,  fem_dh->materials, numberofnodes);
    156156               
     
    160160                        VecScale(pg,1.0/stokesreconditioning);
    161161
    162                         if(debug)_printf_("%s\n","computing bed slope (x and y derivatives)...");
     162                        if(verbose)_printf_("%s\n","computing bed slope (x and y derivatives)...");
    163163                        diagnostic_core_linear(&slopex,fem_sl,inputs,SlopeComputeAnalysisEnum(),BedXAnalysisEnum());
    164164                        diagnostic_core_linear(&slopey,fem_sl,inputs,SlopeComputeAnalysisEnum(),BedYAnalysisEnum());
     
    178178                        VecFree(&ug_stokes);
    179179
    180                         if(debug)_printf_("%s\n"," update boundary conditions for stokes using velocities previously computed...");
     180                        if(verbose)_printf_("%s\n"," update boundary conditions for stokes using velocities previously computed...");
    181181                        xfree((void**)&dofset);dofset=dofsetgen(3,dof012,4,numberofnodes*4); VecMerge(fem_ds->yg->vector,ug,dofset,3*numberofnodes);
    182182                        VecFree(&fem_ds->ys); VecFree(&fem_ds->ys0);
    183183                        Reducevectorgtosx(&fem_ds->ys,&fem_ds->ys0, fem_ds->yg->vector,fem_ds->nodesets);
    184184
    185                         if(debug)_printf_("%s\n"," computing stokes velocities and pressure ...");
     185                        if(verbose)_printf_("%s\n"," computing stokes velocities and pressure ...");
    186186                        VecFree(&ug);
    187187                        diagnostic_core_nonlinear(&ug,NULL,NULL,NULL,fem_ds,inputs,DiagnosticAnalysisEnum(),StokesAnalysisEnum());
  • issm/trunk/src/c/parallel/diagnostic_core_linear.cpp

    r2003 r2330  
    1515        /*parameters:*/
    1616        int kflag,pflag,connectivity,numberofdofspernode;
    17         int debug=0;
     17        int verbose=0;
    1818        char* solver_string=NULL;
    1919
     
    3333        fem->parameters->FindParam((void*)&connectivity,"connectivity");
    3434        fem->parameters->FindParam((void*)&numberofdofspernode,"numberofdofspernode");
    35         fem->parameters->FindParam((void*)&debug,"debug");
     35        fem->parameters->FindParam((void*)&verbose,"verbose");
    3636        fem->parameters->FindParam((void*)&solver_string,"solverstring");
    3737
     
    4040               
    4141        //*Generate system matrices
    42         if (debug) _printf_("   Generating matrices\n");
     42        if (verbose) _printf_("   Generating matrices\n");
    4343        SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,connectivity,numberofdofspernode,inputs,analysis_type,sub_analysis_type);
    4444
    45         if (debug) _printf_("   Generating penalty matrices\n");
     45        if (verbose) _printf_("   Generating penalty matrices\n");
    4646        //*Generate penalty system matrices
    4747        PenaltySystemMatricesx(Kgg, pg,NULL,fem->elements,fem->nodes,fem->loads,fem->materials,kflag,pflag,inputs,analysis_type,sub_analysis_type);
    4848
    4949        /*!Reduce matrix from g to f size:*/
    50         if (debug) _printf_("   reducing matrix from g to f set\n");
     50        if (verbose) _printf_("   reducing matrix from g to f set\n");
    5151        Reducematrixfromgtofx(&Kff,&Kfs,Kgg,fem->Gmn,fem->nodesets); MatFree(&Kgg);
    5252
    5353
    5454        /*!Reduce load from g to f size: */
    55         if (debug) _printf_("   reducing load from g to f set\n");
     55        if (verbose) _printf_("   reducing load from g to f set\n");
    5656        Reduceloadfromgtofx(&pf, pg, fem->Gmn, Kfs, fem->ys, fem->nodesets);VecFree(&pg); MatFree(&Kfs);
    5757
    5858        /*Solve: */
    59         if (debug) _printf_("   solving\n");
     59        if (verbose) _printf_("   solving\n");
    6060        Solverx(&uf, Kff, pf, NULL, solver_string); MatFree(&Kff); VecFree(&pf);
    6161
    6262        //Merge back to g set
    63         if (debug) _printf_("   merging solution from f to g set\n");
     63        if (verbose) _printf_("   merging solution from f to g set\n");
    6464        Mergesolutionfromftogx(&ug, uf,fem->Gmn,fem->ys,fem->nodesets);VecFree(&uf);
    6565
  • issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp

    r2006 r2330  
    3737        int kflag,pflag,connectivity,numberofdofspernode;
    3838        char* solver_string=NULL;
    39         int debug=0;
     39        int verbose=0;
    4040        int dofs[4]={1,1,0,0}; //recover vx,vy by default. vz and pressure may be.
    4141
     
    4646        fem->FindParam((void*)&numberofnodes,"numberofnodes");
    4747        fem->FindParam((void*)&solver_string,"solverstring");
    48 
     48        fem->FindParam(&verbose,"verbose");
    4949
    5050        /*Were loads requested as output? : */
     
    6868        for(;;){
    6969
    70                 if (debug) _printf_("   Updating inputs\n");
     70                if (verbose) _printf_("   Updating inputs\n");
    7171
    7272                /*Set input parameters: */
     
    8181                UpdateFromInputsx(fem->elements,fem->nodes,loads, fem->materials,inputs);
    8282
    83                 if (debug) _printf_("   Generating matrices\n");
     83                if (verbose) _printf_("   Generating matrices\n");
    8484                //*Generate system matrices
    8585                SystemMatricesx(&Kgg, &pg,fem->elements,fem->nodes,loads,fem->materials,kflag,pflag,connectivity,numberofdofspernode,inputs,analysis_type,sub_analysis_type);
    8686
    87                 if (debug) _printf_("   Generating penalty matrices\n");
     87                if (verbose) _printf_("   Generating penalty matrices\n");
    8888                //*Generate penalty system matrices
    8989                PenaltySystemMatricesx(Kgg, pg,NULL,fem->elements,fem->nodes,loads,fem->materials,kflag,pflag,inputs,analysis_type,sub_analysis_type);
    9090
    91                 if (debug) _printf_("   reducing matrix from g to f set\n");
     91                if (verbose) _printf_("   reducing matrix from g to f set\n");
    9292                /*!Reduce matrix from g to f size:*/
    9393                Reducematrixfromgtofx(&Kff,&Kfs,Kgg,fem->Gmn,fem->nodesets);
     
    9696                MatFree(&Kgg);
    9797       
    98                 if (debug) _printf_("   reducing load from g to f set\n");
     98                if (verbose) _printf_("   reducing load from g to f set\n");
    9999                /*!Reduce load from g to f size: */
    100100                Reduceloadfromgtofx(&pf, pg, fem->Gmn, Kfs, fem->ys, fem->nodesets);
     
    105105
    106106                /*Solve: */
    107                 if (debug) _printf_("   solving\n");
     107                if (verbose) _printf_("   solving\n");
    108108                Solverx(&uf, Kff, pf, old_uf, solver_string);
    109109
    110110                //Merge back to g set
    111                 if (debug) _printf_("   merging solution from f to g set\n");
     111                if (verbose) _printf_("   merging solution from f to g set\n");
    112112                Mergesolutionfromftogx(&ug, uf,fem->Gmn,fem->ys,fem->nodesets);
    113113
    114114                //Deal with penalty loads
    115                 if (debug) _printf_("   penalty constraints\n");
     115                if (verbose) _printf_("   penalty constraints\n");
    116116                if (old_ug) inputs->Add("old_velocity",old_ug,numberofdofspernode,numberofnodes);
    117117                inputs->Add("velocity",ug,numberofdofspernode,numberofnodes);
    118118                PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, fem->elements,fem->nodes,loads,fem->materials,inputs,analysis_type,sub_analysis_type);
    119119
    120                 if(debug)_printf_("   number of unstable constraints: %i\n",num_unstable_constraints);
     120                if(verbose)_printf_("   number of unstable constraints: %i\n",num_unstable_constraints);
    121121
    122122                /*Figure out if convergence is reached.*/
     
    133133                count++;
    134134                if(converged==1)break;
     135                if(count>=100){
     136                        _printf_("   maximum number of iterations exceeded\n");
     137                        break;
     138                }
    135139
    136140        }
  • issm/trunk/src/c/parallel/gradjcompute_core.cpp

    r2033 r2330  
    4747
    4848        /*flags: */
    49         int debug=0;
     49        int verbose=0;
    5050        int dim=-1;
    5151        int extrude_param=0;
     
    6161        femmodel->parameters->FindParam((void*)&control_type,"control_type");
    6262        femmodel->parameters->FindParam((void*)&extrude_param,"extrude_param");
    63         femmodel->parameters->FindParam((void*)&debug,"debug");
     63        femmodel->parameters->FindParam((void*)&verbose,"verbose");
    6464        femmodel->parameters->FindParam((void*)&dim,"dim");
    6565
  • issm/trunk/src/c/parallel/prognostic_core.cpp

    r2013 r2330  
    2727
    2828        /*flags: */
    29         int debug=0;
     29        int verbose=0;
    3030        int numberofdofspernode;
    3131        int numberofnodes;
     
    4040
    4141        //first recover parameters common to all solutions
    42         model->FindParam(&debug,"debug");
     42        model->FindParam(&verbose,"verbose");
    4343        model->FindParam(&numberofnodes,"numberofnodes");
    4444        model->FindParam(&numberofdofspernode,"numberofdofspernode");
  • issm/trunk/src/c/parallel/steadystate_core.cpp

    r2242 r2330  
    4646
    4747        /*flags: */
    48         int debug=0;
     48        int verbose=0;
    4949        int isstokes=0;
    5050        int numberofnodes;
     
    6464
    6565        //first recover parameters common to all solutions
    66         model->FindParam(&debug,"debug");debug=1;
     66        model->FindParam(&verbose,"verbose");verbose=1;
    6767        model->FindParam(&numberofnodes,"numberofnodes");
    6868        model->FindParam(&eps_rel,"eps_rel");
     
    7878        for(;;){
    7979       
    80                 if(debug)_printf_("%s%i\n","   computing temperature and velocity for step: ",step);
     80                if(verbose)_printf_("%s%i\n","   computing temperature and velocity for step: ",step);
    8181
    8282                //first compute temperature at steady state.
     
    117117                        VecNorm(dt_g,NORM_2,&normdt); VecNorm(old_t_g,NORM_2,&normt);VecFree(&dt_g);
    118118                                       
    119                         if (debug) _printf_("%-60s%g\n                                     %s%g\n                                     %s%g%s\n",
     119                        if (verbose) _printf_("%-60s%g\n                                     %s%g\n                                     %s%g%s\n",
    120120                                          "      relative convergence criterion: velocity -> norm(du)/norm(u)=   ",ndu/nu*100," temperature -> norm(dt)/norm(t)=",normdt/normt*100," eps_rel:                        ",eps_rel*100," %");
    121121               
  • issm/trunk/src/c/parallel/thermal_core.cpp

    r2008 r2330  
    3737
    3838        /*flags: */
    39         int    debug=0;
     39        int    verbose=0;
    4040        int    numberofdofspernode;
    4141        int    numberofnodes;
     
    5454        fem_t->FindParam((void*)&numberofnodes,"numberofnodes");
    5555        fem_t->FindParam((void*)&sub_analysis_type,"sub_analysis_type");
    56         fem_t->FindParam((void*)&debug,"debug");
     56        fem_t->FindParam((void*)&verbose,"verbose");
    5757        fem_t->FindParam((void*)&ndt,"ndt");
    5858        fem_t->FindParam((void*)&dt,"dt");
     
    6767                m_g=(Vec*)xmalloc(sizeof(Vec));
    6868
    69                 if(debug)_printf_("computing temperatures:\n");
     69                if(verbose)_printf_("computing temperatures:\n");
    7070                thermal_core_nonlinear(&t_g[0],&melting_offset,fem_t,inputs,ThermalAnalysisEnum(),NoneAnalysisEnum());
    7171                inputs->Add("temperature",t_g[0],1,numberofnodes);
    7272                inputs->Add("melting_offset",melting_offset);
    7373               
    74                 if(debug)_printf_("computing melting:\n");
     74                if(verbose)_printf_("computing melting:\n");
    7575                diagnostic_core_linear(&m_g[0],fem_m,inputs,MeltingAnalysisEnum(),NoneAnalysisEnum());
    7676        }
     
    9494
    9595                for(i=0;i<nsteps;i++){
    96                         if(debug)_printf_("time step: %i/%i\n",i+1,nsteps);
     96                        if(verbose)_printf_("time step: %i/%i\n",i+1,nsteps);
    9797                        time[i+1]=(i+1)*dt;
    9898                       
    99                         if(debug)_printf_("computing temperatures:\n");
     99                        if(verbose)_printf_("computing temperatures:\n");
    100100                        inputs->Add("temperature",t_g[i],1,numberofnodes);
    101101                        thermal_core_nonlinear(&t_g[i+1],&melting_offset,fem_t,inputs,ThermalAnalysisEnum(),NoneAnalysisEnum());
    102102                       
    103                         if(debug)_printf_("computing melting:\n");
     103                        if(verbose)_printf_("computing melting:\n");
    104104                        inputs->Add("temperature",t_g[i+1],1,numberofnodes);
    105105                        inputs->Add("melting_offset",melting_offset);
  • issm/trunk/src/c/parallel/thermal_core_nonlinear.cpp

    r2223 r2330  
    3838        int kflag,pflag,connectivity,numberofdofspernode;
    3939        char* solver_string=NULL;
    40         int debug=0;
     40        int verbose=0;
    4141        int lowmem=0;
    4242
     
    4848        fem->parameters->FindParam((void*)&numberofnodes,"numberofnodes");
    4949        fem->parameters->FindParam((void*)&solver_string,"solverstring");
    50         fem->parameters->FindParam((void*)&debug,"debug");
     50        fem->parameters->FindParam((void*)&verbose,"verbose");
    5151        fem->parameters->FindParam((void*)&lowmem,"lowmem");
    5252        fem->parameters->FindParam((void*)&min_thermal_constraints,"min_thermal_constraints");
     
    5757        for(;;){
    5858
    59                 if(debug)_printf_("%s\n","starting direct shooting method");
     59                if(verbose)_printf_("%s\n","starting direct shooting method");
    6060
    6161                if(count==1) inputs->Add("reset_penalties",1);
     
    9292                MatFree(&Kgg);
    9393       
    94                 if (debug) _printf_("   reducing load from g to f set\n");
     94                if (verbose) _printf_("   reducing load from g to f set\n");
    9595                /*!Reduce load from g to f size: */
    9696                Reduceloadfromgtofx(&pf, pg, fem->Gmn, Kfs, fem->ys, fem->nodesets);
     
    101101
    102102                /*Solve: */
    103                 if(debug)_printf_("%s\n","solving");
     103                if(verbose)_printf_("%s\n","solving");
    104104                VecFree(&tf);
    105105                Solverx(&tf, Kff, pf,tf_old, solver_string);
     
    109109                MatFree(&Kff);VecFree(&pf);VecFree(&tg);
    110110
    111                 if (debug) _printf_("   merging solution from f to g set\n");
     111                if (verbose) _printf_("   merging solution from f to g set\n");
    112112                //Merge back to g set
    113113                Mergesolutionfromftogx(&tg, tf,fem->Gmn,fem->ys,fem->nodesets);
    114114
    115115                //Deal with penalty loads
    116                 if (debug) _printf_("   penalty constraints\n");
     116                if (verbose) _printf_("   penalty constraints\n");
    117117                inputs->Add("temperature",tg,numberofdofspernode,numberofnodes);
    118118               
     
    120120
    121121                if (!converged){
    122                         if(debug)_printf_("%s%i\n","   #unstable constraints = ",num_unstable_constraints);
     122                        if(verbose)_printf_("%s%i\n","   #unstable constraints = ",num_unstable_constraints);
    123123                        if (num_unstable_constraints <= min_thermal_constraints)converged=1;
    124124                }
  • issm/trunk/src/c/parallel/transient_core_2d.cpp

    r2013 r2330  
    5656
    5757        /*flags: */
    58         int debug=0;
     58        int verbose=0;
    5959        int numberofnodes;
    6060
     
    7575
    7676        //first recover parameters common to all solutions
    77         model->FindParam(&debug,"debug");
     77        model->FindParam(&verbose,"verbose");
    7878        model->FindParam(&finaltime,"ndt");
    7979        model->FindParam(&dt,"dt");
  • issm/trunk/src/c/parallel/transient_core_3d.cpp

    r1881 r2330  
    6060
    6161        /*flags: */
    62         int debug=0;
     62        int verbose=0;
    6363        int numberofnodes;
    6464
     
    8181
    8282        //first recover parameters common to all solutions
    83         model->FindParam(&debug,"debug");
     83        model->FindParam(&verbose,"verbose");
    8484        model->FindParam(&finaltime,"ndt");
    8585        model->FindParam(&dt,"dt");
     
    122122        while(time<finaltime){ //make sure we run up to finaltime.
    123123       
    124                 if(debug)_printf_("%s%g%s%i%s%g\n","time [yr]: ",time,"    iteration number: ",step,"/",floor(finaltime/dt));
     124                if(verbose)_printf_("%s%g%s%i%s%g\n","time [yr]: ",time,"    iteration number: ",step,"/",floor(finaltime/dt));
    125125
    126126                step+=1;
     
    136136
    137137                //Deal with temperature first
    138                 if(debug)_printf_("%s\n","computing temperature");
     138                if(verbose)_printf_("%s\n","computing temperature");
    139139                thermal_core_nonlinear(&t_g,&melting_offset,fem_t,inputs,ThermalAnalysisEnum(),TransientAnalysisEnum());
    140                 if(debug)_printf_("%s\n","computing melting");
     140                if(verbose)_printf_("%s\n","computing melting");
    141141                inputs->Add("temperature",t_g,1,numberofnodes);
    142142                inputs->Add("melting_offset",melting_offset);
     
    144144
    145145                //Compute depth averaged temperature and add to inputs
    146                 if(debug)_printf_("%s\n","computing depth average temperature");
     146                if(verbose)_printf_("%s\n","computing depth average temperature");
    147147                VecDuplicatePatch(&t_g_average,t_g);
    148148                FieldDepthAveragex( t_g_average, fem_t->elements,fem_t->nodes, fem_t->loads, fem_t->materials,"temperature");
     
    160160
    161161                //compute new thickness
    162                 if(debug)_printf_("%s\n","computing new thickness");
     162                if(verbose)_printf_("%s\n","computing new thickness");
    163163               
    164164                inputs->Add("velocity",u_g,3,numberofnodes);
     
    170170
    171171                //update surface and bed using the new thickness
    172                 if(debug)_printf_("   updating geometry\n");
     172                if(verbose)_printf_("   updating geometry\n");
    173173                UpdateGeometryx(&h_g,&b_g,&s_g,
    174174                                fem_p->elements, fem_p->nodes,fem_p->loads, fem_p->materials,
     
    176176                VecFree(&h_g_intermediary);
    177177               
    178                 if(debug)_printf_("%s\n","updating node positions");
     178                if(verbose)_printf_("%s\n","updating node positions");
    179179                UpdateNodePositionsx( fem_dh->elements,fem_dh->nodes,fem_dh->loads,fem_dh->materials,h_g,b_g);
    180180                UpdateNodePositionsx( fem_dv->elements,fem_dv->nodes,fem_dv->loads,fem_dv->materials,h_g,b_g);
  • issm/trunk/src/m/classes/@model/model.m

    r2305 r2330  
    210210
    211211        %debugging
    212         md.debug=0;
     212        md.verbose=0;
    213213        md.element_debug=0;
    214214        md.element_debugid=NaN;
  • issm/trunk/src/m/classes/@model/setdefaultparameters.m

    r2303 r2330  
    8585%parameter used to print temporary results (convergence criterion,
    8686%current step,...)
    87 md.debug=0;
     87md.verbose=0;
    8888
    8989%Stokes mesh
  • issm/trunk/src/m/classes/public/display/displaydiagnostic.m

    r1755 r2330  
    3030
    3131disp(sprintf('\n      %s','Debugging:'));
    32 fielddisplay(md,'debug','output debug statements when possible yes-> 1, no -> 0. Default is 1');
     32fielddisplay(md,'verbose','level of output statements: none -> 0, yes->1,2. Default is 0');
    3333fielddisplay(md,'element_debug','output debug statements for elementswhen possible yes-> 1, no -> 0. Default is 0');
    3434fielddisplay(md,'element_debugid','if element_debug on, id of element for which to output messages');
  • issm/trunk/src/m/classes/public/marshall.m

    r2307 r2330  
    105105WriteData(fid,md.meanvel,'Scalar','meanvel');
    106106WriteData(fid,md.epsvel,'Scalar','epsvel');
    107 WriteData(fid,md.debug,'Integer','debug');
     107WriteData(fid,md.verbose,'Integer','verbose');
    108108WriteData(fid,md.plot,'Integer','plot');
    109109WriteData(fid,md.artificial_diffusivity,'Integer','artificial_diffusivity');
  • issm/trunk/src/m/classes/public/solve.m

    r2326 r2330  
    2828
    2929%check model consistency
    30 displaystring(md.debug,'\n%s\n','checking model consistency');
     30displaystring(md.verbose,'\n%s\n','checking model consistency');
    3131ismodelselfconsistent(md),
    3232
     
    3939        md=preqmu(md,options);
    4040end
    41 displaystring(md.debug,'\n%s\n','launching solution sequence');
     41displaystring(md.verbose,'\n%s\n','launching solution sequence');
    4242
    4343%If running in parallel, we have a different way of launching the solution
     
    7878
    7979%Check result is consistent
    80 displaystring(md.debug,'%s\n','checking result consistency');
     80displaystring(md.verbose,'%s\n','checking result consistency');
    8181if ~isresultconsistent(md,options.analysis_type),
    8282        disp('!! results not consistent correct the model !!') %it would be very cruel to put an error, it would kill the computed results (even if not consistent...)
  • issm/trunk/src/m/classes/public/solveparallel.m

    r2260 r2330  
    4040                %stop timing
    4141                t2=clock;
    42                 displaystring(md.debug,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
     42                displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
    4343
    44                 displaystring(md.debug,'loading results from cluster');
     44                displaystring(md.verbose,'loading results from cluster');
    4545                md=loadresultsfromcluster(md);
    4646        end
  • issm/trunk/src/m/solutions/cielo/ControlInitialization.m

    r1846 r2330  
    99
    1010%recover parameters common to all solutions
    11 debug=m_dhu.parameters.debug;
     11verbose=m_dhu.parameters.verbose;
    1212dim=m_dhu.parameters.dim;
    1313ishutter=m_dhu.parameters.ishutter;
     
    2424
    2525%compute slopes
    26 displaystring(debug,'\n%s',['computing bed slope (x and y derivatives)...']);
     26displaystring(verbose,'\n%s',['computing bed slope (x and y derivatives)...']);
    2727slopex=diagnostic_core_linear(m_sl,inputs,SlopeComputeAnalysisEnum(),BedXAnalysisEnum());
    2828slopey=diagnostic_core_linear(m_sl,inputs,SlopeComputeAnalysisEnum(),BedYAnalysisEnum());
     
    3737
    3838%horizontal velocities
    39 displaystring(debug,'\n%s',['computing horizontal velocities...']);
     39displaystring(verbose,'\n%s',['computing horizontal velocities...']);
    4040u_g=diagnostic_core_nonlinear(m_dh,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum());
    41 displaystring(debug,'\n%s',['extruding horizontal velocities...']);
     41displaystring(verbose,'\n%s',['extruding horizontal velocities...']);
    4242u_g_horiz=FieldExtrude(m_dh.elements,m_dh.nodes,m_dh.loads,m_dh.materials,u_g,'velocity',1);
    4343
    4444%vertical velocities
    45 displaystring(debug,'\n%s',['computing vertical velocities...']);
     45displaystring(verbose,'\n%s',['computing vertical velocities...']);
    4646inputs=add(inputs,'velocity',u_g_horiz,'doublevec',m_dh.parameters.numberofdofspernode,m_dh.parameters.numberofnodes);
    4747u_g_vert=diagnostic_core_linear(m_dv,inputs,DiagnosticAnalysisEnum(),VertAnalysisEnum());
    4848
    4949%create 3d u_g
    50 displaystring(debug,'\n%s',['combining horizontal and vertical velocities...']);
     50displaystring(verbose,'\n%s',['combining horizontal and vertical velocities...']);
    5151u_g=zeros(m_dh.parameters.numberofnodes*3,1);
    5252u_g(dofsetgen([1,2],3,m_dh.parameters.numberofnodes*3))=u_g_horiz;
     
    5454
    5555% get pressure (reconditionned) and create 4d u_g
    56 displaystring(debug,'\n%s',['computing pressure according to Pattyn...']);
     56displaystring(verbose,'\n%s',['computing pressure according to Pattyn...']);
    5757p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.loads,m_dh.materials,m_dh.parameters,inputs);
    5858p_g=p_g/m_ds.parameters.stokesreconditioning;
     
    6363
    6464%update BC (spcs)
    65 displaystring(debug,'\n%s',['update boundary conditions for stokes using velocities previously computed...']);
     65displaystring(verbose,'\n%s',['update boundary conditions for stokes using velocities previously computed...']);
    6666m_ds.y_g=zeros(m_ds.nodesets.gsize,1);
    6767m_ds.y_g(dofsetgen([1,2,3],4,m_ds.nodesets.gsize))=u_g;
     
    6969
    7070%Compute Stokes velocities once to have a reasonably good ug in input
    71 displaystring(debug,'\n%s',['computing stokes velocities and pressure ...']);
     71displaystring(verbose,'\n%s',['computing stokes velocities and pressure ...']);
    7272u_g=diagnostic_core_nonlinear(m_ds,inputs,DiagnosticAnalysisEnum(),StokesAnalysisEnum());
    7373inputs=add(inputs,'velocity',u_g,'doublevec',4,m_ds.parameters.numberofnodes);
  • issm/trunk/src/m/solutions/cielo/CreateFemModel.m

    r2316 r2330  
    88function  m=CreateFEMModel(md)
    99       
    10         displaystring(md.debug,'\n   reading data from model %s...',md.name);
     10        displaystring(md.verbose,'\n   reading data from model %s...',md.name);
    1111        [m.elements,m.nodes,m.constraints,m.loads,m.materials,parameters]=ModelProcessor(md);
    1212
    13         displaystring(md.debug,'%s','   generating degrees of freedom...');
     13        displaystring(md.verbose,'%s','   generating degrees of freedom...');
    1414        [m.nodes,m.part,m.tpart]=Dof(m.elements,m.nodes,parameters);
    1515
    16         displaystring(md.debug,'%s','   generating single point constraints...');
     16        displaystring(md.verbose,'%s','   generating single point constraints...');
    1717        [m.nodes,m.yg]=SpcNodes(m.nodes,m.constraints);
    1818
    19         displaystring(md.debug,'%s','   generating rigid body constraints...');
     19        displaystring(md.verbose,'%s','   generating rigid body constraints...');
    2020        [m.Rmg,m.nodes]=MpcNodes(m.nodes,m.constraints);
    2121
    22         displaystring(md.debug,'%s','   generating node sets...');
     22        displaystring(md.verbose,'%s','   generating node sets...');
    2323        m.nodesets=BuildNodeSets(m.nodes);
    2424
    25         displaystring(md.debug,'%s','   reducing single point constraints vector...');
     25        displaystring(md.verbose,'%s','   reducing single point constraints vector...');
    2626        [m.ys m.ys0]=Reducevectorgtos(m.yg.vector,m.nodesets);
    2727       
    28         displaystring(md.debug,'%s','   normalizing rigid body constraints matrix...');
     28        displaystring(md.verbose,'%s','   normalizing rigid body constraints matrix...');
    2929        m.Gmn = NormalizeConstraints(m.Rmg,m.nodesets);
    3030
    31         displaystring(md.debug,'%s','   configuring element and loads...');
     31        displaystring(md.verbose,'%s','   configuring element and loads...');
    3232        [m.elements,m.loads,m.nodes] = ConfigureObjects( m.elements, m.loads, m.nodes, m.materials);
    3333
    34         displaystring(md.debug,'%s','   processing parameters...');
     34        displaystring(md.verbose,'%s','   processing parameters...');
    3535        parameters= ProcessParams(parameters,m.part.vector);
    3636
    37         displaystring(md.debug,'%s','   creating parameters in matlab workspace...');
     37        displaystring(md.verbose,'%s','   creating parameters in matlab workspace...');
    3838        m.parameters= ParamsToWorkspace(parameters);
    3939
  • issm/trunk/src/m/solutions/cielo/SpawnCore.m

    r2112 r2330  
    77
    88%recover parameters
    9 debug=models.dh.parameters.debug;
     9verbose=models.dh.parameters.verbose;
    1010parameters=models.dh.parameters;
    1111responsedescriptors=models.dh.parameters.responsedescriptors;
  • issm/trunk/src/m/solutions/cielo/control_core.m

    r2227 r2330  
    1313
    1414%recover parameters common to all solutions
    15 debug=model.parameters.debug;
     15verbose=model.parameters.verbose;
    1616dim=model.parameters.dim;
    1717isstokes=model.parameters.isstokes;
     
    4747        [model.elements,model.nodes,model.loads,model.materials]=UpdateFromInputs(model.elements,model.nodes,model.loads,model.materials,inputs);
    4848
    49         displaystring(debug,'\n%s',['      computing gradJ...']);
     49        displaystring(verbose,'\n%s',['      computing gradJ...']);
    5050        results_grad=gradjcompute_core(models,inputs);
    5151        u_g=results_grad.u_g; c(n).grad_g=results_grad.grad_g;
     
    6060        end
    6161
    62         displaystring(debug,'\n%s',['      normalizing directions...']);
     62        displaystring(verbose,'\n%s',['      normalizing directions...']);
    6363        if n>=2,
    6464                c(n).grad_g=Orth(c(n).grad_g,c(n-1).grad_g);
     
    7272        end
    7373
    74         displaystring(debug,'\n%s',['      optimizing along gradient direction...']);
     74        displaystring(verbose,'\n%s',['      optimizing along gradient direction...']);
    7575        [search_scalar c(n).J]=ControlOptimization('objectivefunctionC',0,1,options,models,inputs,param_g,c(n).grad_g,n,model.parameters);
    7676
    77         displaystring(debug,'\n%s',['      updating parameter using optimized search scalar...']);
     77        displaystring(verbose,'\n%s',['      updating parameter using optimized search scalar...']);
    7878        param_g=param_g+search_scalar*model.parameters.optscal(n)*c(n).grad_g;
    7979
    80         displaystring(debug,'\n%s',['      constraining the new distribution...']);
     80        displaystring(verbose,'\n%s',['      constraining the new distribution...']);
    8181        param_g=ControlConstrain(param_g,model.parameters);
    8282
     
    9595                                        %convergence if convergence criteria fullfilled
    9696                                        convergence=1;
    97                                         displaystring(debug,'\n%s%g%s%g\n','      Convergence criterion: dJ/J = ',(c(i).J-c(n).J)/c(n).J,'<',eps_cm);
     97                                        displaystring(verbose,'\n%s%g%s%g\n','      Convergence criterion: dJ/J = ',(c(i).J-c(n).J)/c(n).J,'<',eps_cm);
    9898                                else
    99                                         displaystring(debug,'\n%s%g%s%g\n','      Convergence criterion: dJ/J = ',(c(i).J-c(n).J)/c(n).J,'>',eps_cm);
     99                                        displaystring(verbose,'\n%s%g%s%g\n','      Convergence criterion: dJ/J = ',(c(i).J-c(n).J)/c(n).J,'>',eps_cm);
    100100                                end
    101101                                break;
     
    110110
    111111%generate output
    112 displaystring(debug,'\n%s',['      preparing final velocity solution...']);
     112displaystring(verbose,'\n%s',['      preparing final velocity solution...']);
    113113
    114114%compute final velocity from diagnostic_core (horiz+vertical)
  • issm/trunk/src/m/solutions/cielo/convergence.m

    r2107 r2330  
    22
    33%Get convergence options
    4 debug=params.debug;
     4verbose=params.verbose;
    55yts=params.yts;
    66eps_res=params.eps_res;
     
    1010%initialization
    1111converged=0;
    12 displaystring(debug,' ');
     12displaystring(verbose,' ');
    1313
    1414%Display solver caracteristics
    15 if (debug>1),
     15if (verbose>1),
    1616        solver_res=norm(K_ff*u_f-p_f,2)/norm(p_f,2);
    17         displaystring(debug>1,'%s%g','      condition number of stiffness matrix: ',condest(K_ff));
    18         displaystring(debug>1,'%s%g','      solver residue: norm(KU-F)/norm(F)=',solver_res);
     17        displaystring(verbose>1,'%s%g','      condition number of stiffness matrix: ',condest(K_ff));
     18        displaystring(verbose>1,'%s%g','      solver residue: norm(KU-F)/norm(F)=',solver_res);
    1919end
    2020
     
    2525end
    2626if (res<=eps_res),
    27         displaystring(debug,'%-60s%g%s%g%s','      mechanical equilibrium convergence criterion',res*100,' < ',eps_res*100,' %');
     27        displaystring(verbose,'%-60s%g%s%g%s','      mechanical equilibrium convergence criterion',res*100,' < ',eps_res*100,' %');
    2828        converged=1;
    2929else
    30         displaystring(debug,'%-60s%g%s%g%s','      mechanical equilibrium convergence criterion',res*100,' > ',eps_res*100,' %');
     30        displaystring(verbose,'%-60s%g%s%g%s','      mechanical equilibrium convergence criterion',res*100,' > ',eps_res*100,' %');
    3131        converged=0;
    3232end
    3333
    3434%Relative criterion (optional)
    35 if ((~isnan(eps_rel)) | (debug>1)),
     35if ((~isnan(eps_rel)) | (verbose>1)),
    3636
    3737        %compute ndu/nu
     
    4646        if ~isnan(eps_rel),
    4747                if (ndu/nu<=eps_rel),
    48                         displaystring(debug,'%-60s%g%s%g%s','      relative convergence criterion: norm(du)/norm(u)',ndu/nu*100,' < ',eps_rel*100,' %');
     48                        displaystring(verbose,'%-60s%g%s%g%s','      relative convergence criterion: norm(du)/norm(u)',ndu/nu*100,' < ',eps_rel*100,' %');
    4949                else
    50                         displaystring(debug,'%-60s%g%s%g%s','      relative convergence criterion: norm(du)/norm(u)',ndu/nu*100,' > ',eps_rel*100,' %');
     50                        displaystring(verbose,'%-60s%g%s%g%s','      relative convergence criterion: norm(du)/norm(u)',ndu/nu*100,' > ',eps_rel*100,' %');
    5151                        converged=0;
    5252                end
    5353        else
    54                 displaystring(debug,'%-60s%g%s','      relative convergence criterion: norm(du)/norm(u)',ndu/nu*100,' %');
     54                displaystring(verbose,'%-60s%g%s','      relative convergence criterion: norm(du)/norm(u)',ndu/nu*100,' %');
    5555        end
    5656
     
    5858
    5959%Absolute criterion (optional)
    60 if ((~isnan(eps_abs)) | (debug>1)),
     60if ((~isnan(eps_abs)) | (verbose>1)),
    6161
    6262        %compute max(du)
     
    7070        if ~isnan(eps_abs),
    7171                if (nduinf<=eps_abs),
    72                         displaystring(debug,'%-60s%g%s%g%s','      absolute convergence criterion: max(du)',nduinf,' < ',eps_abs,' m/yr');
     72                        displaystring(verbose,'%-60s%g%s%g%s','      absolute convergence criterion: max(du)',nduinf,' < ',eps_abs,' m/yr');
    7373                else
    74                         displaystring(debug,'%-60s%g%s%g%s','      absolute convergence criterion: max(du)',nduinf,' > ',eps_abs,' m/yr');
     74                        displaystring(verbose,'%-60s%g%s%g%s','      absolute convergence criterion: max(du)',nduinf,' > ',eps_abs,' m/yr');
    7575                        converged=0;
    7676                end
    7777        else
    78                 displaystring(debug,'%-60s%g%s','      absolute convergence criterion: max(du)',nduinf,' m/yr');
     78                displaystring(verbose,'%-60s%g%s','      absolute convergence criterion: max(du)',nduinf,' m/yr');
    7979        end
    8080
  • issm/trunk/src/m/solutions/cielo/diagnostic.m

    r2268 r2330  
    1212        models.analysis_type=DiagnosticAnalysisEnum; %needed for processresults
    1313       
    14         displaystring(md.debug,'%s',['reading diagnostic horiz model data']);
     14        displaystring(md.verbose,'%s',['reading diagnostic horiz model data']);
    1515        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=HorizAnalysisEnum; models.dh=CreateFemModel(md);
    1616       
    17         displaystring(md.debug,'\n%s',['reading diagnostic vert model data']);
     17        displaystring(md.verbose,'\n%s',['reading diagnostic vert model data']);
    1818        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=VertAnalysisEnum; models.dv=CreateFemModel(md);
    1919       
    20         displaystring(md.debug,'\n%s',['reading diagnostic stokes model data']);
     20        displaystring(md.verbose,'\n%s',['reading diagnostic stokes model data']);
    2121        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=StokesAnalysisEnum; models.ds=CreateFemModel(md);
    2222       
    23         displaystring(md.debug,'\n%s',['reading diagnostic hutter model data']);
     23        displaystring(md.verbose,'\n%s',['reading diagnostic hutter model data']);
    2424        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=HutterAnalysisEnum; models.dhu=CreateFemModel(md);
    2525       
    26         displaystring(md.debug,'\n%s',['reading surface and bed slope computation model data']);
     26        displaystring(md.verbose,'\n%s',['reading surface and bed slope computation model data']);
    2727        md.analysis_type=SlopeComputeAnalysisEnum; md.sub_analysis_type=NoneAnalysisEnum; models.sl=CreateFemModel(md);
    2828       
     
    6262        %stop timing
    6363        t2=clock;
    64         displaystring(md.debug,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
     64        displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
  • issm/trunk/src/m/solutions/cielo/diagnostic_core.m

    r2027 r2330  
    1414
    1515%recover parameters common to all solutions
    16 debug=m_dhu.parameters.debug;
     16verbose=m_dhu.parameters.verbose;
    1717dim=m_dh.parameters.dim;
    1818ishutter=m_dhu.parameters.ishutter;
     
    2323if ishutter,
    2424
    25         displaystring(debug,'\n%s',['computing surface slope (x and y derivatives)...']);
     25        displaystring(verbose,'\n%s',['computing surface slope (x and y derivatives)...']);
    2626        slopex=diagnostic_core_linear(m_sl,inputs,SlopeComputeAnalysisEnum(),SurfaceXAnalysisEnum());
    2727        slopey=diagnostic_core_linear(m_sl,inputs,SlopeComputeAnalysisEnum(),SurfaceYAnalysisEnum());
    2828
    2929        if dim==3,
    30                 displaystring(debug,'\n%s',['extruding slopes in 3d...']);
     30                displaystring(verbose,'\n%s',['extruding slopes in 3d...']);
    3131                slopex=FieldExtrude(m_sl.elements,m_sl.nodes,m_sl.loads,m_sl.materials,slopex,'slopex',0);
    3232                slopey=FieldExtrude(m_sl.elements,m_sl.nodes,m_sl.loads,m_sl.materials,slopey,'slopey',0);
    3333        end
    3434
    35         displaystring(debug,'\n%s',['computing slopes...']);
     35        displaystring(verbose,'\n%s',['computing slopes...']);
    3636        inputs=add(inputs,'surfaceslopex',slopex,'doublevec',m_sl.parameters.numberofdofspernode,m_sl.parameters.numberofnodes);
    3737        inputs=add(inputs,'surfaceslopey',slopey,'doublevec',m_sl.parameters.numberofdofspernode,m_sl.parameters.numberofnodes);
    3838
    39         displaystring(debug,'\n%s',['computing hutter velocities...']);
     39        displaystring(verbose,'\n%s',['computing hutter velocities...']);
    4040        u_g=diagnostic_core_linear(m_dhu,inputs,DiagnosticAnalysisEnum(),HutterAnalysisEnum());
    4141
    42         displaystring(debug,'\n%s',['computing pressure according to MacAyeal...']);
     42        displaystring(verbose,'\n%s',['computing pressure according to MacAyeal...']);
    4343        p_g=ComputePressure(m_dhu.elements,m_dhu.nodes,m_dhu.loads,m_dhu.materials,m_dhu.parameters,inputs);
    4444
    45         displaystring(debug,'\n%s',['update boundary conditions for macyeal pattyn using hutter results...']);
     45        displaystring(verbose,'\n%s',['update boundary conditions for macyeal pattyn using hutter results...']);
    4646        if ismacayealpattyn,
    4747                m_dh.y_g=u_g;
     
    5353if ismacayealpattyn,
    5454
    55         displaystring(debug,'\n%s',['computing horizontal velocities...']);
     55        displaystring(verbose,'\n%s',['computing horizontal velocities...']);
    5656        [u_g m_dh.loads]=diagnostic_core_nonlinear(m_dh,inputs,DiagnosticAnalysisEnum(),HorizAnalysisEnum());
    5757
    58         displaystring(debug,'\n%s',['computing pressure according to MacAyeal...']);
     58        displaystring(verbose,'\n%s',['computing pressure according to MacAyeal...']);
    5959        p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.loads,m_dh.materials,m_dh.parameters,inputs);
    6060end
     
    6262if dim==3,
    6363
    64         displaystring(debug,'\n%s',['extruding horizontal velocities...']);
     64        displaystring(verbose,'\n%s',['extruding horizontal velocities...']);
    6565        u_g_horiz=FieldExtrude(m_dh.elements,m_dh.nodes,m_dh.loads,m_dh.materials,u_g,'velocity',1);
    6666
    67         displaystring(debug,'\n%s',['computing vertical velocities...']);
     67        displaystring(verbose,'\n%s',['computing vertical velocities...']);
    6868        inputs=add(inputs,'velocity',u_g_horiz,'doublevec',m_dh.parameters.numberofdofspernode,m_dh.parameters.numberofnodes);
    6969        u_g_vert=diagnostic_core_linear(m_dv,inputs,DiagnosticAnalysisEnum(),VertAnalysisEnum());
    7070
    71         displaystring(debug,'\n%s',['combining horizontal and vertical velocities...']);
     71        displaystring(verbose,'\n%s',['combining horizontal and vertical velocities...']);
    7272        u_g=zeros(m_dh.parameters.numberofnodes*3,1);
    7373        u_g(dofsetgen([1,2],3,m_dh.parameters.numberofnodes*3))=u_g_horiz;
    7474        u_g(dofsetgen([3],3,m_dh.parameters.numberofnodes*3))=u_g_vert;
    7575
    76         displaystring(debug,'\n%s',['computing pressure according to Pattyn...']);
     76        displaystring(verbose,'\n%s',['computing pressure according to Pattyn...']);
    7777        p_g=ComputePressure(m_dh.elements,m_dh.nodes,m_dh.loads,m_dh.materials,m_dh.parameters,inputs);
    7878       
     
    8282                p_g=p_g/m_ds.parameters.stokesreconditioning;
    8383
    84                 displaystring(debug,'\n%s',['computing bed slope (x and y derivatives)...']);
     84                displaystring(verbose,'\n%s',['computing bed slope (x and y derivatives)...']);
    8585                slopex=diagnostic_core_linear(m_sl,inputs,SlopeComputeAnalysisEnum(),BedXAnalysisEnum());
    8686                slopey=diagnostic_core_linear(m_sl,inputs,SlopeComputeAnalysisEnum(),BedYAnalysisEnum());
     
    9898                inputs=add(inputs,'velocity',u_g_stokes,'doublevec',4,m_ds.parameters.numberofnodes);
    9999
    100                 displaystring(debug,'\n%s',['update boundary conditions for stokes using velocities previously computed...']);
     100                displaystring(verbose,'\n%s',['update boundary conditions for stokes using velocities previously computed...']);
    101101                m_ds.y_g=zeros(m_ds.nodesets.gsize,1);
    102102                m_ds.y_g(dofsetgen([1,2,3],4,m_ds.nodesets.gsize))=u_g;
    103103                [m_ds.ys m_ds.ys0]=Reducevectorgtos(m_ds.y_g,m_ds.nodesets);
    104104
    105                 displaystring(debug,'\n%s',['computing stokes velocities and pressure ...']);
     105                displaystring(verbose,'\n%s',['computing stokes velocities and pressure ...']);
    106106                u_g=diagnostic_core_nonlinear(m_ds,inputs,DiagnosticAnalysisEnum(),StokesAnalysisEnum());
    107107       
  • issm/trunk/src/m/solutions/cielo/diagnostic_core_linear.m

    r1128 r2330  
    1717        %Reduce tangent matrix from g size to f size
    1818        [K_ff, K_fs] = Reducematrixfromgtof( K_gg, m.Gmn, m.nodesets);
    19         displaystring(m.parameters.debug>1,'%s%g','      condition number of stiffness matrix: ',condest(K_ff));
     19        displaystring(m.parameters.verbose>1,'%s%g','      condition number of stiffness matrix: ',condest(K_ff));
    2020       
    2121        %Reduce load from g size to f size
  • issm/trunk/src/m/solutions/cielo/diagnostic_core_nonlinear.m

    r1805 r2330  
    1616        inputs=add(inputs,'converged',converged,'double');
    1717
    18         displaystring(m.parameters.debug,'\n%s',['   starting direct shooting method']);
     18        displaystring(m.parameters.verbose,'\n%s',['   starting direct shooting method']);
    1919        while(~converged),
    2020               
     
    5757                [loads,constraints_converged,num_unstable_constraints] =PenaltyConstraints( m.elements,m.nodes, loads, m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    5858       
    59                 displaystring(m.parameters.debug,'%s%i','      number of unstable constraints: ',num_unstable_constraints);
     59                displaystring(m.parameters.verbose,'%s%i','      number of unstable constraints: ',num_unstable_constraints);
    6060
    6161                %Figure out if convergence have been reached
  • issm/trunk/src/m/solutions/cielo/gradjcompute_core.m

    r2027 r2330  
    55
    66%recover parameters
    7 debug=m.parameters.debug;
     7verbose=m.parameters.verbose;
    88dim=m.parameters.dim;
    99extrude_param=m.parameters.extrude_param;
     
    1515
    1616%Recover solution for this stiffness and right hand side:
    17 displaystring(debug,'%s','         computing velocities...');
     17displaystring(verbose,'%s','         computing velocities...');
    1818[u_g K_ff0 K_fs0 ]=diagnostic_core_nonlinear(m,inputs,analysis_type,sub_analysis_type);
    1919inputs=add(inputs,'velocity',u_g,'doublevec',m.parameters.numberofdofspernode,m.parameters.numberofnodes);
     
    2121
    2222%Buid Du, difference between observed velocity and model velocity.
    23 displaystring(debug,'%s','          computing Du...');
     23displaystring(verbose,'%s','          computing Du...');
    2424[Du_g]=Du(m.elements,m.nodes,m.loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    2525
     
    2828
    2929%Solve for adjoint vector:
    30 displaystring(debug,'%s','          computing adjoint state...');
     30displaystring(verbose,'%s','          computing adjoint state...');
    3131lambda_f=Solver(K_ff0,Du_f,[],m.parameters);
    3232
     
    3838grad_g=Gradj(m.elements,m.nodes,m.loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    3939if (dim==3 & extrude_param),
    40         displaystring(debug,'%s','          extruding gradient...');
     40        displaystring(verbose,'%s','          extruding gradient...');
    4141        grad_g=FieldExtrude(m.elements,m.nodes,m.loads,m.materials,grad_g,'gradj',0);
    4242end
     
    4444if m.parameters.control_steady,
    4545        %compute initial velocity from diagnostic_core (horiz+vertical)
    46         displaystring(debug,'%s','          compute 3d initial velocity...');
     46        displaystring(verbose,'%s','          compute 3d initial velocity...');
    4747        results_diag=diagnostic_core(models,inputs);
    4848        u_g=results_diag.u_g;
  • issm/trunk/src/m/solutions/cielo/prognostic.m

    r1720 r2330  
    1111        models.analysis_type=PrognosticAnalysisEnum; %needed for processresults
    1212       
    13         displaystring(md.debug,'%s',['reading prognostic model data']);
     13        displaystring(md.verbose,'%s',['reading prognostic model data']);
    1414        md.analysis_type=PrognosticAnalysisEnum; models.p=CreateFemModel(md);
    1515
     
    1818
    1919        %initialize inputs
    20         displaystring(md.debug,'\n%s',['setup inputs...']);
     20        displaystring(md.verbose,'\n%s',['setup inputs...']);
    2121        inputs=inputlist;
    2222        inputs=add(inputs,'velocity',models.p.parameters.u_g,'doublevec',3,models.p.parameters.numberofnodes);
     
    2626        inputs=add(inputs,'dt',models.p.parameters.dt*models.p.parameters.yts,'double');
    2727
    28         displaystring(md.debug,'\n%s',['call computational core:']);
     28        displaystring(md.verbose,'\n%s',['call computational core:']);
    2929        results=prognostic_core(models,inputs,PrognosticAnalysisEnum(),NoneAnalysisEnum());
    3030
    31         displaystring(md.debug,'\n%s',['load results...']);
     31        displaystring(md.verbose,'\n%s',['load results...']);
    3232        if ~isstruct(md.results), md.results=struct(); end
    3333        md.results.prognostic=processresults(models, results);
     
    3535        %stop timing
    3636        t2=clock;
    37         displaystring(md.debug,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);   
     37        displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
  • issm/trunk/src/m/solutions/cielo/prognostic_core.m

    r968 r2330  
    1010        results.step=1;
    1111
    12         displaystring(m.parameters.debug,'\n%s',['depth averaging velocity...']);
     12        displaystring(m.parameters.verbose,'\n%s',['depth averaging velocity...']);
    1313        %Take only the first two dofs of m.parameters.u_g
    1414        u_g=get(inputs,'velocity',[1 1 0 0]);
     
    1616        inputs=add(inputs,'velocity_average',u_g,'doublevec',2,m.parameters.numberofnodes);
    1717
    18         displaystring(m.parameters.debug,'\n%s',['call computational core:']);
     18        displaystring(m.parameters.verbose,'\n%s',['call computational core:']);
    1919        results.h_g=diagnostic_core_linear(m,inputs,analysis_type,sub_analysis_type);
    2020
    21         displaystring(m.parameters.debug,'\n%s',['extrude computed thickness on all layers:']);
     21        displaystring(m.parameters.verbose,'\n%s',['extrude computed thickness on all layers:']);
    2222        results.h_g=FieldExtrude(m.elements,m.nodes,m.loads,m.materials,results.h_g,'thickness',0);
    2323
  • issm/trunk/src/m/solutions/cielo/steadystate.m

    r2268 r2330  
    1212       
    1313        %Build all models requested for diagnostic simulation
    14         displaystring(md.debug,'%s',['reading diagnostic horiz model data']);
     14        displaystring(md.verbose,'%s',['reading diagnostic horiz model data']);
    1515        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=HorizAnalysisEnum; models.dh=CreateFemModel(md);
    1616       
    17         displaystring(md.debug,'\n%s',['reading diagnostic vert model data']);
     17        displaystring(md.verbose,'\n%s',['reading diagnostic vert model data']);
    1818        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=VertAnalysisEnum; models.dv=CreateFemModel(md);
    1919       
    20         displaystring(md.debug,'\n%s',['reading diagnostic stokes model data']);
     20        displaystring(md.verbose,'\n%s',['reading diagnostic stokes model data']);
    2121        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=StokesAnalysisEnum; models.ds=CreateFemModel(md);
    2222       
    23         displaystring(md.debug,'\n%s',['reading diagnostic hutter model data']);
     23        displaystring(md.verbose,'\n%s',['reading diagnostic hutter model data']);
    2424        md.analysis_type=DiagnosticAnalysisEnum; md.sub_analysis_type=HutterAnalysisEnum; models.dhu=CreateFemModel(md);
    2525       
    26         displaystring(md.debug,'\n%s',['reading surface and bed slope computation model data']);
     26        displaystring(md.verbose,'\n%s',['reading surface and bed slope computation model data']);
    2727        md.analysis_type=SlopeComputeAnalysisEnum; md.sub_analysis_type=NoneAnalysisEnum; models.sl=CreateFemModel(md);
    2828
    2929        %Build all models requested for thermal simulation
    30         displaystring(md.debug,'%s',['reading thermal model data']);
     30        displaystring(md.verbose,'%s',['reading thermal model data']);
    3131        md.analysis_type=ThermalAnalysisEnum(); md.sub_analysis_type=NoneAnalysisEnum(); models.t=CreateFemModel(md);
    3232
    33         displaystring(md.debug,'%s',['reading melting model data']);
     33        displaystring(md.verbose,'%s',['reading melting model data']);
    3434        md.analysis_type=MeltingAnalysisEnum(); md.sub_analysis_type=NoneAnalysisEnum(); models.m=CreateFemModel(md);
    3535
     
    3838
    3939        %initialize inputs
    40         displaystring(md.debug,'\n%s',['setup inputs...']);
     40        displaystring(md.verbose,'\n%s',['setup inputs...']);
    4141        inputs=inputlist;
    4242        inputs=add(inputs,'velocity',models.dh.parameters.u_g,'doublevec',3,models.dh.parameters.numberofnodes);
     
    7575        %stop timing
    7676        t2=clock;
    77         displaystring(md.debug,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
     77        displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
  • issm/trunk/src/m/solutions/cielo/steadystate_core.m

    r1872 r2330  
    1616
    1717%recover parameters common to all solutions
    18 debug=m_dhu.parameters.debug;
     18verbose=m_dhu.parameters.verbose;
    1919dim=m_dhu.parameters.dim;
    2020eps_rel=m_dhu.parameters.eps_rel;
     
    3636while(~converged),
    3737       
    38         displaystring(debug,'%s%i','computing temperature and velocity for step ',step);
     38        displaystring(verbose,'%s%i','computing temperature and velocity for step ',step);
    3939       
    4040        %first compute temperature at steady state.
     
    6565        t_g_old=results_thermal.t_g;
    6666       
    67         displaystring(debug,'%-60s%g\n                                     %s%g\n                                     %s%g%s',...
     67        displaystring(verbose,'%-60s%g\n                                     %s%g\n                                     %s%g%s',...
    6868                      '      relative convergence criterion: velocity -> norm(du)/norm(u)=   ',ndu/nu*100,' temperature -> norm(dt)/norm(t)=',ndt/nt*100,' eps_rel:                        ',eps_rel*100,' %');
    6969        if (ndu/nu<=eps_rel)  & (ndt/nt<=eps_rel),
  • issm/trunk/src/m/solutions/cielo/thermal.m

    r1849 r2330  
    1111
    1212        %Build all models requested for diagnostic simulation
    13         displaystring(md.debug,'%s',['reading thermal model data']);
     13        displaystring(md.verbose,'%s',['reading thermal model data']);
    1414        md.analysis_type=ThermalAnalysisEnum(); models.t=CreateFemModel(md);
    1515
    16         displaystring(md.debug,'%s',['reading melting model data']);
     16        displaystring(md.verbose,'%s',['reading melting model data']);
    1717        md.analysis_type=MeltingAnalysisEnum(); models.m=CreateFemModel(md);
    1818
     
    2121
    2222        %initialize inputs
    23         displaystring(md.debug,'\n%s',['setup inputs...']);
     23        displaystring(md.verbose,'\n%s',['setup inputs...']);
    2424        inputs=inputlist;
    2525        inputs=add(inputs,'velocity',models.t.parameters.u_g,'doublevec',3,models.t.parameters.numberofnodes);
     
    4242        %stop timing
    4343        t2=clock;
    44         displaystring(md.debug,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);   
     44        displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
  • issm/trunk/src/m/solutions/cielo/thermal_core.m

    r1901 r2330  
    1414        results.step=1;
    1515
    16         displaystring(m_t.parameters.debug,'\n%s',['computing temperatures...']);
     16        displaystring(m_t.parameters.verbose,'\n%s',['computing temperatures...']);
    1717        [results.t_g m_t.loads melting_offset]=thermal_core_nonlinear(m_t,inputs,ThermalAnalysisEnum(),NoneAnalysisEnum());
    1818
    19         displaystring(m_t.parameters.debug,'\n%s',['computing melting...']);
     19        displaystring(m_t.parameters.verbose,'\n%s',['computing melting...']);
    2020        inputs=add(inputs,'melting_offset',melting_offset,'double');
    2121        inputs=add(inputs,'temperature',results.t_g,'doublevec',1,m_t.parameters.numberofnodes);
     
    3737        for n=1:nsteps,
    3838
    39                 displaystring(m_t.parameters.debug,'\n%s%i/%i\n','time step: ',n,nsteps);
     39                displaystring(m_t.parameters.verbose,'\n%s%i/%i\n','time step: ',n,nsteps);
    4040                results(n+1).step=n+1;
    4141                results(n+1).time=n*m_t.parameters.dt;
    4242
    43                 displaystring(m_t.parameters.debug,'\n%s',['    computing temperatures...']);
     43                displaystring(m_t.parameters.verbose,'\n%s',['    computing temperatures...']);
    4444                inputs=add(inputs,'temperature',results(n).t_g,'doublevec',1,m_t.parameters.numberofnodes);
    4545                [results(n+1).t_g m_t.loads melting_offset]=thermal_core_nonlinear(m_t,inputs,ThermalAnalysisEnum(),NoneAnalysisEnum());
    4646
    47                 displaystring(m_t.parameters.debug,'\n%s',['    computing melting...']);
     47                displaystring(m_t.parameters.verbose,'\n%s',['    computing melting...']);
    4848                inputs=add(inputs,'temperature',results(n+1).t_g,'doublevec',1,m_t.parameters.numberofnodes);
    4949                inputs=add(inputs,'melting_offset',melting_offset,'double');
  • issm/trunk/src/m/solutions/cielo/thermal_core_nonlinear.m

    r731 r2330  
    1818        m.parameters.kflag=1; m.parameters.pflag=1;
    1919
    20         displaystring(m.parameters.debug,'\n%s',['   starting direct shooting method']);
     20        displaystring(m.parameters.verbose,'\n%s',['   starting direct shooting method']);
    2121       
    2222        while(~converged),
     
    2828                if ~m.parameters.lowmem
    2929                        if count==1
    30                                 displaystring(m.parameters.debug,'%s',['   system matrices']);
     30                                displaystring(m.parameters.verbose,'%s',['   system matrices']);
    3131                                [K_gg_nopenalty, p_g_nopenalty]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    3232                        end
    33                         displaystring(m.parameters.debug,'%s',['   penalty system matrices']);
     33                        displaystring(m.parameters.verbose,'%s',['   penalty system matrices']);
    3434                        [K_gg , p_g, melting_offset]=PenaltySystemMatrices(K_gg_nopenalty,p_g_nopenalty,m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    3535                else
    36                         displaystring(m.parameters.debug,'%s',['   system matrices']);
     36                        displaystring(m.parameters.verbose,'%s',['   system matrices']);
    3737                        [K_gg , p_g]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    38                         displaystring(m.parameters.debug,'%s',['   penalty system matrices']);
     38                        displaystring(m.parameters.verbose,'%s',['   penalty system matrices']);
    3939                        [K_gg , p_g, melting_offset]=PenaltySystemMatrices(K_gg,p_g,m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    4040                end
     
    4747
    4848                %Solve 
    49                 displaystring(m.parameters.debug,'%s%g','   condition number of stiffness matrix: ',condest(K_ff));
     49                displaystring(m.parameters.verbose,'%s%g','   condition number of stiffness matrix: ',condest(K_ff));
    5050                [t_f]=Solver(K_ff,p_f,[],m.parameters);
    5151
    5252                %Merge back to g set
    53                 displaystring(m.parameters.debug,'%s',['   merging solution back to g set']);
     53                displaystring(m.parameters.verbose,'%s',['   merging solution back to g set']);
    5454                [t_g]= Mergesolutionfromftog( t_f, m.Gmn, m.ys, m.nodesets );
    5555
    5656                %Update inputs in datasets
    5757                inputs=add(inputs,'temperature',t_g,'doublevec',m.parameters.numberofdofspernode,m.parameters.numberofnodes);
    58                 displaystring(m.parameters.debug,'%s',['   update inputs']);
     58                displaystring(m.parameters.verbose,'%s',['   update inputs']);
    5959                [m.elements,m.nodes, loads,m.materials]=UpdateFromInputs(m.elements,m.nodes, loads,m.materials,inputs);
    6060       
    6161                %penalty constraints
    62                 displaystring(m.parameters.debug,'%s',['   penalty constraints']);
     62                displaystring(m.parameters.verbose,'%s',['   penalty constraints']);
    6363                [loads,constraints_converged,num_unstable_constraints] =PenaltyConstraints( m.elements,m.nodes, loads, m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    6464       
    6565                if ~converged,
    66                         displaystring(m.parameters.debug,'%s%i','   #unstable constraints ',num_unstable_constraints);
     66                        displaystring(m.parameters.verbose,'%s%i','   #unstable constraints ',num_unstable_constraints);
    6767                       
    6868                        if num_unstable_constraints<=m.parameters.min_thermal_constraints,
  • issm/trunk/src/m/solutions/cielo/transient2d.m

    r1720 r2330  
    1010models.analysis_type='transient'; %needed for processresults
    1111
    12 displaystring(md.debug,'%s',['reading diagnostic horiz model data']);
     12displaystring(md.verbose,'%s',['reading diagnostic horiz model data']);
    1313md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=HorizAnalysisEnum(); models.dh=CreateFemModel(md);
    1414
    15 displaystring(md.debug,'\n%s',['reading diagnostic vert model data']);
     15displaystring(md.verbose,'\n%s',['reading diagnostic vert model data']);
    1616md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=VertAnalysisEnum(); models.dv=CreateFemModel(md);
    1717
    18 displaystring(md.debug,'\n%s',['reading diagnostic stokes model data']);
     18displaystring(md.verbose,'\n%s',['reading diagnostic stokes model data']);
    1919md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=StokesAnalysisEnum(); models.ds=CreateFemModel(md);
    2020
    21 displaystring(md.debug,'\n%s',['reading diagnostic hutter model data']);
     21displaystring(md.verbose,'\n%s',['reading diagnostic hutter model data']);
    2222md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=HutterAnalysisEnum(); models.dhu=CreateFemModel(md);
    2323
    24 displaystring(md.debug,'\n%s',['reading surface and bed slope computation model data']);
     24displaystring(md.verbose,'\n%s',['reading surface and bed slope computation model data']);
    2525md.analysis_type=SlopeComputeAnalysisEnum(); md.sub_analysis_type=NoneAnalysisEnum(); models.sl=CreateFemModel(md);
    2626
    27 displaystring(md.debug,'%s',['reading prognostic model data']);
     27displaystring(md.verbose,'%s',['reading prognostic model data']);
    2828md.analysis_type=PrognosticAnalysisEnum(); models.p=CreateFemModel(md);
    2929
     
    3939
    4040%initialize inputs
    41 displaystring(md.debug,'\n%s',['setup inputs...']);
     41displaystring(md.verbose,'\n%s',['setup inputs...']);
    4242inputs=inputlist;
    4343inputs=add(inputs,'velocity',solution.u_g,'doublevec',2,models.p.parameters.numberofnodes);
  • issm/trunk/src/m/solutions/cielo/transient3d.m

    r1720 r2330  
    1010models.analysis_type=TransientAnalysisEnum(); %needed for processresults
    1111
    12 displaystring(md.debug,'%s',['reading diagnostic horiz model data']);
     12displaystring(md.verbose,'%s',['reading diagnostic horiz model data']);
    1313md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=HorizAnalysisEnum(); models.dh=CreateFemModel(md);
    1414
    15 displaystring(md.debug,'\n%s',['reading diagnostic vert model data']);
     15displaystring(md.verbose,'\n%s',['reading diagnostic vert model data']);
    1616md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=VertAnalysisEnum(); models.dv=CreateFemModel(md);
    1717
    18 displaystring(md.debug,'\n%s',['reading diagnostic stokes model data']);
     18displaystring(md.verbose,'\n%s',['reading diagnostic stokes model data']);
    1919md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=StokesAnalysisEnum(); models.ds=CreateFemModel(md);
    2020
    21 displaystring(md.debug,'\n%s',['reading diagnostic hutter model data']);
     21displaystring(md.verbose,'\n%s',['reading diagnostic hutter model data']);
    2222md.analysis_type=DiagnosticAnalysisEnum(); md.sub_analysis_type=HutterAnalysisEnum(); models.dhu=CreateFemModel(md);
    2323
    24 displaystring(md.debug,'\n%s',['reading surface and bed slope computation model data']);
     24displaystring(md.verbose,'\n%s',['reading surface and bed slope computation model data']);
    2525md.analysis_type=SlopeComputeAnalysisEnum(); md.sub_analysis_type=NoneAnalysisEnum(); models.sl=CreateFemModel(md);
    2626
    27 displaystring(md.debug,'%s',['reading prognostic model data']);
     27displaystring(md.verbose,'%s',['reading prognostic model data']);
    2828md.analysis_type=PrognosticAnalysisEnum(); models.p=CreateFemModel(md);
    2929
    3030%Build all models related to thermal
    31 displaystring(md.debug,'%s',['reading thermal model data']);
     31displaystring(md.verbose,'%s',['reading thermal model data']);
    3232md.analysis_type=ThermalAnalysisEnum(); models.t=CreateFemModel(md);
    3333
    34 displaystring(md.debug,'%s',['reading melting model data']);
     34displaystring(md.verbose,'%s',['reading melting model data']);
    3535md.analysis_type=MeltingAnalysisEnum(); models.m=CreateFemModel(md);
    3636
     
    5151
    5252%initialize inputs
    53 displaystring(md.debug,'\n%s',['setup inputs...']);
     53displaystring(md.verbose,'\n%s',['setup inputs...']);
    5454inputs=inputlist;
    5555inputs=add(inputs,'velocity',results.u_g,'doublevec',3,models.p.parameters.numberofnodes);
     
    7070while  time<finaltime+dt, %make sure we run up to finaltime.
    7171
    72         displaystring(md.debug,'\n%s%g%s%g%s%g\n','time [yr]: ',time,'    iteration number: ',n,'/',floor(finaltime/dt));
     72        displaystring(md.verbose,'\n%s%g%s%g%s%g\n','time [yr]: ',time,'    iteration number: ',n,'/',floor(finaltime/dt));
    7373
    7474        results(n+1).step=n+1;
     
    8484
    8585        %Deal with temperature first
    86         displaystring(md.debug,'\n%s',['    computing temperatures...']);
     86        displaystring(md.verbose,'\n%s',['    computing temperatures...']);
    8787        [results(n+1).t_g models.t.loads melting_offset]=thermal_core_nonlinear(models.t,inputs,ThermalAnalysisEnum(),TransientAnalysisEnum());
    8888        inputs=add(inputs,'temperature',results(n+1).t_g,'doublevec',1,models.t.parameters.numberofnodes);
    8989       
    90         displaystring(md.debug,'\n%s',['    computing melting...']);
     90        displaystring(md.verbose,'\n%s',['    computing melting...']);
    9191        inputs=add(inputs,'melting_offset',melting_offset,'double');
    9292        results(n+1).m_g=diagnostic_core_linear(models.m,inputs,MeltingAnalysisEnum(),TransientAnalysisEnum());
     
    101101
    102102        %compute new thickness
    103         displaystring(md.debug,'\n%s',['    computing new thickness...']);
     103        displaystring(md.verbose,'\n%s',['    computing new thickness...']);
    104104        inputs=add(inputs,'velocity',results(n+1).u_g,'doublevec',3,models.p.parameters.numberofnodes);
    105105        rawresults=prognostic_core(models,inputs,PrognosticAnalysisEnum(),NoneAnalysisEnum());
     
    107107
    108108        %update surface and bed using the new thickness
    109         displaystring(md.debug,'\n%s',['    updating geometry...']);
     109        displaystring(md.verbose,'\n%s',['    updating geometry...']);
    110110        [new_thickness,new_bed,new_surface]=UpdateGeometry(models.p.elements,models.p.nodes,models.p.loads,models.p.materials,models.p.parameters,new_thickness,results(n).b_g,results(n).s_g);
    111111
     
    116116
    117117        %figure out if time stepping is good
    118         %displaystring(md.debug,'   checking time stepping...'));
     118        %displaystring(md.verbose,'   checking time stepping...'));
    119119        %[back,dt,time]=TimeStepping(md,results,dt,time);
    120120        %if back,
     
    123123
    124124        %update node positions
    125         displaystring(md.debug,'\n%s',['    updating node positions...']);
     125        displaystring(md.verbose,'\n%s',['    updating node positions...']);
    126126        models.dh.nodes=UpdateNodePositions(models.dh.elements,models.dh.nodes,models.dh.loads,models.dh.materials,new_bed,new_thickness);
    127127        models.dv.nodes=UpdateNodePositions(models.dv.elements,models.dv.nodes,models.dv.loads,models.dv.materials,new_bed,new_thickness);
  • issm/trunk/src/m/solutions/dakota/preqmu.m

    r2206 r2330  
    2020global ISSM_DIR;
    2121
    22 displaystring(md.debug,'\n%s\n','preprocessing dakota inputs');
     22displaystring(md.verbose,'\n%s\n','preprocessing dakota inputs');
    2323
    2424%first create temporary directory in which we will work
  • issm/trunk/src/m/utils/BC/SetIceSheetBC.m

    r2281 r2330  
    3737end
    3838
    39 displaystring(md.debug,'%s',['      boundary conditions for prognostic model initialization']);
     39displaystring(md.verbose,'%s',['      boundary conditions for prognostic model initialization']);
    4040md.spcthickness=zeros(md.numberofgrids,2);
    4141
    4242if (length(md.observed_temperature)==md.numberofgrids),
    43         displaystring(md.debug,'%s',['      boundary conditions for thermal model']);
     43        displaystring(md.verbose,'%s',['      boundary conditions for thermal model']);
    4444        md.spctemperature=[md.gridonsurface md.observed_temperature]; %impose observed temperature on surface
    4545        if (length(md.geothermalflux)~=md.numberofgrids),
  • issm/trunk/src/m/utils/BC/SetIceShelfBC.m

    r2281 r2330  
    5555end
    5656
    57 displaystring(md.debug,'%s',['      boundary conditions for prognostic model initialization']);
     57displaystring(md.verbose,'%s',['      boundary conditions for prognostic model initialization']);
    5858md.spcthickness=zeros(md.numberofgrids,2);
    5959
    6060if (length(md.observed_temperature)==md.numberofgrids),
    61         displaystring(md.debug,'%s',['      boundary conditions for thermal model']);
     61        displaystring(md.verbose,'%s',['      boundary conditions for thermal model']);
    6262        md.spctemperature=[md.gridonsurface md.observed_temperature]; %impose observed temperature on surface
    6363        if (length(md.geothermalflux)~=md.numberofgrids),
  • issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m

    r2281 r2330  
    6767end
    6868
    69 displaystring(md.debug,'%s',['      boundary conditions for prognostic model initialization']);
     69displaystring(md.verbose,'%s',['      boundary conditions for prognostic model initialization']);
    7070md.spcthickness=zeros(md.numberofgrids,2);
    7171
    7272if (length(md.observed_temperature)==md.numberofgrids),
    73         displaystring(md.debug,'%s',['      boundary conditions for thermal model']);
     73        displaystring(md.verbose,'%s',['      boundary conditions for thermal model']);
    7474        md.spctemperature=[md.gridonsurface md.observed_temperature]; %impose observed temperature on surface
    7575        if (length(md.geothermalflux)~=md.numberofgrids),
  • issm/trunk/src/m/utils/String/displaystring.m

    r330 r2330  
    1 function displaystring(debug,format,varargin)
     1function displaystring(flag,format,varargin)
    22%DISPLAY -  display string in solution sequences. wrapper to disp and sprintf. 
    33%
    44%   Usage:
    5 %      displaystring(debug,format,string)
    6 %      debug can be used to switch display on and off
     5%      displaystring(flag,format,string)
     6%      flag can be used to switch display on and off
    77%
    88%   Example:
    99%      display(1,'%s\n','string to display');
    1010       
    11 if debug,
     11if flag,
    1212        disp(sprintf(format,varargin{:}));
    1313end
Note: See TracChangeset for help on using the changeset viewer.