6 #include "../Numerics/types.h"
7 #include "../Exceptions/exceptions.h"
19 if((w0==w1)||(w1==w2)||(w0==w2))
20 _error_(
"Error: equal ordinates in DrainageFunctionWaterfraction -> division by zero. Abort");
24 else if((waterfraction>w0) && (waterfraction<=w1))
25 Dret=(D1-D0)/(w1-w0)*(waterfraction-w0)+D0;
26 else if((waterfraction>w1) && (waterfraction<=w2))
27 Dret=(
D2-D1)/(w2-w1)*(waterfraction-w1)+D1;
34 return waterfraction-w0;
39 if((waterfraction>w0) && (waterfraction-dt*Dret<w0))
40 return (waterfraction-w0)/dt;