Changeset 27932


Ignore:
Timestamp:
10/01/23 19:11:35 (18 months ago)
Author:
Mathieu Morlighem
Message:

CHG: using new headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/cores/controlm1qn3_core.cpp

    r27767 r27932  
    106106
    107107        if(VerboseControl())_printf0_("   Computing initial solution\n");
    108         _printf0_("\n");
    109         _printf0_("Cost function f(x)   | Gradient norm |g(x)| |  List of contributions\n");
    110         _printf0_("____________________________________________________________________\n");
     108        InversionStatsHeader(num_cost_functions);
    111109
    112110        /*Prepare structure for m1qn3*/
     
    133131
    134132        /*Print exit flag*/
     133        InversionStatsFooter(num_cost_functions);
    135134        switch(int(omode)){
    136135                case 0:  _printf0_("   Stop requested (indic = 0)\n"); break;
     
    265264        femmodel->CostFunctionx(&J,&Jtemp,NULL);
    266265        *pf = reCast<double>(J);
    267         _printf0_("f(x) = "<<setw(12)<<setprecision(7)<<*pf<<"  |  ");
    268266
    269267        /*Record cost function values and delete Jtemp*/
     
    274272        if(*indic==0){
    275273                /*dry run, no gradient required*/
    276 
    277                 /*Retrieve objective functions independently*/
    278                 _printf0_("            N/A |\n");
    279                 for(int i=0;i<num_responses;i++) _printf0_(" "<<setw(12)<<setprecision(7)<<Jlist[(*Jlisti)*JlistN+i]);
    280                 _printf0_("\n");
     274                InversionStatsIter( (*Jlisti)+1, *pf, NAN, &Jlist[(*Jlisti)*JlistN], num_responses);
    281275
    282276                *Jlisti = (*Jlisti) +1;
     
    313307
    314308        /*Print info*/
    315         _printf0_("       "<<setw(12)<<setprecision(7)<<Gnorm<<" |");
    316         for(int i=0;i<num_responses;i++) _printf0_(" "<<setw(12)<<setprecision(7)<<Jlist[(*Jlisti)*JlistN+i]);
    317         _printf0_("\n");
     309        InversionStatsIter( (*Jlisti)+1, *pf, Gnorm, &Jlist[(*Jlisti)*JlistN], num_responses);
    318310
    319311        /*Clean-up and return*/
Note: See TracChangeset for help on using the changeset viewer.