Chombo + EB  3.0
SphereArrayIF.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _SPHEREARRAYIF_H_
12 #define _SPHEREARRAYIF_H_
13 
14 #include "MayDay.H"
15 #include "RealVect.H"
16 
17 #include "BaseIF.H"
18 
19 #include "NamespaceHeader.H"
20 
21 ///
22 /**
23  Constructor specifying an infinite array of spheres
24  starting at first center and going in all directions
25  spaced out by spacing
26  */
27 class SphereArrayIF: public BaseIF
28 {
29 public:
30  ///
31  /**
32  Constructor specifying an infinite array of spheres
33  starting at first center and going in all directions
34  spaced out by spacing
35  */
36  SphereArrayIF(const Real& a_radius,
37  const RealVect& a_firstCenter,
38  const RealVect& a_spacing);
39 
40  /// Copy constructor
41  SphereArrayIF(const SphereArrayIF& a_inputIF);
42 
43  /// Destructor
44  virtual ~SphereArrayIF();
45 
46  ///
47  /**
48  Return the value of the function at a_point.
49  */
50  virtual Real value(const RealVect& a_point) const;
51 
52  virtual BaseIF* newImplicitFunction() const;
53 
54  virtual bool fastIntersection(const RealVect& a_low,
55  const RealVect& a_high) const
56  {return true;}
57 
58  virtual GeometryService::InOut InsideOutside(const RealVect& a_low,
59  const RealVect& a_high) const;
60 
61 protected:
65 
66  Real m_radius2; // precomputed radius squared
67 
68 private:
70  {
71  MayDay::Abort("SphereArrayIF uses strong construction");
72  }
73 
74  void operator=(const SphereArrayIF& a_inputIF)
75  {
76  MayDay::Abort("SphereArrayIF doesn't allow assignment");
77  }
78 };
79 
80 #include "NamespaceFooter.H"
81 #endif
Real m_radius2
Definition: SphereArrayIF.H:66
virtual BaseIF * newImplicitFunction() const
SphereArrayIF()
Definition: SphereArrayIF.H:69
virtual bool fastIntersection(const RealVect &a_low, const RealVect &a_high) const
Definition: SphereArrayIF.H:54
virtual GeometryService::InOut InsideOutside(const RealVect &a_low, const RealVect &a_high) const
virtual ~SphereArrayIF()
Destructor.
InOut
Definition: GeometryService.H:41
virtual Real value(const RealVect &a_point) const
RealVect m_firstCenter
Definition: SphereArrayIF.H:63
Definition: BaseIF.H:30
double Real
Definition: REAL.H:33
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect m_spacing
Definition: SphereArrayIF.H:64
void operator=(const SphereArrayIF &a_inputIF)
Definition: SphereArrayIF.H:74
Definition: SphereArrayIF.H:27
Real m_radius
Definition: SphereArrayIF.H:62
static void Abort(const char *const a_msg=m_nullString)
Print out message to cerr and exit via abort() (if serial) or MPI_Abort() (if parallel).