Chombo + EB  3.0
EBAMRDataOps.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 _EBAMRDATAOPS_H_
12 #define _EBAMRDATAOPS_H_
13 
14 #include "EBLevelDataOps.H"
15 #include "FaceIterator.H"
16 #include "EBFluxFAB.H"
17 #include "EBCoarseAverage.H"
18 #include "EBCoarsen.H"
19 #include "EBQuadCFInterp.H"
20 #include "EBPWLFillPatch.H"
21 #include "EBIndexSpace.H"
22 #include "EBAMRIO.H"
23 #include "EBLevelGrid.H"
24 #include "NamespaceHeader.H"
25 
26 #define EBAMRDATAOPS_INTERIORREGVOFS 0x1
27 #define EBAMRDATAOPS_BOUNDARYREGVOFS 0x2
28 #define EBAMRDATAOPS_INTERIORIRREGVOFS 0x4
29 #define EBAMRDATAOPS_BOUNDARYIRREGVOFS 0x8
30 
31 #define EBAMRDATAOPS_ALLVOFS (EBAMRDATAOPS_INTERIORREGVOFS | \
32  EBAMRDATAOPS_BOUNDARYREGVOFS | \
33  EBAMRDATAOPS_INTERIORIRREGVOFS | \
34  EBAMRDATAOPS_BOUNDARYIRREGVOFS )
35 
36 #define EBAMRDATAOPS_REGULARVOFS (EBAMRDATAOPS_INTERIORREGVOFS | \
37  EBAMRDATAOPS_BOUNDARYREGVOFS )
38 
39 #define EBAMRDATAOPS_IRREGULARVOFS (EBAMRDATAOPS_INTERIORIRREGVOFS | \
40  EBAMRDATAOPS_BOUNDARYIRREGVOFS )
41 
42 #define EBAMRDATAOPS_BOUNDARYVOFS (EBAMRDATAOPS_BOUNDARYREGVOFS | \
43  EBAMRDATAOPS_IRREGULARVOFS )
44 ///
45 /**
46  Repository of functions for EB Hierarchies.
47  */
49 {
50 public:
52  {
53  }
54 
55  ///
56  /**
57  If you want averaging to be sum (kappaf*phic) = kappac*phic, set
58  a_kappaMultipliedIn to be false,
59  If you want simple averaging, set it to be true.
60  Simply put, false is for phi, true is for kappa Lapl(phi).
61  */
62  static void
64  const Vector< LevelData<EBCellFAB>* >& a_solnCoar,
65  const Vector< DisjointBoxLayout >& a_gridsCoar,
66  const Vector< EBISLayout >& a_ebislCoar,
67  const ProblemDomain& a_level0DomainCoar,
68  const Vector< LevelData<EBCellFAB>* >& a_solnFine,
69  const Vector< DisjointBoxLayout >& a_gridsFine,
70  const Vector< EBISLayout >& a_ebislFine,
71  const ProblemDomain& a_level0DomainFine,
72  const Vector<int>& a_refRat,
73  bool a_kappaAlreadyMultipliedIn = false);
74 
75 
76  ///
77  /**
78  If you want averaging to be sum (kappaf*phic) = kappac*phic, set
79  a_kappaMultipliedIn to be false,
80  If you want simple averaging, set it to be true.
81  Simply put, false is for phi, true is for kappa Lapl(phi).
82  */
83  static void
85  const LevelData<EBCellFAB>& a_solnCoar,
86  const DisjointBoxLayout & a_gridsCoar,
87  const EBISLayout & a_ebislCoar,
88  const ProblemDomain& a_level0DomainCoar,
89  const LevelData<EBCellFAB>& a_solnFine,
90  const DisjointBoxLayout & a_gridsFine,
91  const EBISLayout & a_ebislFine,
92  const ProblemDomain& a_level0DomainFine,
93  bool a_kappaAlreadyMultipliedIn = false);
94 
96  {
97  }
98 
99  ///
100  /**
101  count vofs, boxes, regular cells, etc.
102  */
103  static int countVoF(const Vector<DisjointBoxLayout>& a_dbl,
104  const Vector<EBISLayout>& a_ebisl,
105  const Vector<ProblemDomain>& a_domain);
106 
107  ///
108  /**
109  average a cell centered velocity vector (with SpaceDim components) to face centers
110  */
111  static void averageCellToFacesMAC(Vector<LevelData<EBFluxFAB>* >& a_dataFlux,
112  const Vector<LevelData<EBCellFAB>* >& a_dataCell,
113  const Vector<EBLevelGrid>& a_eblg,
114  const Vector<int>& a_refRatio);
115 
116 
117  ///
118  /**
119  average cell centered data to all face centers for component a_comp
120  */
121  static void averageCellToFaces(Vector<LevelData<EBFluxFAB>* >& a_dataFlux,
122  const Vector<LevelData<EBCellFAB>* >& a_dataCell,
123  const Vector<EBLevelGrid>& a_eblg,
124  const Vector<int>& a_refRatio,
125  const int& a_comp);
126 
127  ///
128  /**
129  average cell centered data to all face centers for component a_comp
130  */
131  static void averageCellToFaces(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_dataFlux,
132  const Vector<LevelData<EBCellFAB>* >& a_dataCell,
133  const Vector<EBLevelGrid>& a_eblg,
134  const Vector<int>& a_refRatio,
135  const int& a_comp);
136 
137 
138  ///
139  /**
140  */
141  static void quadCFInterpAll(Vector<LevelData<EBCellFAB>* >& a_data,
142  const Vector<DisjointBoxLayout>& a_dbl,
143  const Vector<EBISLayout>& a_ebisl,
144  const Vector<ProblemDomain>& a_domain,
145  const Vector<int>& a_refRatio);
146 
147  ///
148  /**
149  */
150  static void quadCFInterpAll(Vector<LevelData<EBCellFAB>* >& a_data,
151  const Vector<EBLevelGrid>& a_eblg,
152  const Vector<int>& a_refRatio);
153 
154 
155  ///
156  /**
157  */
158  static void quadCFInterpOne(Vector<LevelData<EBCellFAB>* >& a_data,
159  const Vector<EBLevelGrid>& a_eblg,
160  const Vector<int>& a_refRatio,
161  const int& a_fineLevel);
162 
163  ///
164  /**
165  */
166  static void quadCFInterpOne(Vector<LevelData<EBCellFAB>* >& a_data,
167  const Vector<DisjointBoxLayout>& a_dbl,
168  const Vector<EBISLayout>& a_ebisl,
169  const Vector<ProblemDomain>& a_domain,
170  const Vector<int>& a_refRatio,
171  const int& a_fineLevel);
172 
173 
174  ///
175  /**
176  */
177  static void quadCFInterpOne(LevelData<EBCellFAB>& a_dataFine,
178  const LevelData<EBCellFAB>& a_dataCoar,
179  const DisjointBoxLayout& a_dblFine,
180  const DisjointBoxLayout& a_dblCoar,
181  const EBISLayout& a_ebislFine,
182  const EBISLayout& a_ebislCoar,
183  const ProblemDomain& a_domainCoar,
184  const int& a_refRatio);
185 
186 
187  ///
188  /**
189  */
190  static void pwlFillPatchAll(Vector<LevelData<EBCellFAB>* >& a_data,
191  const Vector<EBLevelGrid>& a_eblg,
192  const Vector<int>& a_refRatio);
193  ///
194  /**
195  */
196  static void pwlFillPatchAll(Vector<LevelData<EBCellFAB>* >& a_data,
197  const Vector<DisjointBoxLayout>& a_dbl,
198  const Vector<EBISLayout>& a_ebisl,
199  const Vector<ProblemDomain>& a_domain,
200  const Vector<int>& a_refRatio);
201 
202 
203  ///
204  /**
205  */
206  static void pwlFillPatchOne(LevelData<EBCellFAB>& a_dataFine,
207  LevelData<EBCellFAB>& a_dataCoar,
208  const DisjointBoxLayout& a_dblFine,
209  const DisjointBoxLayout& a_dblCoar,
210  const EBISLayout& a_ebislFine,
211  const EBISLayout& a_ebislCoar,
212  const ProblemDomain& a_domainCoar,
213  const int& a_refRatioCoar);
214 
215 
216 
217 
218 
219  ///
220  /**
221  */
222  static void exchangeAll(Vector<LevelData<EBCellFAB>* >& a_phi);
223 
224  ///
225  /**
226  */
227  static void exchangeCorners(Vector<LevelData<EBCellFAB>* >& a_data,
228  const ProblemDomain& a_domain);
229 
230  ///
231  /**
232  */
233  static void exchangeComp(Vector<LevelData<EBCellFAB>* >& a_data,
234  const int& a_comp);
235 
236 
237  ///
238  /**
239  */
240  static void exchangeAll(Vector<LevelData<EBFluxFAB>* >& a_phi);
241 
242 
243  ///
244  /**
245  */
246  static void exchangeComp(Vector<LevelData<EBFluxFAB>* >& a_data,
247  const int& a_comp);
248 
249 
250  ///
251  /**
252  */
253  static void exchangeAll(Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_phi);
254 
255 
256  ///
257  /**
258  */
259  static void exchangeComp(Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_data,
260  const int& a_comp);
261 
262 
263  ///
264  /**
265  */
266  static void exchangeAll(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_phi);
267 
268 
269  ///
270  /**
271  */
272  static void exchangeComp(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_data,
273  const int& a_comp);
274 
275 
276  ///
277  /**
278  */
279  static void coarsenDown(Vector<LevelData<EBCellFAB>* >& a_data,
280  const Vector<EBLevelGrid>& a_eblg,
281  const Vector<int>& a_refRatio);
282 
283 
284  ///
285  /**
286  */
287  static void averageDown(Vector<LevelData<EBCellFAB>* >& a_data,
288  const Vector<EBISLayout>& a_ebisl,
289  const Vector<DisjointBoxLayout>& a_dbl,
290  const Vector<ProblemDomain>& a_domain,
291  const Vector<int>& a_refRatio);
292 
293  ///
294  /**
295  */
296  static void averageDown(Vector<LevelData<EBCellFAB>* >& a_data,
297  const Vector<EBLevelGrid>& a_eblg,
298  const Vector<int>& a_refRatio);
299 
300 
301  ///
302  /**
303  */
304  static void averageDown(LevelData<EBCellFAB>& a_dataCoar,
305  const LevelData<EBCellFAB>& a_dataFine,
306  const EBISLayout& a_ebislCoar,
307  const EBISLayout& a_ebislFine,
308  const DisjointBoxLayout& a_dblCoar,
309  const DisjointBoxLayout& a_dblFine,
310  const ProblemDomain& a_domainCoar,
311  const int& a_refRatio);
312 
313 
315  const Vector<EBLevelGrid>& a_eblg,
316  const Vector<int> & a_refRat);
317 
318  static void averageDown(Vector<LevelData<EBFluxFAB> * >& a_data,
319  const Vector<EBLevelGrid>& a_eblg,
320  const Vector<int>& a_refRatio);
321  ///
322  /**
323  */
324  static void averageDown(Vector<LevelData<EBFluxFAB>* >& a_data,
325  const Vector<EBISLayout>& a_ebisl,
326  const Vector<DisjointBoxLayout>& a_dbl,
327  const Vector<ProblemDomain>& a_domain,
328  const Vector<int>& a_refRatio);
329 
330 
331  ///
332  /**
333  */
334  static void averageDown(Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_data,
335  const Vector<EBISLayout>& a_ebisl,
336  const Vector<DisjointBoxLayout>& a_dbl,
337  const Vector<ProblemDomain>& a_domain,
338  const Vector<int>& a_refRatio);
339 
340 
341  ///
342  /**
343  */
344  static void averageDown(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_data,
345  const Vector<EBISLayout>& a_ebisl,
346  const Vector<DisjointBoxLayout>& a_dbl,
347  const Vector<ProblemDomain>& a_domain,
348  const Vector<int>& a_refRatio);
349 
350  ///
351  /**
352  */
353  static void averageDown(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_data,
354  const Vector<EBLevelGrid>& a_eblg,
355  const Vector<int>& a_refRatio);
356 
357 
358  ///
359  /**
360  */
361  static void setCoveredAMRVal(Vector<LevelData<EBCellFAB>* >& a_data,
362  const Vector<EBISLayout>& a_ebisl,
363  const Vector<int>& a_refRat,
364  const Real& a_value);
365 
366  static void setCoveredAMRVal(Vector<LevelData<EBCellFAB>* >& a_data,
367  const Vector<EBLevelGrid>& a_eblg,
368  const Vector<int>& a_refRat,
369  const Real& a_value);
370 
371 
372  ///
373  /**
374  */
375  static void setCoveredVal(Vector<LevelData<EBCellFAB>* >&a_data,
376  const Real& a_value);
377 
378 
379  ///
380  /**
381  */
382  static void deleteAMRData(Vector<LevelData<EBCellFAB>* >& a_amrData);
383 
384 
385  //! Defines every LevelData<EBCellFAB> object in the given AMR hierarchy using the given parameters.
386  static void defineAMRData(Vector<LevelData<EBCellFAB>* >& a_amrData,
387  const Vector<EBLevelGrid>& a_eblg,
388  const IntVect& a_ghosts,
389  const int& a_nComp,
390  const int& a_numLevels);
391 
392  //! Defines every LevelData<EBFluxFAB> object in the given AMR hierarchy using the given parameters.
393  static void defineAMRData(Vector<LevelData<EBFluxFAB>* >& a_amrData,
394  const Vector<EBLevelGrid>& a_eblg,
395  const IntVect& a_ghosts,
396  const int& a_nComp,
397  const int& a_numLevels);
398 
399 
400  //! Defines every LevelData<EBCellFAB> object in the given AMR hierarchy using the given parameters.
401  //! This version manipulates hierarchies that use RefCountedPtr objects instead of bare pointers.
402  static void defineAMRData(Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_amrData,
403  const Vector<EBLevelGrid>& a_eblg,
404  const IntVect& a_ghosts,
405  const int& a_nComp,
406  const int& a_numLevels);
407 
408 
409  //! Defines every LevelData<EBFluxFAB> object in the given AMR hierarchy using the given parameters.
410  //! This version manipulates hierarchies that use RefCountedPtr objects instead of bare pointers.
411  static void defineAMRData(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_amrData,
412  const Vector<EBLevelGrid>& a_eblg,
413  const IntVect& a_ghosts,
414  const int& a_nComp,
415  const int& a_numLevels);
416 
417 
418  //! Scales the AMR hierarchy of flux data \a a_lhs by the factor \a a_scale.
419  static void scale(Vector<LevelData<EBFluxFAB>* >& a_lhs,
420  const Real& a_scale) ;
421 
422 
423  //! Scales the AMR hierarchy of cell data \a a_lhs by the factor \a a_scale.
424  static void scale(Vector<LevelData<EBCellFAB>* >& a_lhs,
425  const Real& a_scale) ;
426 
427 
428  //! Applies a scale factor \a a_scale to a specific component \a a_comp of the AMR hierarchy
429  //! of cell data \a a_lhs.
430  static void scale(Vector<LevelData<EBCellFAB>* >& a_lhs,
431  const Real& a_scale,
432  const int& a_comp);
433 
434 
435  //! Sets every element in the AMR hierarchy of cell data \a a_result to zero.
436  static void setToZero(Vector<LevelData<EBCellFAB>* >& a_result);
437 
438 
439  //! Sets every element in the AMR hierarchy of cell data \a a_result to the value \a a_value.
440  static void setVal(Vector<LevelData<EBCellFAB>* >& a_result,
441  const Real& a_value);
442 
443 
444  //! Sets the given component \a a_comp in every element in the AMR hierarchy of cell data
445  //! \a a_result to the value \a a_value.
446  static void setVal(Vector<LevelData<EBCellFAB>* >& a_result,
447  const Real& a_value,
448  const int& a_comp);
449 
450 
451  //! Sets every element in the AMR hierarchy of flux data \a a_result to zero.
452  static void setToZero(Vector<LevelData<EBFluxFAB>* >& a_result);
453 
454 
455  //! Sets every element in the AMR hierarchy of flux data \a a_result to \a a_value.
456  static void setVal(Vector<LevelData<EBFluxFAB>* >& a_result,
457  const Real& a_value);
458 
459 
460  ///
461  /**
462  */
463  static void assign(Vector<LevelData<EBCellFAB>* >& a_lhs,
464  const Vector<LevelData<EBCellFAB>* >& a_rhs);
465 
466 
467  ///
468  /**
469  */
470  static void assign(Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_lhs,
471  const Vector<LevelData<EBCellFAB>* >& a_rhs);
472 
473 
474  ///
475  /**
476  */
477  static void assign(Vector<LevelData<EBFluxFAB>* >& a_lhs,
478  const Vector<LevelData<EBFluxFAB>* >& a_rhs);
479 
480 
481  ///
482  /**
483  */
484  static void assign(Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_lhs,
485  const Vector<LevelData<EBFluxFAB>* >& a_rhs);
486 
487 
488  ///
489  /**
490  */
491  static void assign(Vector<LevelData<EBCellFAB>* >& a_to,
492  const Vector<LevelData<EBCellFAB>* >& a_from,
493  const Interval& a_toInterval,
494  const Interval& a_fromInterval);
495 
496 
497  ///
498  /**
499  */
500  static void assign(Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_to,
501  const Vector<LevelData<EBCellFAB>* >& a_from,
502  const Interval& a_toInterval,
503  const Interval& a_fromInterval);
504 
505 
506  ///
507  /**
508  */
509  static void incr(Vector<LevelData<EBCellFAB>* >& a_lhs,
510  const Vector<LevelData<EBCellFAB>* >& a_rhs,
511  const Real& a_scale);
512 
513 
514 
515  ///
516  /**
517  */
518  static void incr(Vector<LevelData<EBCellFAB>* >& a_lhs,
519  const Real& a_scale);
520 
521 
522  //! Evaluates a linear combination of EBCellFAB data on an AMR hierarchy.
523  //! \a a_lhs := \a a * \a a_x + \a b * \a a_y.
524  //! \param a_lhs The hierarchy of LevelData into which the linear combination is placed.
525  //! \param a_x The first LevelData in the linear combination.
526  //! \param a_y The second LevelData in the linear combination.
527  //! \param a The first coefficient in the linear combination.
528  //! \param b The second coefficient in the linear combination.
529  static void axby(Vector<LevelData<EBCellFAB>* >& a_lhs,
530  const Vector<LevelData<EBCellFAB>* >& a_x,
531  const Vector<LevelData<EBCellFAB>* >& a_y,
532  const Real& a,
533  const Real& b);
534 
535 
536  //! Evaluates a linear combination of EBCellFAB data on an AMR hierarchy. This version
537  //! operates only on a given component of each LevelData.
538  //! \a a_lhs[\a a_lhsComp] := \a a * \a a_x[\a a_xComp] + \a b * \a a_y[\a a_yComp].
539  //! \param a_lhs The hierarchy of LevelData into which the linear combination is placed.
540  //! \param a_x The first LevelData in the linear combination.
541  //! \param a_y The second LevelData in the linear combination.
542  //! \param a The first coefficient in the linear combination.
543  //! \param b The second coefficient in the linear combination.
544  //! \param a_lhsComp The component of \a a_lhs in which the linear combination will be stored.
545  //! \param a_xComp The component of \a a_x from which data will be extracted.
546  //! \param a_yComp The component of \a a_y from which data will be extracted.
547  static void axby(Vector<LevelData<EBCellFAB>* >& a_lhs,
548  const Vector<LevelData<EBCellFAB>* >& a_x,
549  const Vector<LevelData<EBCellFAB>* >& a_y,
550  const Real& a_a,
551  const Real& a_b,
552  const int& a_lhsComp,
553  const int& a_xComp,
554  const int& a_yComp);
555 
556 
557  //! Places the sum \a a_in1 + \a a_in2 into \a a_result.
558  //! \param a_result The AMR hierarchy that will store the sum.
559  //! \param a_in1 The first AMR hierarchy of data in the sum.
560  //! \param a_in2 The second AMR hierarchy of data in the sum.
561  static void sum(Vector<LevelData<EBCellFAB>* >& a_result,
562  const Vector<LevelData<EBCellFAB>* >& a_in1,
563  const Vector<LevelData<EBCellFAB>* >& a_in2);
564 
565 
566  //! Adds the constant \a a_constant to every element in the hierarchy \a a_data.
567  static void addConstant(Vector<LevelData<EBCellFAB>* >& a_data,
568  const Real& a_constant);
569 
570 
571  ///
572  /**
573  */
574  static void product(Vector<LevelData<EBCellFAB>* >& a_result,
575  const Vector<LevelData<EBCellFAB>* >& a_in1,
576  const Vector<LevelData<EBCellFAB>* >& a_in2);
577 
578 
579  ///
580  /**
581  */
582  static void product(Vector<LevelData<EBCellFAB>* >& a_result,
583  const Vector<LevelData<EBCellFAB>* >& a_in1,
584  const Vector<LevelData<EBCellFAB>* >& a_in2,
585  const int& a_rComp,
586  const int& a_1Comp,
587  const int& a_2Comp);
588 
589 
590  ///
591  /**
592  */
593  static void divideVectorByScalar(Vector<LevelData<EBCellFAB>* >& a_vectorOut,
594  const Vector<LevelData<EBCellFAB>* >& a_vectorIn,
595  const Vector<LevelData<EBCellFAB>* >& a_scalar);
596 
597  ///
598  /**
599  */
600  static void divide(Vector<LevelData<EBCellFAB>* >& a_result,
601  const Vector<LevelData<EBCellFAB>* >& a_in1,
602  const Vector<LevelData<EBCellFAB>* >& a_in2);
603 
604 
605  ///
606  /**
607  */
608  static void divide(Vector<LevelData<EBCellFAB>* >& a_result,
609  const Vector<LevelData<EBCellFAB>* >& a_in1,
610  const Vector<LevelData<EBCellFAB>* >& a_in2,
611  const int& a_rComp,
612  const int& a_1Comp,
613  const int& a_2Comp);
614 
615 
616  ///
617  /**
618  */
619  static void product(Vector<LevelData<EBFluxFAB>* >& a_result,
620  const Vector<LevelData<EBFluxFAB>* >& a_in1,
621  const Vector<LevelData<EBFluxFAB>* >& a_in2);
622 
623 
624  ///
625  /**
626  */
627  static void kappaWeight(Vector<LevelData<EBCellFAB>* >& a_data);
628 
629 
630  ///
631  /**
632  */
633  static void kappaScale(Vector<LevelData<EBCellFAB>* >& a_data,
634  const Real& a_scale);
635 
636 
637  ///
638  /**
639  */
640  static Real kappaNorm(Real& a_volume,
641  const Vector<LevelData<EBCellFAB>* >& a_data,
642  int a_which,
643  const Vector<ProblemDomain>& a_domain,
644  int a_p=2);
645 
646 
647  ///
648  /**
649  */
650  static Real noKappaNorm(Real& a_volume,
651  const Vector<LevelData<EBCellFAB>* >& a_data,
652  int a_which,
653  const Vector<ProblemDomain>& a_domain,
654  int a_p=2);
655 
656 
657  ///
658  /**
659  */
660  static Real kappaDotProduct(Real& a_volume,
661  const Vector<LevelData<EBCellFAB>* >& a_data1,
662  const Vector<LevelData<EBCellFAB>* >& a_data2,
663  int a_which,
664  const Vector<ProblemDomain>& a_domain);
665 
666 
667  ///
668  /**
669  */
670  static Real noKappaDotProduct(Real& a_volume,
671  const Vector<LevelData<EBCellFAB>* >& a_data1,
672  const Vector<LevelData<EBCellFAB>* >& a_data2,
673  int a_which,
674  const Vector<ProblemDomain>& a_domain);
675 
676 
677 
678  ///
679  /**
680  */
681  static void setMaxMin(Vector<LevelData<EBCellFAB>* >& a_data,
682  const Real& a_maxVal,
683  const Real& a_minVal,
684  const int& a_comp);
685 
686  ///
687  /**
688  */
689  static void getMaxMin(Real& a_maxVal,
690  Real& a_minVal,
691  const Vector<LevelData<EBCellFAB>* >& a_data,
692  const int& a_comp);
693 
694 
695  ///
696  /**
697  */
699  const Vector<DisjointBoxLayout>& a_grids,
700  const Vector<EBISLayout>& a_ebisl,
701  const Vector<int> & a_refRat);
702 
703 
704  ///
705  /**
706  */
707  static void checkThisData(const Vector<LevelData<EBCellFAB>* >& a_data,
708  const string& a_name,
709  const IntVect& a_iv1 = IntVect::Zero,
710  const IntVect& a_iv2 = IntVect::Zero,
711  const Real& a_shift = 0.0);
712 
713 
714  ///
715  /**
716  */
717  static bool checkNANINF(const Vector<LevelData<EBCellFAB>* >& a_data,
718  const IntVect& a_iv1 = IntVect::Zero,
719  const IntVect& a_iv2 = IntVect::Zero,
720  const Real& a_shift = 0.0);
721 
722 
723  ///
724  /**
725  */
726  static void checkThisData(const Vector<LevelData<EBFluxFAB>* >& a_data,
727  const string& a_name);
728 
729 
730  ///
731  /**
732  */
733  static bool checkNANINF(const Vector<LevelData<EBFluxFAB>* >& a_data);
734 
735 
736 
737  ///
738  /**
739  */
740  static Real sum(const Vector<LevelData<EBCellFAB>* >& a_data,
741  const Vector<DisjointBoxLayout>& a_grids,
742  const Vector<EBISLayout>& a_ebisl,
743  const Vector<int> & a_refRat,
744  int a_comp,
745  bool a_mutiplyByKappa);
746 
747 protected:
748 
749 };
750 #include "NamespaceFooter.H"
751 #endif
static void averageDown(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< EBISLayout > &a_ebisl, const Vector< DisjointBoxLayout > &a_dbl, const Vector< ProblemDomain > &a_domain, const Vector< int > &a_refRatio)
static bool checkNANINF(const Vector< LevelData< EBCellFAB > * > &a_data, const IntVect &a_iv1=IntVect::Zero, const IntVect &a_iv2=IntVect::Zero, const Real &a_shift=0.0)
static void kappaWeight(Vector< LevelData< EBCellFAB > * > &a_data)
static void getMaxMin(Real &a_maxVal, Real &a_minVal, const Vector< LevelData< EBCellFAB > * > &a_data, const int &a_comp)
static Real kappaNorm(Real &a_volume, const Vector< LevelData< EBCellFAB > * > &a_data, int a_which, const Vector< ProblemDomain > &a_domain, int a_p=2)
A reference-counting handle class.
Definition: RefCountedPtr.H:66
static void coarsenDown(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< EBLevelGrid > &a_eblg, const Vector< int > &a_refRatio)
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
static void sum(Vector< LevelData< EBCellFAB > * > &a_result, const Vector< LevelData< EBCellFAB > * > &a_in1, const Vector< LevelData< EBCellFAB > * > &a_in2)
static void exchangeAll(Vector< LevelData< EBCellFAB > * > &a_phi)
static void kappaScale(Vector< LevelData< EBCellFAB > * > &a_data, const Real &a_scale)
one dimensional dynamic array
Definition: Vector.H:52
static void setMaxMin(Vector< LevelData< EBCellFAB > * > &a_data, const Real &a_maxVal, const Real &a_minVal, const int &a_comp)
static void setCoveredVal(Vector< LevelData< EBCellFAB > * > &a_data, const Real &a_value)
static void deleteAMRData(Vector< LevelData< EBCellFAB > * > &a_amrData)
static void divideVectorByScalar(Vector< LevelData< EBCellFAB > * > &a_vectorOut, const Vector< LevelData< EBCellFAB > * > &a_vectorIn, const Vector< LevelData< EBCellFAB > * > &a_scalar)
static void setCoveredAMRVal(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< EBISLayout > &a_ebisl, const Vector< int > &a_refRat, const Real &a_value)
static void exchangeCorners(Vector< LevelData< EBCellFAB > * > &a_data, const ProblemDomain &a_domain)
static void checkThisData(const Vector< LevelData< EBCellFAB > * > &a_data, const string &a_name, const IntVect &a_iv1=IntVect::Zero, const IntVect &a_iv2=IntVect::Zero, const Real &a_shift=0.0)
static Real subtractOffMean(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< EBLevelGrid > &a_eblg, const Vector< int > &a_refRat)
static void incr(Vector< LevelData< EBCellFAB > * > &a_lhs, const Vector< LevelData< EBCellFAB > * > &a_rhs, const Real &a_scale)
EBAMRDataOps()
Definition: EBAMRDataOps.H:51
static void quadCFInterpAll(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< DisjointBoxLayout > &a_dbl, const Vector< EBISLayout > &a_ebisl, const Vector< ProblemDomain > &a_domain, const Vector< int > &a_refRatio)
Structure for passing component ranges in code.
Definition: Interval.H:23
static void setVal(Vector< LevelData< EBCellFAB > * > &a_result, const Real &a_value)
Sets every element in the AMR hierarchy of cell data a_result to the value a_value.
static void pwlFillPatchOne(LevelData< EBCellFAB > &a_dataFine, LevelData< EBCellFAB > &a_dataCoar, const DisjointBoxLayout &a_dblFine, const DisjointBoxLayout &a_dblCoar, const EBISLayout &a_ebislFine, const EBISLayout &a_ebislCoar, const ProblemDomain &a_domainCoar, const int &a_refRatioCoar)
static Real kappaDotProduct(Real &a_volume, const Vector< LevelData< EBCellFAB > * > &a_data1, const Vector< LevelData< EBCellFAB > * > &a_data2, int a_which, const Vector< ProblemDomain > &a_domain)
double Real
Definition: REAL.H:33
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:31
static void defineAMRData(Vector< LevelData< EBCellFAB > * > &a_amrData, const Vector< EBLevelGrid > &a_eblg, const IntVect &a_ghosts, const int &a_nComp, const int &a_numLevels)
Defines every LevelData<EBCellFAB> object in the given AMR hierarchy using the given parameters...
static void exchangeComp(Vector< LevelData< EBCellFAB > * > &a_data, const int &a_comp)
static void getErrorFromCoarseAndFine(Vector< LevelData< EBCellFAB > * > &a_errorCoar, const Vector< LevelData< EBCellFAB > * > &a_solnCoar, const Vector< DisjointBoxLayout > &a_gridsCoar, const Vector< EBISLayout > &a_ebislCoar, const ProblemDomain &a_level0DomainCoar, const Vector< LevelData< EBCellFAB > * > &a_solnFine, const Vector< DisjointBoxLayout > &a_gridsFine, const Vector< EBISLayout > &a_ebislFine, const ProblemDomain &a_level0DomainFine, const Vector< int > &a_refRat, bool a_kappaAlreadyMultipliedIn=false)
static const IntVect Zero
Definition: IntVect.H:627
Definition: EBAMRDataOps.H:48
static Real noKappaDotProduct(Real &a_volume, const Vector< LevelData< EBCellFAB > * > &a_data1, const Vector< LevelData< EBCellFAB > * > &a_data2, int a_which, const Vector< ProblemDomain > &a_domain)
static void axby(Vector< LevelData< EBCellFAB > * > &a_lhs, const Vector< LevelData< EBCellFAB > * > &a_x, const Vector< LevelData< EBCellFAB > * > &a_y, const Real &a, const Real &b)
static void assign(Vector< LevelData< EBCellFAB > * > &a_lhs, const Vector< LevelData< EBCellFAB > * > &a_rhs)
static void addConstant(Vector< LevelData< EBCellFAB > * > &a_data, const Real &a_constant)
Adds the constant a_constant to every element in the hierarchy a_data.
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
static void product(Vector< LevelData< EBCellFAB > * > &a_result, const Vector< LevelData< EBCellFAB > * > &a_in1, const Vector< LevelData< EBCellFAB > * > &a_in2)
static void pwlFillPatchAll(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< EBLevelGrid > &a_eblg, const Vector< int > &a_refRatio)
static void averageCellToFaces(Vector< LevelData< EBFluxFAB > * > &a_dataFlux, const Vector< LevelData< EBCellFAB > * > &a_dataCell, const Vector< EBLevelGrid > &a_eblg, const Vector< int > &a_refRatio, const int &a_comp)
~EBAMRDataOps()
Definition: EBAMRDataOps.H:95
static void quadCFInterpOne(Vector< LevelData< EBCellFAB > * > &a_data, const Vector< EBLevelGrid > &a_eblg, const Vector< int > &a_refRatio, const int &a_fineLevel)
Definition: EBISLayout.H:39
static int countVoF(const Vector< DisjointBoxLayout > &a_dbl, const Vector< EBISLayout > &a_ebisl, const Vector< ProblemDomain > &a_domain)
static void averageCellToFacesMAC(Vector< LevelData< EBFluxFAB > * > &a_dataFlux, const Vector< LevelData< EBCellFAB > * > &a_dataCell, const Vector< EBLevelGrid > &a_eblg, const Vector< int > &a_refRatio)
static void scale(Vector< LevelData< EBFluxFAB > * > &a_lhs, const Real &a_scale)
Scales the AMR hierarchy of flux data a_lhs by the factor a_scale.
static void divide(Vector< LevelData< EBCellFAB > * > &a_result, const Vector< LevelData< EBCellFAB > * > &a_in1, const Vector< LevelData< EBCellFAB > * > &a_in2)
static void setToZero(Vector< LevelData< EBCellFAB > * > &a_result)
Sets every element in the AMR hierarchy of cell data a_result to zero.
static Real noKappaNorm(Real &a_volume, const Vector< LevelData< EBCellFAB > * > &a_data, int a_which, const Vector< ProblemDomain > &a_domain, int a_p=2)