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 _LATHEIF_H_ 00012 #define _LATHEIF_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 00044 class LatheIF: public BaseIF 00045 { 00046 public: 00048 00053 LatheIF(const BaseIF& a_impFunc1, 00054 const bool& a_inside); 00055 00057 00063 LatheIF(const BaseIF& a_impFunc1, 00064 const BaseIF& a_impFunc2, 00065 const RealVect& a_point, 00066 const bool& a_inside); 00067 00069 LatheIF(const LatheIF& a_inputIF); 00070 00072 virtual ~LatheIF(); 00073 00075 00078 virtual Real value(const RealVect& a_point) const; 00079 00080 virtual BaseIF* newImplicitFunction() const; 00081 00082 virtual bool fastIntersection(const RealVect& a_low, 00083 const RealVect& a_high)const 00084 { 00085 return false; 00086 // #if CH_SPACEDIM == 3 00087 // if(m_impFunc2 == NULL) 00088 // { 00089 // return true; 00090 // } 00091 // else 00092 // { 00093 // return false; 00094 // } 00095 // #elif CH_SPACEDIM == 2 00096 // return false; 00097 // #else 00098 // MayDay::Abort("need higher dim in LatheIF\n"); 00099 // #endif 00100 } 00101 00102 virtual GeometryService::InOut InsideOutside(const RealVect& a_low, 00103 const RealVect& a_high) const ; 00104 protected: 00105 BaseIF* m_impFunc1; // implicit function to rotate 00106 BaseIF* m_impFunc2; // implicit function to use for rotation 00107 00108 RealVect m_point; // point for center of second rotation 00109 00110 bool m_inside; // inside flag 00111 00112 private: 00113 LatheIF() 00114 { 00115 MayDay::Error("LatheIF uses strong construction"); 00116 } 00117 00118 void operator=(const LatheIF& a_inputIF) 00119 { 00120 MayDay::Error("LatheIF doesn't allow assignment"); 00121 } 00122 }; 00123 00124 #include "NamespaceFooter.H" 00125 #endif