Changeset 27020


Ignore:
Timestamp:
05/24/22 02:33:47 (3 years ago)
Author:
Cheng Gong
Message:

CHG: speedfactor to TranientParam in calvingTest

Location:
issm/trunk-jpl/src
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp

    r27019 r27020  
    171171
    172172        int  calvinglaw;
     173   IssmDouble *transparam = NULL;
     174   IssmDouble  yts;
     175   int         N,M;
     176   bool        interp,cycle;
     177
    173178        iomodel->FindConstant(&calvinglaw,"md.calving.law");
    174179        switch(calvinglaw){
     
    192197                        break;
    193198                case CalvingTestEnum:
    194                         parameters->AddObject(iomodel->CopyConstantObject("md.calving.speedfactor",CalvingTestSpeedfactorEnum));
     199                        iomodel->FetchData(&transparam,&N,&M,"md.calving.speedfactor");
     200                        iomodel->FindConstant(&interp,"md.timestepping.interp_forcing");
     201                        iomodel->FindConstant(&cycle,"md.timestepping.cycle_forcing");
     202                        if(N==1){
     203                                _assert_(M==1);
     204                                parameters->AddObject(new DoubleParam(CalvingTestSpeedfactorEnum,transparam[0]));
     205         }
     206         else{
     207            _assert_(N==2);
     208            parameters->AddObject(new TransientParam(CalvingTestSpeedfactorEnum,&transparam[0],&transparam[M],interp,cycle,M));
     209         }
     210                        xDelete<IssmDouble>(transparam);
    195211                        break;
    196212                case CalvingParameterizationEnum:
     
    209225        int melt_parameterization;
    210226        iomodel->FindConstant(&melt_parameterization,"md.frontalforcings.parameterization");
    211         int M,N;
    212         IssmDouble* transparam = NULL;
    213227        switch(melt_parameterization){
    214228                case FrontalForcingsDefaultEnum:
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r26983 r27020  
    35563556                                                                                                          case CalvingParameterizationEnum:
    35573557                                                                                                                  this->CalvingRateParameterization();
     3558                                                                                                                  break;
     3559                                                                                                          case CalvingTestEnum:
     3560                                                                                                                  this->CalvingRateTest();
    35583561                                                                                                                  break;
    35593562                                                                                                          default:
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r27009 r27020  
    373373        IssmDouble  calvingrate[NUMVERTICES];
    374374        IssmDouble  vx,vy;
     375        IssmDouble  time;
     376        IssmDouble  coeff;
    375377
    376378        /*Retrieve all inputs and parameters we will need*/
    377         IssmDouble coeff = parameters->FindParam(CalvingTestSpeedfactorEnum);
     379        parameters->FindParam(&time,TimeEnum);
     380        parameters->FindParam(&coeff,CalvingTestSpeedfactorEnum,time);
     381
    378382        Input* vx_input = this->GetInput(VxEnum); _assert_(vx_input);
    379383        Input* vy_input = this->GetInput(VyEnum); _assert_(vy_input);
Note: See TracChangeset for help on using the changeset viewer.