00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _MOLLIFYIF_H_
00012 #define _MOLLIFYIF_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 MollifyIF: public BaseIF
00030 {
00031 public:
00033
00038 MollifyIF(const BaseIF& a_impFunc,
00039 const BaseIF& a_mollifier,
00040 const Real& a_min,
00041 const Real& a_max,
00042 const int& a_numPts);
00043
00045 MollifyIF(const MollifyIF& a_inputIF);
00046
00048 virtual ~MollifyIF();
00049
00051
00054 virtual Real value(const RealVect& a_point) const;
00055
00057
00060 virtual Real value(const IndexTM<Real,GLOBALDIM>& a_point) const;
00061
00063
00066 virtual IndexTM<Real,GLOBALDIM> grad(const IndexTM<Real,GLOBALDIM>& a_point) const;
00067
00069
00072 virtual IndexTM<Real,GLOBALDIM> normal(const IndexTM<Real,GLOBALDIM>& a_point) const;
00073
00075
00078 virtual Vector<IndexTM <Real,GLOBALDIM> > gradGrad(const IndexTM<Real,GLOBALDIM>& a_point) const;
00079
00081
00084 virtual Vector<IndexTM <Real,GLOBALDIM> > gradNormal(const IndexTM<Real,GLOBALDIM>& a_point) const;
00085
00086 virtual BaseIF* newImplicitFunction() const;
00087
00088 protected:
00089 BaseIF* m_impFunc;
00090 BaseIF* m_mollifier;
00091
00092 Real m_min;
00093 Real m_max;
00094 int m_numPts;
00095
00096 Real m_dx;
00097 Box m_sampleBox;
00098
00099
00100
00101
00102 mutable Real m_mollifierSum;
00103 mutable FArrayBox m_sampledMollifier;
00104
00105 mutable FArrayBox m_sampledGradMollifier;
00106 mutable bool m_cachedGradMollifier;
00107
00108 mutable FArrayBox m_sampledGradGradMollifier;
00109 mutable bool m_cachedGradGradMollifier;
00110
00111 private:
00112 MollifyIF()
00113 {
00114 MayDay::Error("MollifyIF uses strong construction");
00115 }
00116
00117 void operator=(const MollifyIF& a_inputIF)
00118 {
00119 MayDay::Error("MollifyIF doesn't allow assignment");
00120 }
00121 };
00122
00123 #include "NamespaceFooter.H"
00124 #endif