Changeset 26585


Ignore:
Timestamp:
11/10/21 09:19:42 (3 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixing a division by 0 in CoDiPack

File:
1 edited

Legend:

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

    r26470 r26585  
    198198
    199199        /*Check to prevent dividing by zero if vmag==0*/
    200         if(vmag==0. && (s-1.)<0.) alpha_complement=0.;
     200        if(vmag==0. && (s-1.)<=0.) alpha_complement=0.;
    201201        else alpha_complement=pow(Neff,r)*pow(vmag,(s-1));
    202202
     
    345345
    346346        /*Check to prevent dividing by zero if vmag==0*/
    347         if(vmag==0. && (s-1.)<0.){
     347        if(vmag==0. && (s-1.)<=0.){
    348348                alpha2=0.;
    349349        }
     
    541541
    542542        /*Check to prevent dividing by zero if vmag==0*/
    543         if(vmag==0. && (s-1.)<0.) alpha2=0.;
     543        if(vmag==0. && (s-1.)<=0.) alpha2=0.;
    544544        else alpha2=drag_coefficient*drag_coefficient*pow(Neff,r)*pow(vmag,(s-1.));
    545545
     
    587587
    588588        /*Check to prevent dividing by zero if vmag==0*/
    589         if(vmag==0. && (s-1.)<0.) alpha2=0.;
     589        if(vmag==0. && (s-1.)<=0.) alpha2=0.;
    590590        else alpha2=drag_coefficient*drag_coefficient*pow(Neff,r)*pow(vmag,(s-1.));
    591591
Note: See TracChangeset for help on using the changeset viewer.