source:
issm/oecreview/Archive/24307-24683/ISSM-24655-24656.diff@
24684
Last change on this file since 24684 was 24684, checked in by , 5 years ago | |
---|---|
File size: 3.2 KB |
-
../trunk-jpl/src/c/cores/smb_core.cpp
68 68 femmodel->parameters->SetParam(subdt,TimesteppingTimeStepEnum); 69 69 70 70 femmodel->InitTransientInputx(&transientinput[0],numaveragedinput); 71 analysis = new SmbAnalysis(); 71 72 while(substep<dtslices){ //loop on sub dts 72 73 substep+=1; 73 74 subtime+=subdt; … … 74 75 femmodel->parameters->SetParam(subtime,TimeEnum); 75 76 if(VerboseSolution()) _printf0_("sub iteration " << substep << "/" << dtslices << " time [yr]: " << setprecision(4) << subtime/yts << " (time step: " << subdt/yts << ")\n"); 76 77 if(VerboseSolution()) _printf0_(" computing smb\n"); 77 analysis = new SmbAnalysis();78 78 if(VerboseSolution()) _printf0_(" Calling core\n"); 79 79 analysis->Core(femmodel); 80 80 /*If we have a sub-timestep we store the substep inputs in a transient input here*/ 81 81 femmodel->StackTransientInputx(&substepinput[0],&transientinput[0],subtime,numaveragedinput); 82 delete analysis;83 82 } 83 delete analysis; 84 84 /*averaging the transient input*/ 85 85 femmodel->AverageTransientInputx(&transientinput[0],&averagedinput[0],global_time-dt,subtime,numaveragedinput); 86 86 /*and reset timesteping variables to original*/ -
../trunk-jpl/src/c/classes/FemModel.cpp
5259 5259 IssmDouble* values=xNew<IssmDouble>(numvertices); 5260 5260 int *vertexlids = xNew<int>(numvertices); 5261 5261 element->GetInputListOnVertices(&values[0],input_enum[i]); //this is the enum to stack 5262 5262 5263 element->GetVerticesLidList(vertexlids); 5263 5264 5264 5265 switch(element->ObjectEnum()){ -
../trunk-jpl/src/c/classes/Elements/Tria.cpp
2159 2159 } 2160 2160 if(offset == numtimesteps-1){ 2161 2161 dt = end_time - timesteps[offset]; 2162 _assert_(dt>0.); 2162 2163 } 2163 2164 else{ 2164 dt = timesteps[offset+1] - timesteps[offset]; _assert_(dt>0.); 2165 dt = timesteps[offset+1] - timesteps[offset]; 2166 _assert_(dt>0.); 2165 2167 } 2166 2168 } 2167 2169 -
../trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp
137 137 /*Intermediary*/ 138 138 void TransientInput2::AddTriaTimeInput(IssmDouble time,int numindices,int* indices,IssmDouble* values_in,int interp_in){/*{{{*/ 139 139 140 140 141 /*Check whether this is the last time step that we have*/ 141 142 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){ 143 144 this->AddTriaTimeInput(this->numtimesteps-1,numindices,indices,values_in,interp_in); 144 145 return; 145 146 }
Note:
See TracBrowser
for help on using the repository browser.