Chombo + EB  3.2
BilinearIF.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 _BILINEARIF_H_
12 #define _BILINEARIF_H_
13 
14 #include "MayDay.H"
15 #include "RealVect.H"
16 #include "IndexTM.H"
17 #include "FArrayBox.H"
18 
19 #include "BaseIF.H"
20 
21 #include "NamespaceHeader.H"
22 
23 ///
24 /**
25  This implicit function specifies a general bilinear function.
26 */
27 class BilinearIF: public BaseIF
28 {
29 public:
30  ///
31  /**
32  Constructor specifying the value to interpolate with a bilinear function (a_etaCorner)
33  and the properties of the grid (a_origin and a_dx)
34  */
35 
37  const IndexTM<Real,GLOBALDIM>& a_origin3D,
38  const IndexTM<Real,GLOBALDIM>& a_dx3D,
39  DisjointBoxLayout * a_grids);
40 
41  /// Destructor
42 virtual ~BilinearIF();
43 
44 //copy constructor
45 
46 BilinearIF(const BilinearIF& a_inputIF);
47 
48 ///
49 /**
50  Put the grid index of the lower left node of the box which contain a_point in a_index
51 */
52 
53 virtual void findIndex(const IndexTM<Real,GLOBALDIM>& a_point,
54  IntVect & a_index) const;
55 
56  ///
57  /**
58  Return the value of the derivative at a_point.
59  */
60  virtual Real value(const IndexTM<int,GLOBALDIM> & a_partialDerivative,
61  const IndexTM<Real,GLOBALDIM> & a_point ) const;
62 
63  virtual Real value(const IndexTM<Real,GLOBALDIM>& a_point) const;
64 
65  virtual Real value(const RealVect& a_point) const;
66 
67  virtual BaseIF* newImplicitFunction() const;
68 
69  virtual LevelData<NodeFArrayBox>* getEtaCorner() const;
70 
71  virtual DisjointBoxLayout* getGrid() const;
72 
73  virtual void getPolynomial(Vector<PolyTerm> & a_polynomial,
74  IntVect & a_index);
75 private:
76 
78  {
79  MayDay::Abort("BilinearIF uses strong construction");
80  }
81 
82  void operator=(const BilinearIF& a_inputIF)
83  {
84  MayDay::Abort("BilinearIF doesn't allow assignment");
85  }
86 
87  //Node values of eta used for the bilinear interpolation
89 
90  //grids info to link indexes and physical coordinates
94 
95 
96 
97 };
98 
99 #include "NamespaceFooter.H"
100 #endif
virtual ~BilinearIF()
Destructor.
LevelData< NodeFArrayBox > * m_etaCorner
Definition: BilinearIF.H:88
virtual DisjointBoxLayout * getGrid() const
virtual BaseIF * newImplicitFunction() const
IndexTM< Real, GLOBALDIM > m_dx3D
Definition: BilinearIF.H:92
BilinearIF()
Definition: BilinearIF.H:77
Definition: BaseIF.H:32
void operator=(const BilinearIF &a_inputIF)
Definition: BilinearIF.H:82
DisjointBoxLayout * m_grids
Definition: BilinearIF.H:93
virtual Real value(const IndexTM< int, GLOBALDIM > &a_partialDerivative, const IndexTM< Real, GLOBALDIM > &a_point) const
double Real
Definition: REAL.H:33
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
IndexTM< Real, GLOBALDIM > m_origin3D
Definition: BilinearIF.H:91
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual LevelData< NodeFArrayBox > * getEtaCorner() const
Definition: BilinearIF.H:27
virtual void getPolynomial(Vector< PolyTerm > &a_polynomial, IntVect &a_index)
virtual void findIndex(const IndexTM< Real, GLOBALDIM > &a_point, IntVect &a_index) const
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).