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