Chombo + EB  3.2
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 false;}
57 
58 protected:
62 
63  Real m_radius2; // precomputed radius squared
64 
65 private:
67  {
68  MayDay::Abort("SphereArrayIF uses strong construction");
69  }
70 
71  void operator=(const SphereArrayIF& a_inputIF)
72  {
73  MayDay::Abort("SphereArrayIF doesn't allow assignment");
74  }
75 };
76 
77 #include "NamespaceFooter.H"
78 #endif
Real m_radius2
Definition: SphereArrayIF.H:63
virtual Real value(const RealVect &a_point) const
SphereArrayIF()
Definition: SphereArrayIF.H:66
virtual bool fastIntersection(const RealVect &a_low, const RealVect &a_high) const
Definition: SphereArrayIF.H:54
virtual ~SphereArrayIF()
Destructor.
RealVect m_firstCenter
Definition: SphereArrayIF.H:60
Definition: BaseIF.H:32
double Real
Definition: REAL.H:33
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect m_spacing
Definition: SphereArrayIF.H:61
void operator=(const SphereArrayIF &a_inputIF)
Definition: SphereArrayIF.H:71
Definition: SphereArrayIF.H:27
virtual BaseIF * newImplicitFunction() const
Real m_radius
Definition: SphereArrayIF.H:59
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).