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 _TYLERCHANNELIF_H_ 00012 #define _TYLERCHANNELIF_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 sphere. 00024 */ 00025 class TylerChannelIF: public BaseIF 00026 { 00027 public: 00028 /// 00029 /** 00030 A C-infinity contraction/expansion channel. 00031 00032 The geometry is centered at [x_M,y_M] = [(a_x1+a_x2)/2,yDomainLength/2] 00033 and is symmetric about y = y_M. The size of the channel goes from 00034 2*a_y1 to 2*a_y2 as x goes from -infinity to infinity. 00035 00036 The boundary is given by: 00037 00038 y(x) = y_M +/- yDist(x) 00039 yDist(x) = a_y1*(1-frac(x)) + a_y2*frac(x) 00040 frac(x) = (tanh(theta(x)) + 1) / 2 00041 theta(x) = 4 * (x - x_M)/(a_x2 - a_x1) 00042 */ 00043 TylerChannelIF(const Real& a_x1, 00044 const Real& a_x2, 00045 const Real& a_y1, 00046 const Real& a_y2, 00047 const Real& a_yDomainLength); 00048 00049 /// Copy constructor 00050 TylerChannelIF(const TylerChannelIF& a_inputIF); 00051 00052 /// Destructor 00053 virtual ~TylerChannelIF(); 00054 00055 /// 00056 /** 00057 Return the value of the function at a_point. 00058 */ 00059 virtual Real value(const RealVect& a_point) const; 00060 00061 virtual BaseIF* newImplicitFunction() const; 00062 00063 protected: 00064 Real m_x1; 00065 Real m_x2; 00066 00067 Real m_y1; 00068 Real m_y2; 00069 00070 Real m_yDomainLength; 00071 00072 private: 00073 TylerChannelIF() 00074 { 00075 MayDay::Abort("TylerChannelIF uses strong construction"); 00076 } 00077 00078 void operator=(const TylerChannelIF& a_inputIF) 00079 { 00080 MayDay::Abort("TylerChannelIF doesn't allow assignment"); 00081 } 00082 }; 00083 00084 #include "NamespaceFooter.H" 00085 #endif