Chombo + EB + MF  3.2
HelicoilIF.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 _HELICOILIF_H_
12 #define _HELICOILIF_H_
13 
14 #include "MayDay.H"
15 #include "RealVect.H"
16 #include "Vector.H"
17 
18 #include "BaseIF.H"
19 #include "HelixIF.H"
20 
21 #include "NamespaceHeader.H"
22 
23 ///
24 /**
25  In 3D this is an approximation of a circle swept around a helix which is
26  always in the plane normal to the tangent of the helix. If the slope
27  of the helix is less than 1.0, this is achieved by sweeping an ellipse
28  oriented vertically along a helix. If the slope is greater than or equal
29  to 1.0, this is achieved by sweeping an ellipse oriented horizontally
30  along a helix. The eccentricity of the ellipse is adjusted based on the
31  slope.
32 
33  In 2D this is an ellipse offset from the origin.
34  */
35 class HelicoilIF: public BaseIF
36 {
37 public:
38  ///
39  /**
40  Constructor specifying the helix radius, pitch, radius of the swept
41  circle, and whether the domain is on the inside (a_inside),
42  i.e. where the function is negative.
43  */
44  HelicoilIF(const Real& a_helixR,
45  const Real& a_helixPitch,
46  const Real& a_circleR,
47  const bool& a_inside);
48 
49  /// Copy constructor
50  HelicoilIF(const HelicoilIF& a_inputIF);
51 
52  /// Destructor
53  virtual ~HelicoilIF();
54 
55  ///
56  /**
57  Return the value of the function at a_point.
58  */
59  virtual Real value(const RealVect& a_point) const;
60 
61  virtual BaseIF* newImplicitFunction() const;
62 
63  ///
64  /**
65  Pass this call onto the IFs contained in this IF class.
66  */
67  virtual void boxLayoutChanged(const DisjointBoxLayout & a_newBoxLayout,
68  const RealVect & a_dx)
69  {
70  m_helixIF->boxLayoutChanged(a_newBoxLayout,a_dx);
71  }
72 
73 protected:
74  Real m_helixR; // the radius of the helix
75  Real m_helixPitch; // the pitch of the helix
76  Real m_circleR; // the radius of the swept circle
77 
78  bool m_inside; // inside flag
79 
81  bool m_vertical;
82 
84 
85 private:
87  {
88  MayDay::Abort("HelicoilIF uses strong construction");
89  }
90 
91  void operator=(const HelicoilIF& a_inputIF)
92  {
93  MayDay::Abort("HelicoilIF doesn't allow assignment");
94  }
95 };
96 
97 #include "NamespaceFooter.H"
98 #endif
void operator=(const HelicoilIF &a_inputIF)
Definition: HelicoilIF.H:91
Real m_circleR
Definition: HelicoilIF.H:76
BaseIF * m_helixIF
Definition: HelicoilIF.H:83
virtual ~HelicoilIF()
Destructor.
virtual BaseIF * newImplicitFunction() const
Definition: HelicoilIF.H:35
Real m_helixPitch
Definition: HelicoilIF.H:75
virtual void boxLayoutChanged(const DisjointBoxLayout &a_newBoxLayout, const RealVect &a_dx)
Definition: BaseIF.H:259
HelicoilIF()
Definition: HelicoilIF.H:86
Real m_helixR
Definition: HelicoilIF.H:74
Definition: BaseIF.H:32
virtual void boxLayoutChanged(const DisjointBoxLayout &a_newBoxLayout, const RealVect &a_dx)
Definition: HelicoilIF.H:67
double Real
Definition: REAL.H:33
bool m_vertical
Definition: HelicoilIF.H:81
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual Real value(const RealVect &a_point) const
Real m_ellipseR
Definition: HelicoilIF.H:80
bool m_inside
Definition: HelicoilIF.H:78
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).