Proto  3.2
Proto_MBDataPoint.H
Go to the documentation of this file.
1 #pragma once
2 #ifndef _PROTO_MB_DATA_POINT_
3 #define _PROTO_MB_DATA_POINT_
4 
5 #include "Proto.H"
6 #include "Proto_MBLevelBoxData.H"
7 
8 namespace Proto
9 {
11  {
12  public:
13  inline MBDataPoint() = default;
14  inline MBDataPoint(const MBDataPoint& a_rhs);
15  inline MBDataPoint(MBIndex a_dstIndex, Point a_dstPoint,
16  const MBDisjointBoxLayout& a_layout);
17  inline MBDataPoint(MBIndex a_dstIndex, Point a_dstPoint,
18  MBIndex a_srcIndex, Point a_srcPoint,
19  const MBDisjointBoxLayout& a_layout);
20 
21  // Comparitors
22  inline MBDataPoint& operator=(const MBDataPoint& a_rhs) = default;
23  inline bool operator==(const MBDataPoint& a_rhs) const;
24  inline bool operator<(const MBDataPoint& a_rhs) const;
25 
26  // Accessors
27  inline bool inBoundary() const {return m_boundaryDir != Point::Zeros(); }
28  inline const Point& dstPoint() const { return m_dstPoint; }
29  inline const MBIndex& dstIndex() const { return m_dstIndex; }
30  inline const BlockIndex& dstBlock() const { return m_dstBlock; }
31  inline const Point& srcPoint() const { return m_srcPoint; }
32  inline const MBIndex& srcIndex() const { return m_srcIndex; }
33  inline const BlockIndex& srcBlock() const { return m_srcBlock; }
34  inline const Point& boundaryDir() const { return m_boundaryDir; }
35 
36  template<typename T, unsigned int C, MemType MEM, Centering CTR>
37  inline BoxData<T, C, MEM>&
39 
40  template<typename T, unsigned int C, MemType MEM, Centering CTR>
41  inline BoxData<T, C, MEM>&
43 
44  inline MBDataPoint shift(Point a_dstShift, const MBDisjointBoxLayout& a_layout) const;
45 
46  // MEMBER DATA
47  private:
52 
56  };
57 
58  inline std::ostream& operator<<(std::ostream& a_os, const MBDataPoint& a_point)
59  {
60  a_os << "dstPoint: " << a_point.dstPoint() << "| dstBlock: " << a_point.dstBlock() << " | srcPoint: " << a_point.srcPoint() << " | srcBlock: " << a_point.srcBlock() << " | boundaryDir: " << a_point.boundaryDir();
61  return a_os;
62  }
63 
64 #include "implem/Proto_MBDataPointImplem.H"
65 } //end namespace Proto
66 #endif // end include guard
const Point & srcPoint() const
Definition: Proto_MBDataPoint.H:31
MBDataPoint & operator=(const MBDataPoint &a_rhs)=default
Multidimensional Rectangular Array.
Definition: Proto_BoxData.H:314
int BlockIndex
Defines what type is used for indexing block entities.
Definition: Proto_MBGraph.H:9
MBDataPoint()=default
BlockIndex m_dstBlock
Definition: Proto_MBDataPoint.H:54
Point m_srcPoint
Definition: Proto_MBDataPoint.H:50
const MBIndex & dstIndex() const
Definition: Proto_MBDataPoint.H:29
const Point & boundaryDir() const
Definition: Proto_MBDataPoint.H:34
const BlockIndex & dstBlock() const
Definition: Proto_MBDataPoint.H:30
BoxData< T, C, MEM > & dstPatch(MBLevelBoxData< T, C, MEM, CTR > &a_data) const
Definition: Proto_MBDataPoint.H:117
BlockIndex m_srcBlock
Definition: Proto_MBDataPoint.H:53
Multiblock Level Box Data.
Definition: Proto_MBLevelBoxData.H:17
const BlockIndex & srcBlock() const
Definition: Proto_MBDataPoint.H:33
bool operator==(const MBDataPoint &a_rhs) const
Definition: Proto_MBDataPoint.H:92
Point m_boundaryDir
Definition: Proto_MBDataPoint.H:55
const MBIndex & srcIndex() const
Definition: Proto_MBDataPoint.H:32
MBIndex m_srcIndex
Definition: Proto_MBDataPoint.H:49
static ACCEL_DECORATION Point Zeros()
Get Zeros.
Definition: Proto_Array.H:17
BoxData< T, C, MEM > & srcPatch(MBLevelBoxData< T, C, MEM, CTR > &a_data) const
Definition: Proto_MBDataPoint.H:123
Point m_dstPoint
Definition: Proto_MBDataPoint.H:51
bool inBoundary() const
Definition: Proto_MBDataPoint.H:27
std::ostream & operator<<(std::ostream &stream, const Array< T, N > &arr)
Ostream operator.
Integer Valued Vector.
Definition: Proto_Point.H:24
Definition: Proto_MBDisjointBoxLayout.H:14
bool operator<(const MBDataPoint &a_rhs) const
Definition: Proto_MBDataPoint.H:68
const Point & dstPoint() const
Definition: Proto_MBDataPoint.H:28
MBDataPoint shift(Point a_dstShift, const MBDisjointBoxLayout &a_layout) const
Definition: Proto_MBDataPoint.H:53
MBIndex m_dstIndex
Definition: Proto_MBDataPoint.H:48
Definition: Proto_MBDataPoint.H:10