Changeset 7922


Ignore:
Timestamp:
04/15/11 08:05:34 (14 years ago)
Author:
Mathieu Morlighem
Message:

Better checks and comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Loads/Friction.cpp

    r7907 r7922  
    110110        else _error_("element_type %s not supported yet",element_type);
    111111
     112        /*Checks that s-1>0 if v=0*/
     113        if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
     114
    112115        alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
    113116        _assert_(!isnan(alpha2));
     
    171174        }
    172175        else _error_("element_type %s not supported yet",element_type);
     176
     177        /*Checks that s-1>0 if v=0*/
     178        if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
    173179
    174180        alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
     
    230236        vmag=sqrt(pow(vx,2)+pow(vy,2));
    231237
    232         /*Checks*/
     238        /*Checks that s-1>0 if v=0*/
    233239        if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
    234240
Note: See TracChangeset for help on using the changeset viewer.