Chombo + EB  3.0
PlaneIF.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 _PLANEIF_H_
12 #define _PLANEIF_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 plane.
24  */
25 class PlaneIF: public BaseIF
26 {
27 public:
28  ///
29  /**
30  Constructor specifying plane normal (a_normal), a point on the plance
31  (a_point), and whether the domain is the same side as the normal
32  (a_inside).
33  */
34  PlaneIF(const RealVect& a_normal,
35  const RealVect& a_point,
36  const bool& a_inside);
37 
38  /// Copy constructor
39  PlaneIF(const PlaneIF& a_inputIF);
40 
41  /// Destructor
42  virtual ~PlaneIF();
43 
44  ///
45  /**
46  Return the parameter information
47  */
48  virtual void GetParams(RealVect& a_normal,
49  RealVect& a_point,
50  bool& a_inside) const;
51 
52  ///
53  /**
54  Set the parameter information
55  */
56  virtual void SetParams(const RealVect& a_normal,
57  const RealVect& a_point,
58  const bool& a_inside);
59 
60  ///
61  /**
62  Return the value of the function at a_point.
63  */
64  virtual Real value(const RealVect& a_point) const;
65 
66  virtual BaseIF* newImplicitFunction() const;
67 
68  virtual bool fastIntersection(const RealVect& a_low,
69  const RealVect& a_high)const
70  {return true;}
71 
72 
73  virtual GeometryService::InOut InsideOutside(const RealVect& a_low,
74  const RealVect& a_high) const ;
75 protected:
76  RealVect m_normal; // plane normal
77  RealVect m_point; // point on the plane
78  bool m_inside; // inside flag
79 
80 private:
82  {
83  MayDay::Abort("PlaneIF uses strong construction");
84  }
85 
86  void operator=(const PlaneIF& a_inputIF)
87  {
88  MayDay::Abort("PlaneIF doesn't allow assignment");
89  }
90 };
91 
92 #include "NamespaceFooter.H"
93 #endif
virtual Real value(const RealVect &a_point) const
virtual BaseIF * newImplicitFunction() const
virtual void GetParams(RealVect &a_normal, RealVect &a_point, bool &a_inside) const
RealVect m_normal
Definition: PlaneIF.H:76
InOut
Definition: GeometryService.H:41
Definition: PlaneIF.H:25
void operator=(const PlaneIF &a_inputIF)
Definition: PlaneIF.H:86
Definition: BaseIF.H:30
virtual ~PlaneIF()
Destructor.
double Real
Definition: REAL.H:33
RealVect m_point
Definition: PlaneIF.H:77
virtual GeometryService::InOut InsideOutside(const RealVect &a_low, const RealVect &a_high) const
virtual void SetParams(const RealVect &a_normal, const RealVect &a_point, const bool &a_inside)
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
PlaneIF()
Definition: PlaneIF.H:81
virtual bool fastIntersection(const RealVect &a_low, const RealVect &a_high) const
Definition: PlaneIF.H:68
bool m_inside
Definition: PlaneIF.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).