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