Chombo + EB  3.2
RegionGather.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 
12 // RegionGather
13 // bvs, 05/26/06
14 
15 #ifndef _REGIONGATHER_H_
16 #define _REGIONGATHER_H_
17 
18 #include "IntVect.H"
19 #include "REAL.H"
20 #include "LayoutData.H"
21 #include "DisjointBoxLayout.H"
22 #include "ProblemDomain.H"
23 #include <list>
24 #include "SPMD.H"
25 #include "CH_Timer.H"
26 #include "NamespaceHeader.H"
27 
28 
29 /// return object for the regionGather function
30 template <class T>
32 {
33 public:
36 };
37 
38 
39 /// Data coordination class for the regionGather function
40 /**
41  Currently, this class does not handle periodic ProblemDomain.
42 
43 
44  the radius is a distance cut-off for the gathering operation. An object T will
45  be gathered from a neighbouring Box in the DisjointBoxLayout only if:
46 
47  a = IntVect at center of box 1
48  b = IntVect at center of box 2
49 
50  abs(a[i]-b[i]) <= radius for all i
51 */
53 {
54 public:
55  RegionGather();
56 
57  void define(const ProblemDomain& a_domain,
58  const DisjointBoxLayout& a_layout,
59  int radius);
60 
61  void dump() const;
62 
63  class Message
64  {
65  public:
67  int src, dest;
70  int procID;
71  bool operator < (const RegionGather::Message& rhs) const;
72  };
73 
74 
77 
78 
79 };
80 
81 /// Function performs a distance cut-off gather operation
82 /**
83  the input a_local contains a value of T for every Box in the BoxLayout.
84 
85  the output a_gatherObjects contains all the T objects within the constraints
86  established by the RegionGather object, and the center seperation of their
87  respective Boxes.
88 */
89 template <class T>
90 void regionGather(const LayoutData<T>& a_local,
91  const RegionGather& a_copier,
92  LayoutData<Vector<GatherObject<T> > >& a_gatherObjects);
93 
94 
95 #include "RegionGatherI.H"
96 
97 #include "NamespaceFooter.H"
98 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
void regionGather(const LayoutData< T > &a_local, const RegionGather &a_copier, LayoutData< Vector< GatherObject< T > > > &a_gatherObjects)
Function performs a distance cut-off gather operation.
Definition: RegionGatherI.H:42
T m_value
Definition: RegionGather.H:35
DataIndex srcIndex
Definition: RegionGather.H:68
one dimensional dynamic array
Definition: Vector.H:53
Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout.
Definition: BoxLayout.H:26
Definition: RegionGather.H:63
DataIndex destIndex
Definition: RegionGather.H:69
IntVect m_offset
Definition: RegionGather.H:34
LayoutData< Vector< RegionGather::Message > > m_local
Definition: RegionGather.H:76
bool operator<(const FaceIndex &f1, const FaceIndex &f2)
Definition: FaceIndex.H:212
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
Definition: DataIndex.H:112
Data coordination class for the regionGather function.
Definition: RegionGather.H:52
return object for the regionGather function
Definition: RegionGather.H:31
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
int src
Definition: RegionGather.H:67
IntVect distance
Definition: RegionGather.H:66
LayoutData< Vector< RegionGather::Message > > m_messages
Definition: RegionGather.H:75
int procID
Definition: RegionGather.H:70