Changeset 17938
- Timestamp:
- 05/05/14 16:42:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Loads/Friction.cpp
r17929 r17938 94 94 } 95 95 96 /*Checks that s-1>0 if v=0*/ 97 if(vmag==0. && (s-1.)<0.) _error_("velocity is 0 and (s-1)=" << (s-1.) << "<0, alpha2 is Inf"); 98 99 alpha2=drag_coefficient*drag_coefficient*pow(Neff,r)*pow(vmag,(s-1.)); 96 /*Check to prevent dividing by zero if vmag==0*/ 97 if(vmag==0. && (s-1.)<0.) alpha2=0.; 98 else alpha2=drag_coefficient*drag_coefficient*pow(Neff,r)*pow(vmag,(s-1.)); 100 99 _assert_(!xIsNan<IssmDouble>(alpha2)); 101 100 … … 159 158 } 160 159 161 /*Checks that s-1>0 if v=0*/ 162 if(vmag==0. && (s-1.)<0.) _error_("velocity is 0 and (s-1)=" << (s-1.) << "<0, alpha2 is Inf"); 163 164 alpha_complement=pow(Neff,r)*pow(vmag,(s-1));_assert_(!xIsNan<IssmDouble>(alpha_complement)); 160 /*Check to prevent dividing by zero if vmag==0*/ 161 if(vmag==0. && (s-1.)<0.) alpha_complement=0.; 162 else alpha_complement=pow(Neff,r)*pow(vmag,(s-1));_assert_(!xIsNan<IssmDouble>(alpha_complement)); 165 163 166 164 /*Assign output pointers:*/
Note:
See TracChangeset
for help on using the changeset viewer.