Chombo + EB + MF  3.2
MFAMRDataOps.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 _MFAMRDATAOPS_H_
12 #define _MFAMRDATAOPS_H_
13 
14 #include "MFLevelDataOps.H"
15 #include "MFIndexSpace.H"
16 
17 #include "FaceIterator.H"
18 // #include "EBCoarseAverage.H"
19 // #include "EBCoarsen.H"
20 
21 #include "EBIndexSpace.H"
22 #include "EBAMRIO.H"
23 #include "EBLevelGrid.H"
24 #include "NamespaceHeader.H"
25 
26 ///
27 /**
28  Repository of functions for MF Hierarchies.
29  */
31 {
32 public:
34  {
35  }
36 
38  {
39  }
40 
41  ///
42  /**
43  */
44  static void setCoveredAMRVal(Vector<LevelData<MFCellFAB>* >& a_data,
45  const Vector< Vector<EBISLayout> >& a_ebislv,
46  const Vector<int>& a_refRat,
47  const Real& a_value);
48 
49  static void setCoveredAMRVal(Vector<LevelData<MFCellFAB>* >& a_data,
50  const Vector< Vector<EBLevelGrid> >& a_eblg,
51  const Vector<int>& a_refRat,
52  const Real& a_value);
53 
54  ///
55  /**
56  */
57  static void setCoveredVal(Vector<LevelData<MFCellFAB>* >& a_data,
58  const Real& a_value);
59 
60  ///
61  /**
62  */
63  static void scale(Vector<LevelData<MFCellFAB>* >& a_lhs,
64  const Real& a_scale) ;
65 
66 
67  ///
68  /**
69  */
70  static void scale(Vector<LevelData<MFCellFAB>* >& a_lhs,
71  const Real& a_scale,
72  const int& a_comp);
73 
74 
75  ///
76  /**
77  */
78  static void setToZero(Vector<LevelData<MFCellFAB>* >& a_result);
79 
80 
81  ///
82  /**
83  */
84  static void setVal(Vector<LevelData<MFCellFAB>* >& a_result,
85  const Real& a_value);
86 
87 
88  ///
89  /**
90  */
91  static void setVal(Vector<LevelData<MFCellFAB>* >& a_result,
92  const Real& a_value,
93  const int& a_comp);
94 
95  ///
96  /**
97  */
98  static void assign(Vector<LevelData<MFCellFAB>* >& a_lhs,
99  const Vector<LevelData<MFCellFAB>* >& a_rhs);
100 
101  ///
102  /**
103  */
104  static void assign(Vector<RefCountedPtr<LevelData<MFCellFAB> > >& a_lhs,
105  const Vector<LevelData<MFCellFAB>* >& a_rhs);
106 
107  ///
108  /**
109  */
110  static void assign(Vector<LevelData<MFCellFAB>* >& a_to,
111  const Vector<LevelData<MFCellFAB>* >& a_from,
112  const Interval& a_toInterval,
113  const Interval& a_fromInterval);
114 
115  ///
116  /**
117  */
118  static void assign(Vector<RefCountedPtr<LevelData<MFCellFAB> > >& a_to,
119  const Vector<LevelData<MFCellFAB>* >& a_from,
120  const Interval& a_toInterval,
121  const Interval& a_fromInterval);
122 
123  ///
124  /**
125  */
126  static void incr(Vector<LevelData<MFCellFAB>* >& a_lhs,
127  const Vector<LevelData<MFCellFAB>* >& a_rhs,
128  const Real& a_scale);
129 
130  ///
131  /**
132  */
133  static void incr(Vector<LevelData<MFCellFAB>* >& a_lhs,
134  const Real& a_scale);
135 
136  ///
137  /**
138  */
139  static void axby(Vector<LevelData<MFCellFAB>* >& a_lhs,
140  const Vector<LevelData<MFCellFAB>* >& a_x,
141  const Vector<LevelData<MFCellFAB>* >& a_y,
142  const Real& a,
143  const Real& b);
144 
145 
146  ///
147  /**
148  */
149  static void axby(Vector<LevelData<MFCellFAB>* >& a_lhs,
150  const Vector<LevelData<MFCellFAB>* >& a_x,
151  const Vector<LevelData<MFCellFAB>* >& a_y,
152  const Real& a_a,
153  const Real& a_b,
154  const int& a_lhsComp,
155  const int& a_xComp,
156  const int& a_yComp);
157 
158  ///
159  /**
160  */
161  static void sum(Vector<LevelData<MFCellFAB>* >& a_result,
162  const Vector<LevelData<MFCellFAB>* >& a_in1,
163  const Vector<LevelData<MFCellFAB>* >& a_in2);
164 
165  ///
166  /**
167  */
168  static void addConstant(Vector<LevelData<MFCellFAB>* >& a_data,
169  const Real& a_constant);
170 
171  ///
172  /**
173  */
174  static void product(Vector<LevelData<MFCellFAB>* >& a_result,
175  const Vector<LevelData<MFCellFAB>* >& a_in1,
176  const Vector<LevelData<MFCellFAB>* >& a_in2);
177 
178 
179  ///
180  /**
181  */
182  static void product(Vector<LevelData<MFCellFAB>* >& a_result,
183  const Vector<LevelData<MFCellFAB>* >& a_in1,
184  const Vector<LevelData<MFCellFAB>* >& a_in2,
185  const int& a_rComp,
186  const int& a_1Comp,
187  const int& a_2Comp);
188 
189  ///
190  /**
191  */
192  static void divideVectorByScalar(Vector<LevelData<MFCellFAB>* >& a_vectorOut,
193  const Vector<LevelData<MFCellFAB>* >& a_vectorIn,
194  const Vector<LevelData<MFCellFAB>* >& a_scalar);
195 
196  ///
197  /**
198  */
199  static void divide(Vector<LevelData<MFCellFAB>* >& a_result,
200  const Vector<LevelData<MFCellFAB>* >& a_in1,
201  const Vector<LevelData<MFCellFAB>* >& a_in2);
202 
203 
204  ///
205  /**
206  */
207  static void divide(Vector<LevelData<MFCellFAB>* >& a_result,
208  const Vector<LevelData<MFCellFAB>* >& a_in1,
209  const Vector<LevelData<MFCellFAB>* >& a_in2,
210  const int& a_rComp,
211  const int& a_1Comp,
212  const int& a_2Comp);
213 
214  ///
215  /**
216  */
217  static void kappaWeight(Vector<LevelData<MFCellFAB>* >& a_data);
218 
219 
220  ///
221  /**
222  */
223  static void kappaScale(Vector<LevelData<MFCellFAB>* >& a_data,
224  const Real& a_scale);
225 
226  ///
227  /**
228  */
230  const Vector<DisjointBoxLayout>& a_grids,
231  const Vector< Vector<EBISLayout> >& a_ebislv,
232  const Vector<int>& a_refRat);
233 
235  const Vector< Vector<EBLevelGrid> >& a_eblg,
236  const Vector<int>& a_refRat);
237 
238 
239 protected:
240 
241 };
242 #include "NamespaceFooter.H"
243 #endif
static void assign(Vector< LevelData< MFCellFAB > * > &a_lhs, const Vector< LevelData< MFCellFAB > * > &a_rhs)
A reference-counting handle class.
Definition: RefCountedPtr.H:173
static void divideVectorByScalar(Vector< LevelData< MFCellFAB > * > &a_vectorOut, const Vector< LevelData< MFCellFAB > * > &a_vectorIn, const Vector< LevelData< MFCellFAB > * > &a_scalar)
one dimensional dynamic array
Definition: Vector.H:53
static void setCoveredAMRVal(Vector< LevelData< MFCellFAB > * > &a_data, const Vector< Vector< EBISLayout > > &a_ebislv, const Vector< int > &a_refRat, const Real &a_value)
static void kappaWeight(Vector< LevelData< MFCellFAB > * > &a_data)
Definition: MFAMRDataOps.H:30
static void setVal(Vector< LevelData< MFCellFAB > * > &a_result, const Real &a_value)
Structure for passing component ranges in code.
Definition: Interval.H:23
double Real
Definition: REAL.H:33
static void setCoveredVal(Vector< LevelData< MFCellFAB > * > &a_data, const Real &a_value)
static Real subtractOffMean(Vector< LevelData< MFCellFAB > * > &a_data, const Vector< DisjointBoxLayout > &a_grids, const Vector< Vector< EBISLayout > > &a_ebislv, const Vector< int > &a_refRat)
static void axby(Vector< LevelData< MFCellFAB > * > &a_lhs, const Vector< LevelData< MFCellFAB > * > &a_x, const Vector< LevelData< MFCellFAB > * > &a_y, const Real &a, const Real &b)
~MFAMRDataOps()
Definition: MFAMRDataOps.H:37
MFAMRDataOps()
Definition: MFAMRDataOps.H:33
static void addConstant(Vector< LevelData< MFCellFAB > * > &a_data, const Real &a_constant)
static void divide(Vector< LevelData< MFCellFAB > * > &a_result, const Vector< LevelData< MFCellFAB > * > &a_in1, const Vector< LevelData< MFCellFAB > * > &a_in2)
static void scale(Vector< LevelData< MFCellFAB > * > &a_lhs, const Real &a_scale)
static void sum(Vector< LevelData< MFCellFAB > * > &a_result, const Vector< LevelData< MFCellFAB > * > &a_in1, const Vector< LevelData< MFCellFAB > * > &a_in2)
static void incr(Vector< LevelData< MFCellFAB > * > &a_lhs, const Vector< LevelData< MFCellFAB > * > &a_rhs, const Real &a_scale)
static void product(Vector< LevelData< MFCellFAB > * > &a_result, const Vector< LevelData< MFCellFAB > * > &a_in1, const Vector< LevelData< MFCellFAB > * > &a_in2)
static void setToZero(Vector< LevelData< MFCellFAB > * > &a_result)
static void kappaScale(Vector< LevelData< MFCellFAB > * > &a_data, const Real &a_scale)