00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _INTERSECTIONIF_H_
00012 #define _INTERSECTIONIF_H_
00013
00014 #include "MayDay.H"
00015 #include "RealVect.H"
00016 #include "Vector.H"
00017
00018 #include "BaseIF.H"
00019
00020 #include "NamespaceHeader.H"
00021
00023
00029 class IntersectionIF: public BaseIF
00030 {
00031 public:
00033
00036 IntersectionIF(const BaseIF& a_impFunc1,
00037 const BaseIF& a_impFunc2);
00038
00040
00043 IntersectionIF(const Vector<BaseIF*>& a_impFuncs);
00044
00046 IntersectionIF(const IntersectionIF& a_inputIF);
00047
00049 virtual ~IntersectionIF();
00050
00052
00055 virtual Real value(const RealVect& a_point) const;
00056
00057 virtual Real value(const IndexTM<Real,GLOBALDIM>& a_point) const;
00058
00059 virtual IndexTM<Real,GLOBALDIM> normal(const IndexTM<Real,GLOBALDIM>& a_point) const;
00060
00061 virtual Vector< IndexTM<Real,GLOBALDIM> > gradNormal(const IndexTM<Real,GLOBALDIM>& a_point) const;
00062
00063 virtual BaseIF* newImplicitFunction() const;
00064
00065 void findClosest(const IndexTM<Real,GLOBALDIM>& a_point,int& closestIF) const;
00066
00067 virtual bool fastIntersection(const RealVect& a_low,
00068 const RealVect& a_high) const ;
00069
00070
00071 virtual GeometryService::InOut InsideOutside(const RealVect& a_low,
00072 const RealVect& a_high) const ;
00073
00074 protected:
00075 int m_numFuncs;
00076 Vector<BaseIF*> m_impFuncs;
00077
00078 private:
00079 IntersectionIF()
00080 {
00081 MayDay::Error("IntersectionIF uses strong construction");
00082 }
00083
00084 void operator=(const IntersectionIF& a_inputIF)
00085 {
00086 MayDay::Error("IntersectionIF doesn't allow assignment");
00087 }
00088 };
00089
00090 #include "NamespaceFooter.H"
00091 #endif