#include <generalfunctioninterface.h>
Public Member Functions | |
GeneralFunctionInterface (unsigned domainDim, unsigned imageDim) | |
unsigned | getDomainDim () const |
unsigned | getImageDim () const |
unsigned | n_components () const |
virtual double | operator() (const VecDouble &p, unsigned int component=0) const =0 |
virtual bool | isInDomain (const VecDouble &p, unsigned component=0) const |
virtual void | setParameters (const VecDouble ¶meters) |
void | plotInLine (VecDouble &p1, VecDouble &p2, unsigned npts, std::ostream &out, unsigned cmp=0) |
virtual | ~GeneralFunctionInterface () |
virtual void | vector_value (const VecDouble &p, VecDouble &values) const |
Private Attributes | |
unsigned | _domainDim |
unsigned | _imageDim |
Definition at line 10 of file generalfunctioninterface.h.
GeneralFunctionInterface::GeneralFunctionInterface | ( | unsigned | domainDim, | |
unsigned | imageDim | |||
) | [inline] |
Definition at line 15 of file generalfunctioninterface.h.
00016 :_domainDim(domainDim),_imageDim(imageDim){}
virtual GeneralFunctionInterface::~GeneralFunctionInterface | ( | ) | [inline, virtual] |
Definition at line 36 of file generalfunctioninterface.h.
unsigned GeneralFunctionInterface::getDomainDim | ( | ) | const [inline] |
Definition at line 17 of file generalfunctioninterface.h.
00017 {return _domainDim;}
unsigned GeneralFunctionInterface::getImageDim | ( | ) | const [inline] |
Definition at line 18 of file generalfunctioninterface.h.
00018 {return _imageDim;}
bool GeneralFunctionInterface::isInDomain | ( | const VecDouble & | p, | |
unsigned | component = 0 | |||
) | const [virtual] |
Reimplemented in FCubeBoundaryCondition, FCompoundVector, FConst3D, FCylinderRegion, FDomainComplement, FDomainUnion, FWellCondition, and Function1D.
Definition at line 26 of file generalfunctioninterface.cpp.
00027 { 00028 00029 throw new Exception("GeneralFunctionInterface::IsInDomain not defined for %s\n",typeid(*this).name()); 00030 return false; 00031 }
unsigned GeneralFunctionInterface::n_components | ( | ) | const [inline] |
Definition at line 19 of file generalfunctioninterface.h.
00019 {return _imageDim;}
virtual double GeneralFunctionInterface::operator() | ( | const VecDouble & | p, | |
unsigned int | component = 0 | |||
) | const [pure virtual] |
void GeneralFunctionInterface::plotInLine | ( | VecDouble & | p1, | |
VecDouble & | p2, | |||
unsigned | npts, | |||
std::ostream & | out, | |||
unsigned | cmp = 0 | |||
) |
Definition at line 5 of file generalfunctioninterface.cpp.
00006 { 00007 assert(p1.size() == getDomainDim()); 00008 assert(p2.size() == getDomainDim()); 00009 00010 VecDouble dp=p2; 00011 VecDouble p=p1; 00012 dp-=p1; 00013 dp*=1.0/(npts-1); 00014 double dx = dp.l2_norm(); 00015 double x=0; 00016 for(unsigned i=0;i<npts;i++) 00017 { 00018 fout << x << " " << (*this)(p,cmp) << std::endl; 00019 x+=dx; 00020 p+=dp; 00021 } 00022 }
virtual void GeneralFunctionInterface::setParameters | ( | const VecDouble & | parameters | ) | [inline, virtual] |
Reimplemented in DFChaventMobility, FBucleyLeverettTotalMob, FChaventMobility, FLinear, and FQuadratic.
Definition at line 25 of file generalfunctioninterface.h.
virtual void GeneralFunctionInterface::vector_value | ( | const VecDouble & | p, | |
VecDouble & | values | |||
) | const [inline, virtual] |
Definition at line 38 of file generalfunctioninterface.h.
unsigned GeneralFunctionInterface::_domainDim [private] |
Definition at line 12 of file generalfunctioninterface.h.
unsigned GeneralFunctionInterface::_imageDim [private] |
Definition at line 13 of file generalfunctioninterface.h.