Chombo + EB  3.2
PolarIF.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 _POLARIF_H_
12 #define _POLARIF_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 cylinder in polar coordinates:
24  r = a_primaryRadius + a_perturbation*cos(a_frequency*theta)
25  */
26 class PolarIF: public BaseIF
27 {
28 public:
29  ///
30  PolarIF(const Real& a_primaryRadius,
31  const Real& a_perturbation,
32  const int & a_frequency,
33  const bool& a_inside);
34 
35  /// Copy constructor
36  PolarIF(const PolarIF& a_inputIF);
37 
38  /// Destructor
39  virtual ~PolarIF();
40 
41  ///
42  /**
43  Return the parameter information
44  */
45  virtual void GetParams(Real& a_primaryRadius,
46  Real& a_perturbation,
47  int & a_frequency,
48  bool& a_inside)const;
49 
50  ///
51  /**
52  Set the parameter information
53  */
54  virtual void SetParams(const Real& a_primaryRadius,
55  const Real& a_perturbation,
56  const int & a_frequency,
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:
71  bool m_inside;
72 
73 private:
75  {
76  MayDay::Abort("PolarIF uses strong construction");
77  }
78 
79  void operator=(const PolarIF& a_inputIF)
80  {
81  MayDay::Abort("PolarIF doesn't allow assignment");
82  }
83 };
84 
85 #include "NamespaceFooter.H"
86 #endif
bool m_inside
Definition: PolarIF.H:71
virtual Real value(const RealVect &a_point) const
virtual BaseIF * newImplicitFunction() const
Real m_primaryRadius
Definition: PolarIF.H:68
Definition: BaseIF.H:32
PolarIF()
Definition: PolarIF.H:74
double Real
Definition: REAL.H:33
void operator=(const PolarIF &a_inputIF)
Definition: PolarIF.H:79
virtual ~PolarIF()
Destructor.
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual void GetParams(Real &a_primaryRadius, Real &a_perturbation, int &a_frequency, bool &a_inside) const
Definition: PolarIF.H:26
int m_frequency
Definition: PolarIF.H:70
Real m_perturbation
Definition: PolarIF.H:69
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).
virtual void SetParams(const Real &a_primaryRadius, const Real &a_perturbation, const int &a_frequency, const bool &a_inside)