Changeset 24069


Ignore:
Timestamp:
07/05/19 06:52:21 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: closer to Elmer's implementation of GlaDS

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

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

    r24063 r24069  
    44#include "../shared/shared.h"
    55#include "../modules/modules.h"
     6
     7#define AEPS 2.22e-15
    68
    79/*Model processing*/
     
    256258                /*Get norm of gradient of hydraulic potential and make sure it is >0*/
    257259                IssmDouble normgradphi = sqrt(dphi[0]*dphi[0] + dphi[1]*dphi[1]);
    258                 if(normgradphi < 1.e-12) normgradphi = 1.e-12;
     260                if(normgradphi < AEPS) normgradphi = AEPS;
    259261
    260262                IssmDouble coeff = k*pow(h,alpha)*pow(normgradphi,beta-2.);
     
    501503
    502504                /*Make sure it is positive*/
    503                 if(h_new[iv]<1.e-12) h_new[iv] = 1.e-12;
     505                if(h_new[iv]<AEPS) h_new[iv] = AEPS;
    504506        }
    505507
  • issm/trunk-jpl/src/c/classes/Loads/Channel.cpp

    r24064 r24069  
    2525#define ALPHA_S     5./4.
    2626#define BETA_S      3./2.
     27#define AEPS 2.22e-15
    2728
    2829/*Channel constructors and destructor*/
     
    423424                dphimds = rho_water*g*(db[0]*tx + db[1]*ty);
    424425                Ngrad   = fabs(dphids);
    425                 if(Ngrad<1.e-12) Ngrad = 1.e-12;
     426                if(Ngrad<AEPS) Ngrad = AEPS;
    426427
    427428                /*Compute the effective conductivity Kc = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/
     
    550551                dphimds = rho_water*g*(db[0]*tx + db[1]*ty);
    551552                Ngrad   = fabs(dphids);
    552                 if(Ngrad<1.e-12) Ngrad = 1.e-12;
     553                if(Ngrad<AEPS) Ngrad = AEPS;
    553554
    554555                /*Compute the effective conductivity Ks = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/
     
    652653        dphimds = rho_water*g*(db[0]*tx + db[1]*ty);
    653654        Ngrad   = fabs(dphids);
    654         if(Ngrad<1.e-12) Ngrad = 1.e-12;
     655        if(Ngrad<AEPS) Ngrad = AEPS;
    655656
    656657        /*d(phi - phi_m)/ds*/
  • issm/trunk-jpl/src/c/classes/Loads/Moulin.cpp

    r24053 r24069  
    230230/*}}}*/
    231231bool  Moulin::IsPenalty(void){/*{{{*/
    232         return true;
     232        return false;
    233233}
    234234/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.