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 _SPHEREARRAYIF_H_ 00012 #define _SPHEREARRAYIF_H_ 00013 00014 #include "MayDay.H" 00015 #include "RealVect.H" 00016 00017 #include "BaseIF.H" 00018 00019 #include "NamespaceHeader.H" 00020 00022 00027 class SphereArrayIF: public BaseIF 00028 { 00029 public: 00031 00036 SphereArrayIF(const Real& a_radius, 00037 const RealVect& a_firstCenter, 00038 const RealVect& a_spacing); 00039 00041 SphereArrayIF(const SphereArrayIF& a_inputIF); 00042 00044 virtual ~SphereArrayIF(); 00045 00047 00050 virtual Real value(const RealVect& a_point) const; 00051 00052 virtual BaseIF* newImplicitFunction() const; 00053 00054 virtual bool fastIntersection(const RealVect& a_low, 00055 const RealVect& a_high) const 00056 {return true;} 00057 00058 virtual GeometryService::InOut InsideOutside(const RealVect& a_low, 00059 const RealVect& a_high) const; 00060 00061 protected: 00062 Real m_radius; 00063 RealVect m_firstCenter; 00064 RealVect m_spacing; 00065 00066 Real m_radius2; // precomputed radius squared 00067 00068 private: 00069 SphereArrayIF() 00070 { 00071 MayDay::Error("SphereArrayIF uses strong construction"); 00072 } 00073 00074 void operator=(const SphereArrayIF& a_inputIF) 00075 { 00076 MayDay::Error("SphereArrayIF doesn't allow assignment"); 00077 } 00078 }; 00079 00080 #include "NamespaceFooter.H" 00081 #endif