Changeset 22166


Ignore:
Timestamp:
10/11/17 09:40:30 (7 years ago)
Author:
Eric.Larour
Message:

CHG:diverse bug fixes

Location:
issm/branches/trunk-larour-NatGeoScience2016/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-NatGeoScience2016/src/c/analyses/SealevelriseAnalysis.cpp

    r22163 r22166  
    6262                        element->InputUpdateFromConstant(0.0,SealevelNEsaRateEnum);
    6363                        element->InputUpdateFromConstant(0.0,SealevelUEsaRateEnum);
    64                         element->InputUpdateFromConstant(0.0,SealevelRSLEustaticRateEnum);
    6564                        counter++;
    6665                }
  • issm/branches/trunk-larour-NatGeoScience2016/src/c/cores/sealevelrise_core.cpp

    r22163 r22166  
    6464        Vector<IssmDouble> *RSLg_rate    = NULL;
    6565        Vector<IssmDouble> *RSLg_eustatic  = NULL;
    66         Vector<IssmDouble> *RSLg_eustatic_rate  = NULL;
    6766        Vector<IssmDouble> *U_esa  = NULL;
    6867        Vector<IssmDouble> *U_esa_rate  = NULL;
     
    163162                U_gia_rate=U_gia->Duplicate(); U_gia->Copy(U_gia_rate); U_gia_rate->Scale(1/(dt*frequency));
    164163                RSLg_rate=RSLg->Duplicate(); RSLg->Copy(RSLg_rate); RSLg_rate->Scale(1/(dt*frequency));
    165                 RSLg_eustatic_rate=RSLg_eustatic->Duplicate(); RSLg_eustatic->Copy(RSLg_eustatic_rate); RSLg_eustatic_rate->Scale(1/(dt*frequency));
    166164               
    167165                /*get some results into elements:{{{*/
     
    184182                        InputUpdateFromVectorx(femmodel,N_gia_rate,SealevelNGiaRateEnum,VertexSIdEnum);
    185183                        InputUpdateFromVectorx(femmodel,RSLg_rate,SealevelRSLRateEnum,VertexSIdEnum);
    186                         InputUpdateFromVectorx(femmodel,RSLg_eustatic_rate,SealevelRSLEustaticRateEnum,VertexSIdEnum);
    187184                } /*}}}*/
    188185        }
     
    207204        delete RSLg_rate;
    208205        delete RSLg_eustatic;
    209         delete RSLg_eustatic_rate;
    210206        delete U_esa;
    211207        delete U_esa_rate;
     
    340336         * presence of ice (terms 1 and 4 in Eq.4 of Farrel and Clarke):*/
    341337        RSLgi->Shift(-eustatic-RSLgi_oceanaverage);
     338       
     339        /*save eustatic value for results: */
     340        femmodel->results->AddResult(new GenericExternalResult<IssmDouble>(femmodel->results->Size()+1,SealevelRSLEustaticEnum,-eustatic));
     341
    342342
    343343        /*clean up and return:*/
     
    861861        if(!xIsNan<IssmDouble>(eps_rel)){
    862862                if((ndS/nS)<eps_rel){
    863                         if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)/norm(S)" << ndS/nS*100 << " < " << eps_rel*100 << " %");
     863                        if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)/norm(S)" << ndS/nS*100 << " < " << eps_rel*100 << " %\n");
    864864                }
    865865                else{
    866                         if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)/norm(S)" << ndS/nS*100 << " > " << eps_rel*100 << " %");
     866                        if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)/norm(S)" << ndS/nS*100 << " > " << eps_rel*100 << " %\n");
    867867                        converged=false;
    868868                }
     
    870870        if(!xIsNan<IssmDouble>(eps_abs)){
    871871                if(ndS<eps_abs){
    872                         if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)" << ndS << " < " << eps_abs << " ");
     872                        if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)" << ndS << " < " << eps_abs << " \n");
    873873                }
    874874                else{
    875                         if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)" << ndS << " > " << eps_abs << " ");
     875                        if(VerboseConvergence()) _printf0_(setw(50) << left << "              convergence criterion: norm(dS)" << ndS << " > " << eps_abs << " \n");
    876876                        converged=false;
    877877                }
Note: See TracChangeset for help on using the changeset viewer.