Changeset 26875


Ignore:
Timestamp:
02/10/22 11:03:42 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: simplifying calving rate

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r26830 r26875  
    29492949                        break;
    29502950                case CalvingMinthicknessEnum:
    2951                         lsf_slopex_input  = this->GetInput(LevelsetfunctionSlopeXEnum); _assert_(lsf_slopex_input);
    2952                         if(dim==2) lsf_slopey_input  = this->GetInput(LevelsetfunctionSlopeYEnum); _assert_(lsf_slopey_input);
    2953                         meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
    2954                         break;
    29552951                case CalvingHabEnum:
    2956                         lsf_slopex_input  = this->GetInput(LevelsetfunctionSlopeXEnum); _assert_(lsf_slopex_input);
    2957                         if(dim==2) lsf_slopey_input  = this->GetInput(LevelsetfunctionSlopeYEnum); _assert_(lsf_slopey_input);
    2958                         meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
    2959                         break;
    29602952                case CalvingCrevasseDepthEnum:
    29612953                        lsf_slopex_input  = this->GetInput(LevelsetfunctionSlopeXEnum); _assert_(lsf_slopex_input);
     
    30203012
    30213013                        case CalvingMinthicknessEnum:
    3022                                 lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
    3023                                 if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);
    3024                                 meltingrate_input->GetInputValue(&meltingrate,&gauss);
    3025 
    3026                                 norm_dlsf=0.;
    3027                                 for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2);
    3028                                 norm_dlsf=sqrt(norm_dlsf);
    3029 
    3030                                 if(norm_dlsf>1.e-10)
    3031                                  for(i=0;i<dim;i++){
    3032                                          c[i]=0.;
    3033                                          m[i]=meltingrate*dlsf[i]/norm_dlsf;
    3034                                  }
    3035                                 else
    3036                                  for(i=0;i<dim;i++){
    3037                                          c[i]=0.;
    3038                                          m[i]=0.;
    3039                                  }
    3040                                 break;
    3041 
    30423014                        case CalvingHabEnum:
    3043                                 lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
    3044                                 if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);
    3045                                 meltingrate_input->GetInputValue(&meltingrate,&gauss);
    3046 
    3047                                 norm_dlsf=0.;
    3048                                 for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2);
    3049                                 norm_dlsf=sqrt(norm_dlsf);
    3050 
    3051                                 if(norm_dlsf>1.e-10)
    3052                                  for(i=0;i<dim;i++){
    3053                                          c[i]=0.;
    3054                                          m[i]=meltingrate*dlsf[i]/norm_dlsf;
    3055                                  }
    3056                                 else
    3057                                  for(i=0;i<dim;i++){
    3058                                          c[i]=0.;
    3059                                          m[i]=0.;
    3060                                  }
    3061                                 break;
    3062 
    30633015                        case CalvingCrevasseDepthEnum:
    30643016                                lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
    30653017                                if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);
    30663018                                meltingrate_input->GetInputValue(&meltingrate,&gauss);
    3067 
    30683019                                if(groundedice<0) meltingrate = 0.;
    30693020
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r26850 r26875  
    43804380                        break;
    43814381                case CalvingMinthicknessEnum:
    4382                         lsf_slopex_input  = this->GetInput(LevelsetfunctionSlopeXEnum); _assert_(lsf_slopex_input);
    4383                         if(dim==2) lsf_slopey_input  = this->GetInput(LevelsetfunctionSlopeYEnum); _assert_(lsf_slopey_input);
    4384                         meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
    4385                         break;
    43864382                case CalvingHabEnum:
    4387                         lsf_slopex_input  = this->GetInput(LevelsetfunctionSlopeXEnum); _assert_(lsf_slopex_input);
    4388                         if(dim==2) lsf_slopey_input  = this->GetInput(LevelsetfunctionSlopeYEnum); _assert_(lsf_slopey_input);
    4389                         meltingrate_input = this->GetInput(CalvingMeltingrateEnum);     _assert_(meltingrate_input);
    4390                         break;
    43914383                case CalvingCrevasseDepthEnum:
    43924384                        lsf_slopex_input  = this->GetInput(LevelsetfunctionSlopeXEnum); _assert_(lsf_slopex_input);
     
    44604452
    44614453                        case CalvingMinthicknessEnum:
    4462                                 lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
    4463                                 if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);
    4464                                 meltingrate_input->GetInputValue(&meltingrate,&gauss);
    4465 
    4466                                 norm_dlsf=0.;
    4467                                 for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2);
    4468                                 norm_dlsf=sqrt(norm_dlsf);
    4469 
    4470                                 if(norm_dlsf>1.e-10)
    4471                                  for(i=0;i<dim;i++){
    4472                                          c[i]=0.;
    4473                                          m[i]=meltingrate*dlsf[i]/norm_dlsf;
    4474                                  }
    4475                                 else
    4476                                  for(i=0;i<dim;i++){
    4477                                          c[i]=0.;
    4478                                          m[i]=0.;
    4479                                  }
    4480                                 break;
    4481 
    44824454                        case CalvingHabEnum:
    4483                                 lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
    4484                                 if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);
    4485                                 meltingrate_input->GetInputValue(&meltingrate,&gauss);
    4486 
    4487                                 norm_dlsf=0.;
    4488                                 for(i=0;i<dim;i++) norm_dlsf+=pow(dlsf[i],2);
    4489                                 norm_dlsf=sqrt(norm_dlsf);
    4490 
    4491                                 if(norm_dlsf>1.e-10)
    4492                                  for(i=0;i<dim;i++){
    4493                                          c[i]=0.;
    4494                                          m[i]=meltingrate*dlsf[i]/norm_dlsf;
    4495                                  }
    4496                                 else
    4497                                  for(i=0;i<dim;i++){
    4498                                          c[i]=0.;
    4499                                          m[i]=0.;
    4500                                  }
    4501                                 break;
    4502 
    45034455                        case CalvingCrevasseDepthEnum:
    45044456                                lsf_slopex_input->GetInputValue(&dlsf[0],&gauss);
    45054457                                if(dim==2) lsf_slopey_input->GetInputValue(&dlsf[1],&gauss);
    45064458                                meltingrate_input->GetInputValue(&meltingrate,&gauss);
    4507 
    4508                                 if(groundedice<0) meltingrate = 0.;
    45094459
    45104460                                norm_dlsf=0.;
Note: See TracChangeset for help on using the changeset viewer.