source: issm/oecreview/Archive/24307-24683/ISSM-24655-24656.diff@ 24684

Last change on this file since 24684 was 24684, checked in by Mathieu Morlighem, 5 years ago

CHG: added new review

File size: 3.2 KB
  • ../trunk-jpl/src/c/cores/smb_core.cpp

     
    6868                femmodel->parameters->SetParam(subdt,TimesteppingTimeStepEnum);
    6969
    7070                femmodel->InitTransientInputx(&transientinput[0],numaveragedinput);
     71                analysis = new SmbAnalysis();
    7172                while(substep<dtslices){ //loop on sub dts
    7273                        substep+=1;
    7374                        subtime+=subdt;
     
    7475                        femmodel->parameters->SetParam(subtime,TimeEnum);
    7576         if(VerboseSolution()) _printf0_("sub iteration " << substep << "/" << dtslices << "  time [yr]: " << setprecision(4) << subtime/yts << " (time step: " << subdt/yts << ")\n");
    7677         if(VerboseSolution()) _printf0_("   computing smb\n");
    77          analysis = new SmbAnalysis();
    7878                        if(VerboseSolution()) _printf0_("   Calling core\n");
    7979                        analysis->Core(femmodel);
    8080         /*If we have a sub-timestep we store the substep inputs in a transient input here*/
    8181         femmodel->StackTransientInputx(&substepinput[0],&transientinput[0],subtime,numaveragedinput);
    82                         delete analysis;
    8382                }
     83                delete analysis;
    8484      /*averaging the transient input*/
    8585                femmodel->AverageTransientInputx(&transientinput[0],&averagedinput[0],global_time-dt,subtime,numaveragedinput);
    8686                /*and reset timesteping variables to original*/
  • ../trunk-jpl/src/c/classes/FemModel.cpp

     
    52595259                                IssmDouble* values=xNew<IssmDouble>(numvertices);
    52605260                                int        *vertexlids = xNew<int>(numvertices);
    52615261                                element->GetInputListOnVertices(&values[0],input_enum[i]);   //this is the enum to stack
     5262
    52625263                                element->GetVerticesLidList(vertexlids);
    52635264
    52645265                                switch(element->ObjectEnum()){
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    21592159                        }
    21602160                        if(offset == numtimesteps-1){
    21612161                                dt = end_time - timesteps[offset];
     2162                                _assert_(dt>0.);
    21622163                        }
    21632164                        else{
    2164                                 dt = timesteps[offset+1] - timesteps[offset]; _assert_(dt>0.);
     2165                                dt = timesteps[offset+1] - timesteps[offset];
     2166                                _assert_(dt>0.);
    21652167                        }
    21662168                }
    21672169
  • ../trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp

     
    137137/*Intermediary*/
    138138void TransientInput2::AddTriaTimeInput(IssmDouble time,int numindices,int* indices,IssmDouble* values_in,int interp_in){/*{{{*/
    139139
     140
    140141        /*Check whether this is the last time step that we have*/
    141142        if(this->numtimesteps){
    142                 if(this->timesteps[this->numtimesteps-1]>time-1.e-5 && this->timesteps[this->numtimesteps-1]<time+1.e-5){
     143                if(abs(this->timesteps[this->numtimesteps-1]-time)<1.0e-5){
    143144                        this->AddTriaTimeInput(this->numtimesteps-1,numindices,indices,values_in,interp_in);
    144145                        return;
    145146                }
Note: See TracBrowser for help on using the repository browser.