00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _COMPLEMENTIF_H_
00012 #define _COMPLEMENTIF_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 ComplementIF: public BaseIF
00030 {
00031 public:
00033
00037 ComplementIF(const BaseIF& a_impFunc,
00038 const bool& a_complement = true);
00039
00041 ComplementIF(const ComplementIF& a_inputIF,
00042 const bool& a_complement = true);
00043
00045 virtual ~ComplementIF();
00046
00048
00051 virtual void GetParams(bool& a_complement) const;
00052
00054
00057 virtual void SetParams(const bool& a_complement);
00058
00060
00063 virtual Real value(const RealVect& a_point) const;
00064
00066
00069 virtual Real value(const IndexTM<Real,GLOBALDIM>& a_point) const;
00070
00072
00075 virtual IndexTM<Real,GLOBALDIM> grad(const IndexTM<Real,GLOBALDIM>& a_point) const;
00076
00078
00081 virtual IndexTM<Real,GLOBALDIM> normal(const IndexTM<Real,GLOBALDIM>& a_point) const;
00082
00084
00087 virtual Vector<IndexTM <Real,GLOBALDIM> > gradGrad(const IndexTM<Real,GLOBALDIM>& a_point) const;
00088
00090
00093 virtual Vector< IndexTM<Real,GLOBALDIM> > gradNormal(const IndexTM<Real,GLOBALDIM>& a_point) const;
00094
00095 virtual BaseIF* newImplicitFunction() const;
00096
00097 virtual bool fastIntersection(const RealVect& a_low, const RealVect& a_high) const
00098 {return m_impFunc->fastIntersection(a_low, a_high);}
00099
00100 virtual GeometryService::InOut InsideOutside(const RealVect& a_low, const RealVect& a_high) const;
00101 protected:
00102 bool m_complement;
00103
00104 BaseIF* m_impFunc;
00105
00106 private:
00107 ComplementIF()
00108 {
00109 MayDay::Error("ComplementIF uses strong construction");
00110 }
00111
00112 void operator=(const ComplementIF& a_inputIF)
00113 {
00114 MayDay::Error("ComplementIF doesn't allow assignment");
00115 }
00116 };
00117
00118 #include "NamespaceFooter.H"
00119 #endif