Chombo + EB  3.2
CornerCopier.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 _CORNERCOPIER_H_
12 #define _CORNERCOPIER_H_
13 
14 #include "DisjointBoxLayout.H"
15 #include "Pool.H"
16 #include "Vector.H"
17 #include "ProblemDomain.H"
18 #include "Copier.H"
19 #include "NamespaceHeader.H"
20 
21 
22 /// An even stranger (than Copier) thing to copy from ghost cells to corner ghost cells.
23 /**
24  This is a specialized Copier to fill corner ghost cells from ghost
25  cells of adjacent boxes. Calling exchange with this copier will
26  fill _only_ the corner ghost cells. All other exchange operations
27  should be performed by calling a separate exchange with a normal
28  Copier.
29 */
30 
31 class CornerCopier: public Copier
32 {
33 public:
34 
35  ///null constructor, copy constructor and operator= can be compiler defined.
37  {
39  }
40 
41  /// Basic defining constructor
42  /** Note that this constructor doesn't take a ghost cell argument,
43  so it creates a useless CornerCopier (no intersections are computed).
44  Provided for compatibility with Copier base class.
45  */
46  CornerCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
47  bool a_exchange = false);
48 
49  /// this constructor contains support for periodic BC's
50  /** Note that this constructor doesn't take a ghost cell argument,
51  so it creates a useless CornerCopier (no intersections are computed).
52  Provided for compatibility with Copier base class.
53  */
54  CornerCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
55  const ProblemDomain& a_domain,
56  bool a_exchange = false);
57 
58  /// Copier to copy into corner ghost cells of a_dest from ghost cells of a_level
59  /** Assumption is that a_dest and a_level have the same number of
60  ghost cells.
61  */
62  CornerCopier(const DisjointBoxLayout& a_level,
63  const BoxLayout& a_dest,
64  const IntVect& a_ghost,
65  bool a_exchange = false);
66 
67  /// Copier to copy data into the valid and invalid regions of a_dest from a_level with support for periodic BCs
68  /** Assumption is that a_dest and a_level have the same number of
69  ghost cells.
70  */
71  CornerCopier(const DisjointBoxLayout& a_level,
72  const BoxLayout& a_dest,
73  const ProblemDomain& a_domain,
74  const IntVect& a_ghost,
75  bool a_exchange = false);
76 
77  ///
78  virtual ~CornerCopier();
79 
80  /// define to match constructor (also doesn't do anything)
81  virtual void define(const DisjointBoxLayout& a_level,
82  const BoxLayout& a_dest,
83  bool a_exchange = false);
84 
85  /// define to match constructor (also doesn't do anything)
86  virtual void define(const DisjointBoxLayout& a_level,
87  const BoxLayout& a_dest,
88  const ProblemDomain& a_domain,
89  bool a_exchange = false);
90 
91  ///
92  virtual void define(const DisjointBoxLayout& a_level,
93  const BoxLayout& a_dest,
94  const IntVect& a_ghost,
95  bool a_exchange = false);
96 
97  /// contains support for periodic BCs
98  virtual void define(const BoxLayout& a_level,
99  const BoxLayout& a_dest,
100  const ProblemDomain& a_domain,
101  const IntVect& a_ghost,
102  bool a_exchange = false);
103 
104  ///
105  virtual void clear();
106 
107  const IntVect& ghost()
108  {
109  return m_ghost;
110  }
111 
112 protected:
113 
114 private:
115 
117 };
118 
119 std::ostream& operator<<(std::ostream& os, const CornerCopier& copier);
120 
121 
122 #include "NamespaceFooter.H"
123 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
CornerCopier()
null constructor, copy constructor and operator= can be compiler defined.
Definition: CornerCopier.H:36
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:145
A strange but true thing to make copying from one boxlayoutdata to another fast.
Definition: Copier.H:145
virtual ~CornerCopier()
static const IntVect Unit
Definition: IntVect.H:659
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
const IntVect & ghost()
Definition: CornerCopier.H:107
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
std::ostream & operator<<(std::ostream &os, const CornerCopier &copier)
An even stranger (than Copier) thing to copy from ghost cells to corner ghost cells.
Definition: CornerCopier.H:31
IntVect m_ghost
Definition: CornerCopier.H:116
virtual void define(const DisjointBoxLayout &a_level, const BoxLayout &a_dest, bool a_exchange=false)
define to match constructor (also doesn&#39;t do anything)
virtual void clear()