00001 #include "fpcfracture.h" 00002 //#include "numericmethods.h" 00003 00004 00005 FPcFracture::FPcFracture(double gamma,double theta) 00006 { 00007 _gamma = gamma; 00008 _theta = theta; 00009 } 00010 00011 double FPcFracture::operator()(double x,unsigned cmp) const 00012 { 00013 double sr=1e-8; 00014 assert(cmp==0); 00015 if (x>sr && x<=1.0) 00016 { 00017 return (1-x)*(_gamma/x-_gamma+_theta); 00018 } 00019 else if (x<=sr) 00020 { 00021 return (1-sr)*(_gamma/sr-_gamma+_theta); 00022 //return 1.0e+12; 00023 } 00024 else 00025 { 00026 return 1e-12; 00027 } 00028 }