Chombo + EB + MF  3.2
MBStencilElement.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 _MBSTENCILELEMENT_H_
12 #define _MBSTENCILELEMENT_H_
13 
14 #include "IntVect.H"
15 
16 #include "NamespaceHeader.H"
17 
18 // ---------------------------------------------------------
19 /// Class to describe a single element of a multi-block interpolation stencil.
21 {
22 public:
23 
24  /// null constructor leaves object in undefined state.
26 
27  ///
28  /**
29  Constructor.
30  */
31  MBStencilElement(const IntVect& a_cell,
32  int a_block,
33  Real a_weight = 0.);
34 
35  ///
36  /*
37  Same as constructor.
38  */
39  virtual void define(const IntVect& a_cell,
40  int a_block,
41  Real a_weight = 0.);
42 
43  bool operator==(const MBStencilElement& a_input) const;
44 
45  inline
46  const IntVect& cell() const;
47 
48  inline
49  int block() const;
50 
51  inline
52  Real weight() const;
53 
54  inline
55  void setWeight(Real a_weight);
56 
57 protected:
58 
59  /// index of this stencil cell
61 
62  /// block containing this stencil cell
63  int m_block;
64 
65  /// weight of this cell in the stencil
67 };
68 
69 inline
70 const IntVect&
72 {
73  return m_cell;
74 }
75 
76 inline
77 int
79 {
80  return m_block;
81 }
82 
83 inline
84 Real
86 {
87  return m_weight;
88 }
89 
90 inline
91 void
93 {
94  m_weight = a_weight;
95 }
96 
97 #include "NamespaceFooter.H"
98 
99 #endif // include guard
Real m_weight
weight of this cell in the stencil
Definition: MBStencilElement.H:66
bool operator==(const MBStencilElement &a_input) const
Class to describe a single element of a multi-block interpolation stencil.
Definition: MBStencilElement.H:20
MBStencilElement()
null constructor leaves object in undefined state.
const IntVect & cell() const
Definition: MBStencilElement.H:71
Real weight() const
Definition: MBStencilElement.H:85
int m_block
block containing this stencil cell
Definition: MBStencilElement.H:63
double Real
Definition: REAL.H:33
int block() const
Definition: MBStencilElement.H:78
void setWeight(Real a_weight)
Definition: MBStencilElement.H:92
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
IntVect m_cell
index of this stencil cell
Definition: MBStencilElement.H:60
virtual void define(const IntVect &a_cell, int a_block, Real a_weight=0.)