Chombo + EB + MF  3.2
GaussianIF.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 _GAUSSIANIF_H_
12 #define _GAUSSIANIF_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 gaussian level set. The gaussian
24  level set's dependent variable is in the "upDir" direction and it is a
25  function of the other directions. The gaussian level set is centered
26  at
27  */
28 class GaussianIF: public BaseIF
29 {
30 public:
31  ///
32  /**
33  Constructor specifying the gaussian level set's center (a_origin),
34  its height (a_height), the square of its standard deviation (a_sig2),
35  its dependent variable direction (a_upDir), and whether the domain
36  is the same side as the normal (a_inside).
37  */
38  GaussianIF(const RealVect& a_origin,
39  const Real& a_height,
40  const RealVect& a_sig2,
41  const int& a_upDir,
42  const bool& a_inside);
43 
44  /// Copy constructor
45  GaussianIF(const GaussianIF& a_inputIF);
46 
47  /// Destructor
48  virtual ~GaussianIF();
49 
50  ///
51  /**
52  Return the parameter information
53  */
54  virtual void GetParams(RealVect& a_origin,
55  Real& a_height,
56  RealVect& a_sig2,
57  int& a_upDir,
58  bool& a_inside) const;
59 
60  ///
61  /**
62  Set the parameter information
63  */
64  virtual void SetParams(const RealVect& a_origin,
65  const Real& a_height,
66  const RealVect& a_sig2,
67  const int& a_upDir,
68  const bool& a_inside);
69 
70  ///
71  /**
72  Return the value of the function at a_point.
73  */
74  virtual Real value(const RealVect& a_point) const;
75 
76  virtual BaseIF* newImplicitFunction() const;
77 
78 protected:
79  RealVect m_origin; // gaussian origin
80  Real m_height; // height of the gaussian
81  RealVect m_sig2; // standard deviation of gaussian
82  int m_upDir; // the up direction for the gaussian (the symmetry direction)
83  bool m_inside; // inside flag
84 
85 private:
87  {
88  MayDay::Abort("GaussianIF uses strong construction");
89  }
90 
91  void operator=(const GaussianIF& a_inputIF)
92  {
93  MayDay::Abort("GaussianIF doesn't allow assignment");
94  }
95 };
96 
97 #include "NamespaceFooter.H"
98 #endif
RealVect m_origin
Definition: GaussianIF.H:79
virtual void SetParams(const RealVect &a_origin, const Real &a_height, const RealVect &a_sig2, const int &a_upDir, const bool &a_inside)
virtual Real value(const RealVect &a_point) const
RealVect m_sig2
Definition: GaussianIF.H:81
virtual BaseIF * newImplicitFunction() const
virtual void GetParams(RealVect &a_origin, Real &a_height, RealVect &a_sig2, int &a_upDir, bool &a_inside) const
GaussianIF()
Definition: GaussianIF.H:86
Definition: BaseIF.H:32
virtual ~GaussianIF()
Destructor.
double Real
Definition: REAL.H:33
int m_upDir
Definition: GaussianIF.H:82
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
bool m_inside
Definition: GaussianIF.H:83
Real m_height
Definition: GaussianIF.H:80
Definition: GaussianIF.H:28
void operator=(const GaussianIF &a_inputIF)
Definition: GaussianIF.H:91
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).