00001 #include "dflinearmobilityproduct.h"
00002
00003
00004
00005
00006
00007 DFLinearMobilityProduct::DFLinearMobilityProduct(double vW,double vO,double srw, double sro)
00008 :Function1D(1)
00009 {
00010
00011 _vw = vW;
00012 _vo = vO;
00013 _MaxSw=1.-sro;
00014 _Srw=srw;
00015 _c1=_MaxSw*_MaxSw*_vo;
00016 _c2=(1.0-_Srw)*(1.0-_Srw)*_vw;
00017 _prob.sampleFunction(*this,0,0,1,100000);
00018 }
00019
00020
00021 double DFLinearMobilityProduct::operator()(double x,unsigned cmp) const
00022 {
00023 if (x >= _MaxSw)
00024 x=_MaxSw;
00025 else if (x < _Srw)
00026 x=_Srw;
00027
00028
00029
00030
00031 assert(cmp==0);
00032 return (_MaxSw-x)/(_c2*_c1*((x-_Srw)/_c2+(_MaxSw-x)/_c1))-(x-_Srw)/(_c2*_c1*((x-_Srw)/_c2+(_MaxSw-x)/_c1))-(x-_Srw)*(_MaxSw-x)*(1/_c2-1/_c1)/(_c2*_c1*pow(((x-_Srw)/_c2+(_MaxSw-x)/_c1),2));
00033 }
00034
00035 void DFLinearMobilityProduct::getMinMaxValues(double a, double b,double &min,double &max) const
00036 {
00037 _prob.getMinMaxValues(a,b,min,max);
00038 }
00039
00040
00041 DFLinearMobilityProduct::~DFLinearMobilityProduct()
00042 {
00043
00044 }