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 00021 /// 00022 /** 00023 Constructor specifying an infinite array of spheres 00024 starting at first center and going in all directions 00025 spaced out by spacing 00026 */ 00027 class SphereArrayIF: public BaseIF 00028 { 00029 public: 00030 /// 00031 /** 00032 Constructor specifying an infinite array of spheres 00033 starting at first center and going in all directions 00034 spaced out by spacing 00035 */ 00036 SphereArrayIF(const Real& a_radius, 00037 const RealVect& a_firstCenter, 00038 const RealVect& a_spacing); 00039 00040 /// Copy constructor 00041 SphereArrayIF(const SphereArrayIF& a_inputIF); 00042 00043 /// Destructor 00044 virtual ~SphereArrayIF(); 00045 00046 /// 00047 /** 00048 Return the value of the function at a_point. 00049 */ 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 false;} 00057 00058 protected: 00059 Real m_radius; 00060 RealVect m_firstCenter; 00061 RealVect m_spacing; 00062 00063 Real m_radius2; // precomputed radius squared 00064 00065 private: 00066 SphereArrayIF() 00067 { 00068 MayDay::Abort("SphereArrayIF uses strong construction"); 00069 } 00070 00071 void operator=(const SphereArrayIF& a_inputIF) 00072 { 00073 MayDay::Abort("SphereArrayIF doesn't allow assignment"); 00074 } 00075 }; 00076 00077 #include "NamespaceFooter.H" 00078 #endif