source: issm/oecreview/Archive/25834-26739/ISSM-26465-26466.diff

Last change on this file was 26740, checked in by Mathieu Morlighem, 3 years ago

CHG: added 25834-26739

File size: 2.7 KB
  • ../trunk-jpl/src/c/classes/Loads/Friction.cpp

     
    1818Friction::Friction(){/*{{{*/
    1919        this->element=NULL;
    2020        this->law=0;
    21         this->apply_dim = 1;
     21        this->apply_dim = 1.;
    2222        this->domaintype=-1;
    2323        this->vx_input=NULL;
    2424        this->vy_input=NULL;
     
    3737        /* Load VxBase and VyBase for this special case */
    3838        switch(this->domaintype){
    3939                case Domain2DhorizontalEnum:
    40                         this->apply_dim = 2;
     40                        this->apply_dim = 2.;
    4141                        this->vx_input = element_in->GetInput(VxBaseEnum);                      _assert_(this->vx_input);
    4242                        this->vy_input = element_in->GetInput(VyBaseEnum);                      _assert_(this->vy_input);
    4343                        this->vz_input = NULL;
    4444                        break;
    4545      case Domain2DverticalEnum:
    46                         this->apply_dim = 2;
     46                        this->apply_dim = 2.;
    4747                        this->vx_input = element_in->GetInput(VxEnum);                          _assert_(this->vx_input);
    4848                        this->vy_input = element_in->GetInput(VyEnum);                          _assert_(this->vy_input);
    4949                        this->vz_input = NULL;
    5050                        break;
    5151      case Domain3DEnum:           
    52                         this->apply_dim = 3;
     52                        this->apply_dim = 3.;
    5353                        this->vx_input = element_in->GetInput(VxEnum);                          _assert_(this->vx_input);
    5454                        this->vy_input = element_in->GetInput(VyEnum);                          _assert_(this->vy_input);
    5555                        this->vz_input = element_in->GetInput(VzEnum);                          _assert_(this->vz_input);
     
    5858        }
    5959}
    6060/*}}}*/
    61 Friction::Friction(Element* element_in, double dim){/*{{{*/
     61Friction::Friction(Element* element_in,IssmDouble dim){/*{{{*/
    6262
    6363        this->element=element_in;
    6464        this->apply_dim = dim;
     
    918918        this->vx_input->GetInputValue(&vx, gauss);
    919919        this->vy_input->GetInputValue(&vy, gauss);
    920920
    921         if ((this->vz_input == NULL) || (this->apply_dim<3)) vz = 0.0;
     921        if ((this->vz_input == NULL) || (this->apply_dim<3.)) vz = 0.0;
    922922        else this->vz_input->GetInputValue(&vz, gauss);
    923923       
    924         if (this->apply_dim<2) vy = 0.0;
     924        if (this->apply_dim<2.) vy = 0.0;
    925925
    926926        vmag = sqrt(vx*vx+vy*vy+vz*vz);
    927927        return vmag;
  • ../trunk-jpl/src/c/classes/Loads/Friction.h

     
    1313class Friction{
    1414
    1515        public:
    16                 Element* element;
    17                 int      law;
    18                 int      domaintype;
    19                 double  apply_dim;
    20                 Inputvx_input;
    21                 Inputvy_input;
    22                 Inputvz_input;
     16                Element    *element;
     17                int         law;
     18                int         domaintype;
     19                IssmDouble  apply_dim;
     20                Input      *vx_input;
     21                Input      *vy_input;
     22                Input      *vz_input;
    2323
    2424                /*methods: */
    2525                Friction();
Note: See TracBrowser for help on using the repository browser.