00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 #ifndef _PARABOLAIF_H_ 00012 #define _PARABOLAIF_H_ 00013 00014 #include "MayDay.H" 00015 #include "RealVect.H" 00016 00017 #include "BaseIF.H" 00018 00019 #include "NamespaceHeader.H" 00020 00021 /// 00022 /** 00023 This implicit function specifies a parabola. 00024 */ 00025 class ParabolaIF: public BaseIF 00026 { 00027 public: 00028 /// 00029 /** 00030 y = a*(x-x0)^2 + y0, (x0,y0) = a_point 00031 */ 00032 ParabolaIF(const Real& a_a, 00033 const RealVect& a_point, 00034 const bool& a_inside); 00035 00036 /// Destructor 00037 virtual ~ParabolaIF() 00038 { 00039 } 00040 00041 virtual Real value(const IndexTM<int,SpaceDim> & a_partialDerivative, 00042 const IndexTM<Real,SpaceDim>& a_point) const; 00043 00044 virtual Real value(const RealVect& a_point) const; 00045 00046 virtual Real value(const IndexTM<Real,SpaceDim>& a_point) const; 00047 00048 virtual BaseIF* newImplicitFunction() const; 00049 00050 protected: 00051 Real m_a; 00052 RealVect m_point; 00053 bool m_inside; 00054 private: 00055 ParabolaIF(); 00056 00057 }; 00058 00059 #include "NamespaceFooter.H" 00060 #endif