Changeset 24064


Ignore:
Timestamp:
07/04/19 02:12:40 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: do not grow channels on boundary

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Loads/Channel.cpp

    r24057 r24064  
    5454        int e1 = iomodel->faces[4*index+2];
    5555        int e2 = iomodel->faces[4*index+3];
     56
     57        if(e2==-1){
     58                this->boundary = true;
     59        }
     60        else{
     61                this->boundary = false;
     62        }
    5663
    5764        /*Set Element hook (4th column may be -1 for boundary edges)*/
     
    545552                if(Ngrad<1.e-12) Ngrad = 1.e-12;
    546553
    547                 /*Compute the effective conductivity Kc = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/
    548                 IssmDouble Kc = kc * pow(this->S,ALPHA_C) * pow(Ngrad,BETA_C-2.);
    549                 IssmDouble Ks = ks * pow(h      ,ALPHA_S) * pow(Ngrad,BETA_S-2.);
     554                /*Compute the effective conductivity Ks = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/
     555                IssmDouble Ks = ks * pow(h,ALPHA_S) * pow(Ngrad,BETA_S-2.);
    550556
    551557                /*Approx. discharge in the sheet flowing folwing in the direction of the channel ofver a width lc*/
     
    585591        /*Initialize Element matrix and return if necessary*/
    586592        Tria*  tria=(Tria*)element;
    587         if(!tria->IsIceInElement()){
     593        if(!tria->IsIceInElement() || this->boundary){
    588594                this->S = 0.;
    589595                return;
     
    674680
    675681        /*Solve ODE*/
    676         this->S = ODE1(alpha,beta,this->S,dt,0);
     682        this->S = ODE1(alpha,beta,this->S,dt,2);
     683
     684        /*Make sure Area > 0*/
     685        if(this->S<0.) this->S = 0.;
    677686
    678687        /*Clean up and return*/
  • issm/trunk-jpl/src/c/classes/Loads/Channel.h

    r24054 r24064  
    2020        private:
    2121                IssmDouble S;
     22                bool       boundary;
    2223
    2324        public:
Note: See TracChangeset for help on using the changeset viewer.