Chombo + EB  3.0
EllipsoidIF.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 _ELLIPSOIDIF_H_
12 #define _ELLIPSOIDIF_H_
13 
14 #include "MayDay.H"
15 #include "RealVect.H"
16 
17 #include "BaseIF.H"
18 
19 #include "NamespaceHeader.H"
20 
21 ///
22 /**
23  This implicit function specifies an ellipsoid.
24  */
25 class EllipsoidIF: public BaseIF
26 {
27 public:
28  ///
29  /**
30  Constructor specifying ellipsoid "radii" (a_radii), center (a_center),
31  and whether the domain is on the inside (a_inside).
32  */
33  EllipsoidIF(const RealVect& a_radii,
34  const RealVect& a_center,
35  const bool& a_inside);
36 
37  /// Copy constructor
38  EllipsoidIF(const EllipsoidIF& a_inputIF);
39 
40  /// Destructor
41  virtual ~EllipsoidIF();
42 
43  ///
44  /**
45  Return the parameter information
46  */
47  virtual void GetParams(RealVect& a_radii,
48  RealVect& a_center,
49  bool& a_inside) const;
50 
51  ///
52  /**
53  Set the parameter information
54  */
55  virtual void SetParams(const RealVect& a_radii,
56  const RealVect& a_center,
57  const bool& a_inside);
58 
59  ///
60  /**
61  Return the value of the function at a_point.
62  */
63  virtual Real value(const RealVect& a_point) const;
64 
65  virtual BaseIF* newImplicitFunction() const;
66 
67 protected:
68  RealVect m_radii; // radii
69  RealVect m_center; // center
70  bool m_inside; // inside flag
71 
72  RealVect m_radii2; // precomputed radii squared
73 
74 private:
76  {
77  MayDay::Abort("EllipsoidIF uses strong construction");
78  }
79 
80  void operator=(const EllipsoidIF& a_inputIF)
81  {
82  MayDay::Abort("EllipsoidIF doesn't allow assignment");
83  }
84 };
85 
86 #include "NamespaceFooter.H"
87 #endif
virtual void SetParams(const RealVect &a_radii, const RealVect &a_center, const bool &a_inside)
EllipsoidIF()
Definition: EllipsoidIF.H:75
virtual BaseIF * newImplicitFunction() const
virtual Real value(const RealVect &a_point) const
Definition: BaseIF.H:30
double Real
Definition: REAL.H:33
RealVect m_center
Definition: EllipsoidIF.H:69
virtual void GetParams(RealVect &a_radii, RealVect &a_center, bool &a_inside) const
RealVect m_radii2
Definition: EllipsoidIF.H:72
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Definition: EllipsoidIF.H:25
RealVect m_radii
Definition: EllipsoidIF.H:68
void operator=(const EllipsoidIF &a_inputIF)
Definition: EllipsoidIF.H:80
bool m_inside
Definition: EllipsoidIF.H:70
virtual ~EllipsoidIF()
Destructor.
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).