Chombo + EB  3.0
LoHiCenter.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
8  */
9 #endif
10
11 #ifndef _LOHICENTER_H_
12 #define _LOHICENTER_H_
13
14 #include "Box.H"
15 #include "ProblemDomain.H"
17
18 ///
19 /**
20  This function is used when in direction a_dir a 3-point stencil of
21  cell-centered data is being used to compute something at the
22  center of the central cell of the stencil.
23
24  Inputs:
25  * a_dir is the direction of the 3-point stencil;
26  * a_inBox is the cell-centered box on which we are to compute a
27  stencil (2-point or 3-point), expanded by 1 in a_dir direction,
28  and not intersected with the domain;
29  * a_domain is the problem domain.
30
31  Output boxes are all cell-centered subboxes of a_inBox and
32  are also contained in a_domain:
33  * a_loBox is where a 2-point stencil must be used on the low side;
34  * a_centerBox is where the full 3-point stencil can be used;
35  * a_hiBox is where a 2-point stencil must be used on the high side;
36  * a_entireBox is the union of a_loBox and a_centerBox and a_hiBox.
37
38  The boxes a_loBox and a_hiBox will be at most 1 cell wide;
39  here the 2-point stencil consists of a cell from this box and
40  the neighboring cell from a_centerBox in direction a_dir.
41
42  a_entireBox will be a_inBox with one layer of cells removed
43  from both sides in dimension a_dir.
44
45  Output flags:
46  * a_hasLo: 1 or 0, according to whether a_loBox is defined or not;
47  * a_hasHi: 1 or 0, according to whether a_hiBox is defined or not.
48  */
49 extern void loHiCenter(Box& a_loBox,
50  int& a_hasLo,
51  Box& a_hiBox,
52  int& a_hasHi,
53  Box& a_centerBox,
54  Box& a_entireBox,
55  const Box& a_inBox,
56  const ProblemDomain& a_domain,
57  const int& a_dir);
58
59 ///
60 /**
61  This function is used when in direction a_dir a 2-point stencil of
62  cell-centered data is being used to compute something at the
63  face between cells of the stencil.
64
65  Inputs:
66  * a_dir is the direction of the 2-point stencil;
67  * a_inBox is the cell-centered box (on whose faces we are to
68  compute a stencil), expanded by 1 in a_dir direction, and not
69  intersected with the domain.
70  * a_domain is the problem domain.
71
72  Output boxes are all face-centered subboxes of the faces of a_inBox
73  in direction a_dir, and are also contained in the faces of a_domain:
74  * a_loBox is where a 1-point stencil must be used on the low side;
75  * a_centerBox is where the full 2-point stencil can be used;
76  * a_hiBox is where a 1-point stencil must be used on the high side;
77  * a_entireBox is the union of a_loBox and a_centerBox and a_hiBox.
78
79  The boxes a_loBox and a_hiBox will be at most 1 face wide;
80  here the 1-point stencil consists of only 1 of the adjacent cells
81  in direction a_dir.
82
83  Output flags:
84  * a_hasLo: 1 or 0, according to whether a_loBox is defined or not;
85  * a_hasHi: 1 or 0, according to whether a_hiBox is defined or not.
86  */
87 extern void loHiCenterFace(Box& a_loBox,
88  int& a_hasLo,
89  Box& a_hiBox,
90  int& a_hasHi,
91  Box& a_centerBox,
92  Box& a_entireBox,
93  const Box& a_inBox,
94  const ProblemDomain& a_domain,
95  const int& a_dir);
96
97
98
99 ///
100 /**
101  This function is used when in direction a_dir a 4-point stencil of
102  cell-centered data is being used to compute something at the
103  face between cells of the stencil.
104
105  Inputs:
106  * a_dir is the direction of the 4-point stencil;
107  * a_inBox is the cell-centered box on which we have data;
108  * a_domain is the problem domain.
109
110  Output boxes are all face-centered subboxes of the faces of a_inBox
111  in direction a_dir, and are also contained in the faces of a_domain:
112  * a_loBox is where a stencil must be used on the low side
113  with all four points higher;
114  * a_nextLoBox is where a stencil must be used on the low side
115  with one point lower and three points higher;
116  * a_hiBox is where a stencil must be used on the high side
117  with all four points lower;
118  * a_nextHiBox is where a stencil must be used on the high side
119  with one point higher and three points lower;
120  * a_centerBox is union of a_innerCenterBox, a_nextLoBox, and a_nextHiBox,
121  where the regular 2-point stencil can be used;
122  * a_innerCenterBox is where the regular 4-point stencil can be used;
123  * a_entireBox is the union of a_(lo|nextLo|center|hi|nextHi)Box.
124
125  Each of the boxes a_loBox, a_nextLoBox, a_hiBox, a_nextHiBox
126  will be at most 1 face wide.
127
128  a_loBox and a_nextLoBox will both be defined or both be undefined.
129  a_hiBox and a_nextHiBox will both be defined or both be undefined.
130
131  Output flags:
132  * a_hasLo: 1 or 0, according to whether a_loBox and a_nextLoBox
133  are defined or not;
134  * a_hasHi: 1 or 0, according to whether a_hiBox and a_nextHiBox
135  are defined or not.
136  */
137 extern void loHiCenterFace4(Box& a_loBox,
138  Box& a_nextLoBox,
139  int& a_hasLo,
140  Box& a_hiBox,
141  Box& a_nextHiBox,
142  int& a_hasHi,
143  Box& a_centerBox,
144  Box& a_innerCenterBox,
145  Box& a_entireBox,
146  const Box& a_inBox,
147  const ProblemDomain& a_domain,
148  const int& a_dir);
149
150
151 ///
152 /**
153  This function is used when in direction a_dir a 5-point stencil of
154  cell-centered data is being used to compute something at the
155  center of the central cell of the stencil.
156
157  Inputs:
158  * a_dir is the direction of the 5-point stencil;
159  * a_inBox is the cell-centered box on which we are to compute a
160  stencil (2-point or 3-point or 5-point), expanded by 1 in a_dir direction,
161  and not intersected with the domain;
162  * a_domain is the problem domain.
163
164  Output boxes are all cell-centered subboxes of a_inBox and
165  are also contained in a_domain:
166  * a_loBox is where a 2-point stencil must be used on the low side;
167  * a_nextLoBox is where a 3-point stencil must be used on the low side
168  with one point lower and three points higher;
169  * a_hiBox is where a 2-point stencil must be used on the high side;
170  * a_nextHiBox is where a 3-point stencil must be used on the high side
171  with one point higher and three points lower;
172  * a_centerBox is union of a_innerCenterBox, a_nextLoBox, and a_nextHiBox,
173  where a 3-point stencil may be used;
174  * a_innerCenterBox is where the regular 5-point stencil can be used;
175  where a 5-point stencil may be used;
176  * a_entireBox is the union of a_(lo|nextLo|center|hi|nextHi)Box.
177
178  Each of the boxes a_loBox, a_nextLoBox, a_hiBox, a_nextHiBox
179  will be at most 1 cell wide.
180
181  a_loBox and a_nextLoBox will both be defined or both be undefined.
182  a_hiBox and a_nextHiBox will both be defined or both be undefined.
183
184  Output flags:
185  * a_hasLo: 1 or 0, according to whether a_loBox and a_nextLoBox
186  are defined or not;
187  * a_hasHi: 1 or 0, according to whether a_hiBox and a_nextHiBox
188  are defined or not.
189  */
190 extern void loHiCenter5(Box& a_loBox,
191  Box& a_nextLoBox,
192  int& a_hasLo,
193  Box& a_hiBox,
194  Box& a_nextHiBox,
195  int& a_hasHi,
196  Box& a_centerBox,
197  Box& a_innerCenterBox,
198  Box& a_entireBox,
199  const Box& a_inBox,
200  const ProblemDomain& a_domain,
201  const int& a_dir);
202
203 #include "NamespaceFooter.H"
204 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
void loHiCenter5(Box &a_loBox, Box &a_nextLoBox, int &a_hasLo, Box &a_hiBox, Box &a_nextHiBox, int &a_hasHi, Box &a_centerBox, Box &a_innerCenterBox, Box &a_entireBox, const Box &a_inBox, const ProblemDomain &a_domain, const int &a_dir)
void loHiCenterFace(Box &a_loBox, int &a_hasLo, Box &a_hiBox, int &a_hasHi, Box &a_centerBox, Box &a_entireBox, const Box &a_inBox, const ProblemDomain &a_domain, const int &a_dir)
void loHiCenter(Box &a_loBox, int &a_hasLo, Box &a_hiBox, int &a_hasHi, Box &a_centerBox, Box &a_entireBox, const Box &a_inBox, const ProblemDomain &a_domain, const int &a_dir)
void loHiCenterFace4(Box &a_loBox, Box &a_nextLoBox, int &a_hasLo, Box &a_hiBox, Box &a_nextHiBox, int &a_hasHi, Box &a_centerBox, Box &a_innerCenterBox, Box &a_entireBox, const Box &a_inBox, const ProblemDomain &a_domain, const int &a_dir)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465