Chombo + EB  3.2
RhodoneaIF.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 _RHODONEAIF_H_
12 #define _RHODONEAIF_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 a rhodonea curve.
24  */
25 class RhodoneaIF: public BaseIF
26 {
27 public:
28  ///
29  /**
30  Constructor specifying rhodonea inner radius, outer radius,
31  number of lobes (frequency), center, and whether the domain
32  is on the inside.
33  */
34  RhodoneaIF(const Real& a_innerRadius,
35  const Real& a_outerRadius,
36  const int& a_frequency,
37  const RealVect& a_center,
38  const bool& a_inside);
39 
40  /// Copy constructor
41  RhodoneaIF(const RhodoneaIF& a_inputIF);
42 
43  /// Destructor
44  virtual ~RhodoneaIF();
45 
46  ///
47  /**
48  Return the parameter information
49  */
50  virtual void GetParams(Real& a_innerRadius,
51  Real& a_outerRadius,
52  int& a_frequency,
53  RealVect& a_center,
54  bool& a_inside) const;
55 
56  ///
57  /**
58  Set the parameter information
59  */
60  virtual void SetParams(const Real& a_innerRadius,
61  const Real& a_outerRadius,
62  const int& a_frequency,
63  const RealVect& a_center,
64  const bool& a_inside);
65 
66  ///
67  /**
68  Return the value of the function at a_point.
69  */
70  virtual Real value(const RealVect& a_point) const;
71 
72  virtual BaseIF* newImplicitFunction() const;
73 
74 protected:
75  Real m_innerRadius; // inner radius
76  Real m_outerRadius; // outer radius
77  int m_frequency; // frequency (i.e. number of lobes)
78  RealVect m_center; // center
79  bool m_inside; // inside flag
80 
81 private:
83  {
84  MayDay::Abort("RhodoneaIF uses strong construction");
85  }
86 
87  void operator=(const RhodoneaIF& a_inputIF)
88  {
89  MayDay::Abort("RhodoneaIF doesn't allow assignment");
90  }
91 };
92 
93 #include "NamespaceFooter.H"
94 #endif
bool m_inside
Definition: RhodoneaIF.H:79
Definition: RhodoneaIF.H:25
void operator=(const RhodoneaIF &a_inputIF)
Definition: RhodoneaIF.H:87
virtual ~RhodoneaIF()
Destructor.
Definition: BaseIF.H:32
virtual void GetParams(Real &a_innerRadius, Real &a_outerRadius, int &a_frequency, RealVect &a_center, bool &a_inside) const
RhodoneaIF()
Definition: RhodoneaIF.H:82
double Real
Definition: REAL.H:33
Real m_innerRadius
Definition: RhodoneaIF.H:75
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual Real value(const RealVect &a_point) const
RealVect m_center
Definition: RhodoneaIF.H:78
Real m_outerRadius
Definition: RhodoneaIF.H:76
virtual BaseIF * newImplicitFunction() const
virtual void SetParams(const Real &a_innerRadius, const Real &a_outerRadius, const int &a_frequency, const RealVect &a_center, const bool &a_inside)
int m_frequency
Definition: RhodoneaIF.H:77
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).