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 _MULTISPHEREIF_H_ 00012 #define _MULTISPHEREIF_H_ 00013 00014 #include "MayDay.H" 00015 #include "RealVect.H" 00016 00017 #include "BaseIF.H" 00018 #include "ComplementIF.H" 00019 00020 #include "NamespaceHeader.H" 00021 00023 00026 class MultiSphereIF: public BaseIF 00027 { 00028 public: 00030 00034 MultiSphereIF(const Vector<Real>& a_radii, 00035 const Vector<RealVect>& a_centers, 00036 const bool& a_inside); 00037 00039 MultiSphereIF(const MultiSphereIF& a_inputIF); 00040 00042 virtual ~MultiSphereIF(); 00043 00045 00048 virtual void GetParams(Vector<Real>& a_radii, 00049 Vector<RealVect>& a_centers, 00050 bool& a_inside) const; 00051 00053 00056 virtual void SetParams(const Vector<Real>& a_radii, 00057 const Vector<RealVect>& a_centers, 00058 const bool& a_inside); 00059 00061 00064 virtual Real value(const RealVect& a_point) const; 00065 00066 virtual BaseIF* newImplicitFunction() const; 00067 00068 virtual bool fastIntersection(const RealVect& a_low, const RealVect& a_high) const 00069 {return true;} 00070 00071 virtual GeometryService::InOut InsideOutside(const RealVect& a_low, const RealVect& a_high) const; 00072 00073 protected: 00074 int m_numSpheres; // number of spheres 00075 Vector<Real> m_radii; // radi 00076 Vector<RealVect> m_centers; // centers 00077 bool m_inside; // inside flag 00078 00079 ComplementIF* m_multiSphere; // the IF object for the spheres 00080 00081 private: 00082 MultiSphereIF() 00083 { 00084 MayDay::Error("MultiSphereIF uses strong construction"); 00085 } 00086 00087 void operator=(const MultiSphereIF& a_inputIF) 00088 { 00089 MayDay::Error("MultiSphereIF doesn't allow assignment"); 00090 } 00091 }; 00092 00093 #include "NamespaceFooter.H" 00094 #endif