Chombo + EB  3.2
IFSlicer.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 _IFSLICER_H_
12 #define _IFSLICER_H_
13 
14 #include <map>
15 
16 #include "Vector.H"
17 #include "REAL.H"
18 #include "IndexTM.H"
19 
20 #include "Notation.H"
21 #include "BaseIF.H"
22 
23 using std::endl;
24 
25 #include "NamespaceHeader.H"
26 
27 template <int dim> class IFSlicer
28 {
29 public:
30 
31  /// null constructor
32  /**
33  null constructor
34  */
35  IFSlicer();
36 
37  /// copy constructor
38  /**
39  copy constructor
40  */
41  IFSlicer(const IFSlicer<dim> & a_IFSlicer);
42 
43  /// makes a reduced IFSlicer
44  /**
45  makes a reduced IFSlicer
46  */
47  IFSlicer(IFSlicer<dim+1> const * a_slicer,
48  const int & a_fixedComp,
49  const Real & a_fixedValue);
50 
51  void setParams(IFSlicer<dim+1> const * a_slicer,
52  const int & a_fixedComp,
53  const Real & a_fixedValue);
54 
55  /// destructor
56  /**
57  destructor
58  */
59  virtual ~IFSlicer();
60 
61  /// Return the partial derivative evaluated at a_point.
62  /**
63  Represent the partial derivative as a list of integers.
64  Return the partial derivative evaluated at a_point.
65  */
66  virtual Real value(const IndexTM<int, dim> & a_partialDerivative,
67  const IndexTM<Real,dim> & a_point)const;
68 
69  /// output function
70  /**
71  output function
72  */
73  void print(ostream& out) const;
74 
75 protected:
76  // The higher dimensional IFSlicer being further sliced
78 
79  // The component direction being held fixed and its value
82 
83 private:
84  //
85  // These functions are made private to prevent use of the default
86  // functions provided by the C++ compiler.
87  //
89 
90 };
91 
92 template<> class IFSlicer<GLOBALDIM>
93 {
94 public:
95  /// null constructor
96  /**
97  null constructor
98  */
99  IFSlicer();
100 
101  /// copy constructor
102  /**
103  copy constructor
104  */
105  IFSlicer(const IFSlicer<GLOBALDIM> & a_IFSlicer);
106 
107  /// if dim == GLOBALDIM, construct from BaseIF
108  /**
109  if dim == GLOBALDIM, construct from BaseIF
110  */
111  IFSlicer(const BaseIF & a_implicitFunction);
112 
113  /// destructor
114  /**
115  destructor
116  */
117  virtual ~IFSlicer();
118 
119  /// Return the partial derivative evaluated at a_point.
120  /**
121  Represent the partial derivative as a list of integers.
122  Return the partial derivative evaluated at a_point.
123  */
124  virtual Real value(const IndexTM<int, GLOBALDIM> & a_partialDerivative,
125  const IndexTM<Real,GLOBALDIM> & a_point) const;
126 
127  void print(ostream& a_out) const;
128 
129 protected:
130  // The implicit function being sliced. At GLOBALDIM this is just a
131  // container class to start the slicing process.
133 
134 private:
135  //
136  // These functions are made private to prevent use of the default
137  // functions provided by the C++ compiler.
138  //
140 };
141 
142 #include "NamespaceFooter.H"
143 
144 #include "IFSlicerImplem.H"
145 
146 #endif
void setParams(IFSlicer< dim+1 > const *a_slicer, const int &a_fixedComp, const Real &a_fixedValue)
Definition: IFSlicerImplem.H:44
int m_fixedComp
Definition: IFSlicer.H:80
void print(ostream &out) const
output function
Definition: IFSlicerImplem.H:93
IFSlicer< dim > & operator=(const IFSlicer< dim > &)
IFSlicer< dim+1 > const * m_IFSlicer
Definition: IFSlicer.H:77
Definition: IndexTM.H:36
Real m_fixedValue
Definition: IFSlicer.H:81
IFSlicer()
null constructor
Definition: IFSlicerImplem.H:19
Definition: BaseIF.H:32
double Real
Definition: REAL.H:33
Definition: IFSlicer.H:92
Definition: IFSlicer.H:27
virtual Real value(const IndexTM< int, dim > &a_partialDerivative, const IndexTM< Real, dim > &a_point) const
Return the partial derivative evaluated at a_point.
Definition: IFSlicerImplem.H:60
virtual ~IFSlicer()
destructor
Definition: IFSlicerImplem.H:55
BaseIF * m_implicitFunction
Definition: IFSlicer.H:132
#define GLOBALDIM
Definition: Notation.H:35