Chombo + EB  3.2
HyperPlaneIF.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 _HYPERPLANEIF_H_
12 #define _HYPERPLANEIF_H_
13 
14 #include "MayDay.H"
15 #include "IndexTM.H"
16 #include "REAL.H"
17 
18 #include "BaseIF.H"
19 #include "NamespaceHeader.H"
20 
21 ///
22 /**
23  This implicit function specifies a plane templated in dimension.
24  */
25 class HyperPlaneIF: public BaseIF
26 {
27 public:
28  ///
29  /**
30  Constructor specifying the coefficients of the plane normal, a_normal,
31  and a point on the plane, a_point.
32  */
33  HyperPlaneIF(const IndexTM<Real,GLOBALDIM>& a_normal,
34  const IndexTM<Real,GLOBALDIM>& a_point,
35  const bool & a_normalIn);
36 
37  /// Copy constructor
38  HyperPlaneIF(const HyperPlaneIF& a_inputIF);
39 
40  /// Destructor
41  virtual ~HyperPlaneIF();
42  /**
43  Return the value of the function at a_point.
44  */
45 
46  virtual Real value(const IndexTM<int,GLOBALDIM> & a_partialDerivative,
47  const IndexTM<Real,GLOBALDIM>& a_point) const;
48 
49  virtual Real value(const RealVect& a_point) const;
50 
51  virtual Real value(const IndexTM<Real,GLOBALDIM>& a_point) const;
52 
53  virtual IndexTM<Real,GLOBALDIM> normal(const IndexTM<Real,GLOBALDIM>& a_point) const ;
54 
56 
57  virtual BaseIF* newImplicitFunction() const;
58 
59  //protected:
60 
61  // normal to the plane
63 
64  // a point on the plane
66 
67  // (pt - m_point) . m_normal > 0 is inside if m_normalIn = true
68  bool m_normalIn;
69 
70 private:
72  {
73  MayDay::Abort("HyperPlaneIF uses strong construction");
74  }
75 
76  void operator=(const HyperPlaneIF& a_inputIF)
77  {
78  MayDay::Abort("HyperPlaneIF doesn't allow assignment");
79  }
80 };
81 
82 #include "NamespaceFooter.H"
83 #endif
virtual Vector< IndexTM< Real, GLOBALDIM > > gradNormal(const IndexTM< Real, GLOBALDIM > &a_point) const
one dimensional dynamic array
Definition: Vector.H:53
bool m_normalIn
Definition: HyperPlaneIF.H:68
virtual BaseIF * newImplicitFunction() const
Definition: BaseIF.H:32
HyperPlaneIF()
Definition: HyperPlaneIF.H:71
double Real
Definition: REAL.H:33
virtual IndexTM< Real, GLOBALDIM > normal(const IndexTM< Real, GLOBALDIM > &a_point) const
virtual ~HyperPlaneIF()
Destructor.
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
IndexTM< Real, GLOBALDIM > m_normal
Definition: HyperPlaneIF.H:62
Definition: HyperPlaneIF.H:25
virtual Real value(const IndexTM< int, GLOBALDIM > &a_partialDerivative, const IndexTM< Real, GLOBALDIM > &a_point) const
void operator=(const HyperPlaneIF &a_inputIF)
Definition: HyperPlaneIF.H:76
IndexTM< Real, GLOBALDIM > m_point
Definition: HyperPlaneIF.H:65
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).