Chombo + EB  3.2
EBArith.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 _EBARITH_H_
12 #define _EBARITH_H_
13 
14 #include <fstream>
15 
16 #include "EBCellFAB.H"
17 #include "EBISBox.H"
18 #include "EBISLayout.H"
19 #include "EBFaceFAB.H"
20 #include "BoxLayout.H"
21 #include "BoxLayoutData.H"
22 #include "Stencils.H"
23 #include "LayoutData.H"
24 #include "Tuple.H"
25 #include "EBFluxFAB.H"
26 #include "EBCellFAB.H"
27 #include "NamespaceHeader.H"
28 ///
29 /**
30  enumeration class to ennumerate the different
31  extents of norm covereage. sometimes one
32  wants to only take a norm over the irregular
33  cells. sometimes one only wants to take a norm
34  over the regular cells, and sometimes one wants
35  both.
36  */
38 {
39 public:
40 
41  ///
42  /**
43  OverOnlyRegular means take the norm only over
44  regular cells. \\
45  OverOnlyirregular means take the norm only over
46  irregular cells. \\
47  OverBoth means use all uncovered cells. \\
48  All norms exclude covered cells.
49  */
50  enum NormMode
51  {
55  };
56 };
57 
58 ///
59 /**
60  class to encapsulate the common arithmatic operations
61  for ebfabs
62  */
63 class EBArith
64 {
65 public:
66 
67  ///
68  static void convertToITM(IndexTM<Real, SpaceDim>& a_diffrv, const RealVect& a_rv);
69 
70 
71  ///
72  static void convertToITM(IndexTM<int, SpaceDim>& a_diffrv, const IntVect& a_rv);
73 
74  ///
75  static void convertToITM(IndexTM<Real, SpaceDim-1>& a_diffrv, const RealVect& a_rv, const int& a_ignoreIndex);
76 
77  ///
78  static void convertToITM(IndexTM<int, SpaceDim-1>& a_diffrv, const IntVect& a_rv, const int& a_ignoreIndex);
79 
80  ///
81  /**
82  Gets the stencil to take the first derivative of cell centered data.
83  no high order one sided stuff (to keep stencil close)
84  */
85  static int
87  const VolIndex& a_vof,
88  const EBISBox& a_ebisBox,
89  const int& a_idir,
90  const Real& a_dx,
91  IntVectSet* a_cfivsPtr,
92  int ivar);
93 
94  ///
95  /**
96  Least square sten using all cells in a monotone path of radius a_rad
97  */
98  static void
100  Real& a_weight,
101  const RealVect& a_normal,
102  const RealVect& a_centroid,
103  const VolIndex& a_vof,
104  const EBISBox& a_ebisBox,
105  const RealVect& a_dx,
106  const ProblemDomain& a_domain,
107  int a_ivar,
108  int a_rad);
109 
110  static int
112  const RealVect& a_dist,
113  const RealVect& a_dx,
114  const VolIndex& a_startVoF,
115  const EBISBox& a_ebisBox,
116  int a_noExtrapThisDir,
117  IntVectSet* a_cfivsPtr,
118  int ivar);
119  ///
120  /**
121  */
122  static int orderScript(int icomp, int inorm, int ncomp);
123 
124  ///
125  static void
126  compareError(Vector<Real>& a_orders,
127  const LevelData<EBCellFAB>& a_errorFine,
128  const LevelData<EBCellFAB>& a_errorCoar,
129  const DisjointBoxLayout& a_gridsFine,
130  const DisjointBoxLayout& a_gridsCoar,
131  const EBISLayout& a_ebislFine,
132  const EBISLayout& a_ebislCoar,
133  const Box& a_coarseDom,
134  int a_testverbosity,
135  fstream* a_fout,
136  Vector<string> a_names,
137  string a_prefix) ;
138  ///
139  /**o
140  */
141  static void
142  compareError(Vector<Real>& a_orders,
143  const Vector< LevelData<EBCellFAB>* >& a_errorFine,
144  const Vector< LevelData<EBCellFAB>* >& a_errorCoar,
145  const Vector< DisjointBoxLayout >& a_gridsFine,
146  const Vector< DisjointBoxLayout >& a_gridsCoar,
147  const Vector< EBISLayout >& a_ebislFine,
148  const Vector< EBISLayout >& a_ebislCoar,
149  const Vector<int>& a_refRat,
150  const Box& a_coarseDom,
151  int a_testverbosity,
152  fstream* a_fout = NULL,
153  Vector<string> names = Vector<string>(),
154  string prefix = string());
155 
156  static Real
157  irregNorm(const LevelData<BaseIVFAB<Real> > & a_dataOne,
158  const DisjointBoxLayout & a_layout,
159  const EBISLayout & a_ebisl,
160  const int & a_comp,
161  const int & a_p);
162  static void
163  irregNorm(Real& a_ebIrregNorm,
164  const BaseIVFAB<Real>& a_ebiError,
165  const IntVectSet& a_ivsIrreg,
166  const EBISBox& a_ebisBox,
167  const int& a_comp,
168  const int& a_normtype);
169  static void
171  const LevelData<BaseIVFAB<Real> >& a_errorFine,
172  const LevelData<BaseIVFAB<Real> >& a_errorCoar,
173  const DisjointBoxLayout& a_gridsFine,
174  const DisjointBoxLayout& a_gridsCoar,
175  const EBISLayout& a_ebislFine,
176  const EBISLayout& a_ebislCoar,
177  const Box& a_coarseDom,
178  const string & a_prefix,
179  Vector<string> a_names) ;
180  ///
181  static void shrinkIVS(IntVectSet& a_ivs, const int& a_numShrink);
182 
183  static void
185  const LevelData<EBCellFAB>& a_UOld,
186  const LevelData<EBCellFAB>& a_UNew,
187  const DisjointBoxLayout& a_grids,
188  const Real& a_time,
189  const Real& a_told,
190  const Real& a_tnew);
191  ///
192  static Real
193  getDiagWeight( VoFStencil& a_vofStencil,
194  const VolIndex& a_vof,
195  int a_var = 0);
196 
197  ///
198  static void getMultiColors(Vector<IntVect>& a_colors);
199 
200  ///
201  static void
202  interpolateCFH(EBCellFAB& a_phi,
203  const int & a_idir,
204  const Side::LoHiSide& a_hiorlo,
205  const EBISBox& a_ebisBox,
206  const Real& a_dxfine,
207  const Real& a_dxcoar,
208  const IntVectSet& a_interpIVS);
209 
210  ///
211  /**
212  returns the order of the extrapolation.
213  the reason for the last argument is that you might not want the stencil
214  to leak over in the noExtrap direction even though you have set a_dist to zero.
215  This happens in CF interpolation where you have to really worry about stencil width.
216  **/
217  static int
219  const RealVect& a_dist,
220  const RealVect& a_dx,
221  const VolIndex& a_startVoF,
222  const EBISBox& a_ebisBox,
223  int a_noExtrapThisDirection = -1,
224  IntVectSet* a_cfivsPtr = NULL,
225  int ivar = 0);
226 
227  ///
228  /**
229  returns the order of the extrapolation.
230  the reason for the last argument is that you might not want the stencil
231  to leak over in the noExtrap direction even though you have set a_dist to zero.
232  This happens in CF interpolation where you have to really worry about stencil width.
233  **/
234  static int
236  const RealVect& a_dist,
237  const RealVect& a_dx,
238  const VolIndex& a_startVoF,
239  const EBISBox& a_ebisBox,
240  int a_noExtrapThisDirection = -1,
241  IntVectSet* a_cfivsPtr = NULL,
242  int ivar = 0);
243 
244  ///
245  /**
246  **/
247  static void
248  getDir1Dir2(int& a_dir1, int& a_dir2, const int& a_dir);
249 
250  ///
251  /**
252  send null ivs if you do not want lohicenter to care about cfivs
253  **/
254  static void
255  loHiCenter(Box& a_loBox,
256  int& a_hasLo,
257  Box& a_hiBox,
258  int& a_hasHi,
259  Box& a_centerBox,
260  const ProblemDomain & a_eblg,
261  const Box& a_inBox,
262  const int& a_dir,
263  IntVectSet* a_cfivsPtr = NULL);
264 
265  ///
266  /**
267  **/
268  static void
269  loHi(Box& a_loBox,
270  int& a_hasLo,
271  Box& a_hiBox,
272  int& a_hasHi,
273  const ProblemDomain& a_eblg,
274  const Box& a_inBox,
275  const int& a_dir);
276 
277  ///
278  /**
279  testRef is the size of the coarsest domain allowed in multigrid. If testRef=2,
280  then the coarsest domain in multigrid will be 2x2(x2)
281  **/
282  static bool getCoarserLayouts(DisjointBoxLayout& a_dblCoar,
283  ProblemDomain& a_domainCoar,
284  const DisjointBoxLayout& a_dblFine,
285  const ProblemDomain& a_domainFine,
286  int a_refToCoar,
287  int a_maxBoxSize,
288  bool& a_layoutChanged,
289  int a_testRef = 2);
290 
291  ///
292  /**
293  Gets the stencil to take the first derivative in the given direction
294  of cell centered data.
295  Returns the expected order of the derivative.
296  When we need them, we prefer
297  first derivataves to be second order if at all possible, so we take some pains
298  to achieve that
299  */
300  static int
302  const VolIndex& a_vof,
303  const EBISBox& a_ebisBox,
304  const int& a_idir,
305  const Real& a_dx,
306  IntVectSet* a_cfivsPtr = NULL,
307  int ivar = 0);
308 
309 
310  ///
311  /**
312  Gets the stencil to take the mixed (in the given directions)
313  derivative of cell centered data.
314  Returns the expected order of the derivative.
315  When we need them, we usually only need second derivatives to O(h), so
316  this just shifts stencil when it has to.
317  */
318  static int
320  const VolIndex& a_vof,
321  const EBISBox& a_ebisBox,
322  const int& a_dir1,
323  const int& a_dir2,
324  const Real& a_dx1,
325  const Real& a_dx2,
326  IntVectSet* a_cfivsPtr = NULL,
327  int ivar = 0);
328 
329  ///
330  /**
331  Gets the stencil to take the second derivative in the given direction)
332  of cell centered data.
333  Returns the expected order of the derivative.
334  When we need them, we usually only need second derivatives to O(h), so
335  this just shifts stencil when it has to.
336  */
337  static int
339  const VolIndex& a_vof,
340  const EBISBox& a_ebisBox,
341  const int& a_idir,
342  const Real& a_dx,
343  IntVectSet* a_cfivsPtr = NULL,
344  int ivar = 0);
345 
346  ///
347  /**
348  a function that could possibly take over the world.
349  */
350  static void
351  getVoFsDir(bool& a_hasClose, VolIndex& a_closeVoF,
352  bool& a_hasFar, VolIndex& a_farVoF,
353  const EBISBox& a_ebisBox,
354  const VolIndex& a_vof,
355  int a_idir, Side::LoHiSide a_sd,
356  IntVectSet* a_cfivsPtr);
357 
358  ///
359  /**
360  define an intvectset of ghost cells which live on
361  the coarse fine interface. includes corner cells.
362  */
363  static void
365  const DisjointBoxLayout& a_grids,
366  const ProblemDomain& a_probDom);
367 
368  ///
369  static Real
370  extrapFaceGradToOutflow(const FaceIndex& a_bndryFace,
371  const Side::LoHiSide& a_side,
372  const int& a_idir,
373  const EBGraph& a_ebGraph,
374  const EBFaceFAB& a_faceData,
375  const int& a_comp);
376 
377  ///
378  static Real
379  extrapFaceValueToDomain(const FaceIndex& a_bndryFace,
380  const Side::LoHiSide& a_side,
381  const int& a_idir,
382  const EBGraph& a_ebGraph,
383  const EBFaceFAB& a_faceData,
384  const int& a_comp,
385  const Real& a_dropOrderValue = 0.);
386 
387  ///
388  static Real
389  extrapFaceVelToOutflow(const FaceIndex& a_bndryFace,
390  const Side::LoHiSide& a_side,
391  const int& a_idir,
392  const EBGraph& a_ebGraph,
393  const EBFaceFAB& a_faceData,
394  const int& a_comp);
395 
396  ///
397  static Real
398  interpolateVel(const EBFaceFAB& a_vel,
399  const EBISBox& a_ebisBox,
400  const FaceIndex& a_face);
401 
402  ///
403  static Real
404  deInterpolateVel(const Real& a_centroidVel,
405  const EBFaceFAB& a_vel,
406  const EBISBox& a_ebisBox,
407  const FaceIndex& a_face);
408 
409  ///
410  static Real
411  getFaceVelForDivFreeCell(const FaceIndex& a_face,
412  const VolIndex& a_vof,
413  const int& a_idir,
414  const Side::LoHiSide& a_side,
415  const EBFluxFAB& a_vel,
416  const RealVect& a_dx,
417  const EBISBox& a_ebisBox);
418  ///
419  /**
420  evaluates integral(a_divu dV)/integral(dV) over a hierarchy.
421  pval = -1--->assumes volfrac already multiplied in
422  pval = -2--->multiply by volume fraction
423  */
424  static void
425  meanOverHierarchy(Real& a_mean,
426  const Vector<LevelData<EBCellFAB> *>& a_divu,
427  const Vector<DisjointBoxLayout>& a_grids,
428  const Vector<EBISLayout>& a_ebisl,
429  const Vector<int>& a_refRat,
430  const ProblemDomain& a_domainCoarsest,
431  const RealVect& a_dxCoarsest,
432  const int& a_comp,
433  int pval= -1);
434 
435  ///
436  /**
437  //gets the weight of a vof to interpolate (linear in 2d, bilinear in 3d) to an interpolation point in the plane
438  //this is used to get one of the points along the johansen ray
439  */
440  static Real
441  getJohanVoFWeight(const VolIndex& a_whichVoF, //vof for which we are trying to find weight
442  const RealVect& a_intersectLoc, //location of intersection in real space
443  const IntVect& a_intersectIV, //intvect through which ray passes
444  const int& a_nMaxDir, //direction of largest normal
445  const RealVect& a_dx); //grid spacing but you knew that.
446 
447  ///version which uses incoming normal, boundary centroid
448  /**
449  splitting up stuff this way to facillitate multifluid
450  which can have multiple normals and boundary centroids per cell.
451  */
452  static void
453  johanStencil(bool& a_dropOrder,
454  Vector<VoFStencil>& a_pointStencils,
455  Vector<Real>& a_distanceAlongLine,
456  const RealVect& a_normal,
457  const RealVect& a_bndryCentroid,
458  const VolIndex& a_vof,
459  const EBISBox& a_ebisBox,
460  const RealVect& a_dx,
461  const IntVectSet& a_cfivs,
462  int a_ivar = 0);
463 
464  ///
465  /**
466  Gets the stencils to get the data points along the Johansen ray. If a_dropOrder
467  returns true then the stencil does not exist. Also returns the distances along the ray
468  to each point.
469  */
470  static void
471  johanStencil(bool& a_dropOrder,
472  Vector<VoFStencil>& a_pointStencils,
473  Vector<Real>& a_distanceAlongLine,
474  const VolIndex& a_vof,
475  const EBISBox& a_ebisBox,
476  const RealVect& a_dx,
477  const IntVectSet& a_cfivs,
478  int a_ivar = 0);
479 
480  ///standard interface
481  /**
482  gets the normal and calls the other version
483  */
484  static void
486  Real& a_weight,
487  const VolIndex& a_vof,
488  const EBISBox& a_ebisBox,
489  const RealVect& a_dx,
490  const ProblemDomain& a_domain,
491  int a_ivar = 0);
492 
493  ///version which uses incoming normal, boundary centroid
494  /**
495  splitting up stuff this way to facillitate multifluid
496  which can have multiple normals and boundary centroids per cell.
497  */
498  static void
500  Real& a_weight,
501  const RealVect& a_normal ,
502  const RealVect& a_centroid,
503  const VolIndex& a_vof,
504  const EBISBox& a_ebisBox,
505  const RealVect& a_dx,
506  const ProblemDomain& a_domain,
507  int a_ivar = 0);
508 
509 
510  ///version which uses incoming normal, boundary centroid
511  /**
512  splitting up stuff this way to facillitate multifluid
513  which can have multiple normals and boundary centroids per cell.
514  */
515  static void
517  Real& a_weight,
518  const RealVect& a_normal ,
519  const RealVect& a_centroid,
520  const IntVect& a_quadrant,
521  const VolIndex& a_vof,
522  const EBISBox& a_ebisBox,
523  const RealVect& a_dx,
524  const ProblemDomain& a_domain,
525  int a_ivar = 0);
526 
527  ///version which uses incoming normal, boundary centroid, and
528  /// all available VoFs.
529  /**
530  splitting up stuff this way to facillitate multifluid
531  which can have multiple normals and boundary centroids per cell.
532  */
533  static void
535  Real& a_weight,
536  const RealVect& a_normal,
537  const RealVect& a_centroid,
538  const VolIndex& a_vof,
539  const EBISBox& a_ebisBox,
540  const RealVect& a_dx,
541  const ProblemDomain& a_domain,
542  int a_ivar);
543 
544  ///version which uses incoming normal, boundary centroid, and
545  /// all quadrants.
546  /**
547  splitting up stuff this way to facillitate multifluid
548  which can have multiple normals and boundary centroids per cell.
549  */
550  static void
552  Real& a_weight,
553  const RealVect& a_normal,
554  const RealVect& a_centroid,
555  const VolIndex& a_vof,
556  const EBISBox& a_ebisBox,
557  const RealVect& a_dx,
558  const ProblemDomain& a_domain,
559  int a_ivar,
560  bool a_doSymmetric = false);
561 
562  /**
563  split matrix computations for least squares into separate
564  routine that is independent of stencil size, so that the
565  code can be reused
566  */
567  static void
569  Vector<RealVect>& xp,
570  Vector<RealVect>& weightMatrix,
571  bool& detZero);
572 
573  static void
575  Vector<RealVect>& xp,
576  IntVect dimm,
577  Vector<RealVect>& weightMatrix,
578  bool& deadRed);
579 
580  ///gets the normal of a domain face
581  static RealVect getDomainNormal(int a_idir, Side::LoHiSide a_side);
582 
583  ///gets the location in real space of a face center
584  static RealVect getFaceLocation(const FaceIndex& a_face,
585  const RealVect& a_dx,
586  const RealVect& a_probLo);
587 
588 
589  ///gets the location in real space of a face center
590  static RealVect getFaceLocation(const FaceIndex& a_face,
591  const Real& a_dx,
592  const RealVect& a_probLo)
593  {
594  return getFaceLocation(a_face, a_dx*RealVect::Unit, a_probLo);
595  }
596 
597  ///get stencils for points along a line (generalized johansen stencil)
598  static void dataRayCast(bool& a_dropOrder,
599  Vector<VoFStencil>& a_pointStencils,
600  Vector<Real>& a_distanceAlongLine,
601  const RealVect& a_normal,
602  const RealVect& a_bndryCentroid,
603  const VolIndex& a_vof,
604  const EBISBox& a_ebisBox,
605  const RealVect& a_dx,
606  const IntVectSet& a_cfivs,
607  int a_ivar,
608  int a_numPoints);
609 
610  ///gets the location in real space of a cell center
611  static RealVect getVofLocation(const VolIndex& a_vof,
612  const RealVect& a_dx,
613  const RealVect& a_probLo);
614 
615  ///I have misspelled this one time too many
616  static RealVect getVoFLocation(const VolIndex& a_vof,
617  const RealVect& a_dx,
618  const RealVect& a_probLo)
619  {
620  return getVofLocation(a_vof, a_dx, a_probLo);
621  }
622 
623  ///I have misspelled this one time too many
624  static RealVect getVoFLocation(const VolIndex& a_vof,
625  const Real& a_dx,
626  const RealVect& a_probLo)
627  {
628  RealVect rvdx = a_dx*RealVect::Unit;
629  return getVofLocation(a_vof, rvdx, a_probLo);
630  }
631 
632 
633  ///I have misspelled this one time too many
634  static RealVect getVofLocation(const VolIndex& a_vof,
635  const Real& a_dx,
636  const RealVect& a_probLo)
637  {
638  RealVect rvdx = a_dx*RealVect::Unit;
639  return getVofLocation(a_vof, rvdx, a_probLo);
640  }
641 
642 
643  ///gets the location in real space of a cell center
644  static RealVect getIVLocation(const IntVect& a_iv,
645  const RealVect& a_dx,
646  const RealVect& a_probLo);
647 
648  ///
649  /**
650  A very easy to screw up piece of code that was in four places.
651  */
652  static void
653  defineFluxInterpolant(LevelData<BaseIFFAB<Real> >& a_fluxInterpolant,
654  LayoutData<IntVectSet> & a_irregSetsGrown,
655  const DisjointBoxLayout & a_dbl,
656  const EBISLayout & a_ebisl,
657  const ProblemDomain & a_domain,
658  const int & a_ncomp,
659  const int & a_faceDir);
660 
661  ///
662  static void
664  const LevelData<EBFluxFAB>& a_faceCentFlux,
665  const DisjointBoxLayout& a_grids,
666  const EBISLayout& a_ebisl,
667  const ProblemDomain& a_domain);
668 
669  ///
670  static void
671  interpolateFluxToCentroids(EBFaceFAB& a_centroidFlux,
672  const EBFaceFAB& a_faceCentFlux,
673  const Box& a_box,
674  const EBISBox& a_ebisBox,
675  const ProblemDomain& a_domain,
676  const int& a_idir);
677 
678 
679  ///
680  static FaceStencil getInterpStencil(const FaceIndex& a_face,
681  const IntVectSet& a_coarseFineIVS,
682  const EBISBox& a_ebisBox,
683  const ProblemDomain& a_domainBox);
684 
685  ///
686  static void getInterpStencil2D(FaceStencil& a_sten,
687  const FaceIndex& a_face,
688  const IntVectSet& a_coarseFineIVS,
689  const EBISBox& a_ebisBox,
690  const ProblemDomain& a_domainBox) ;
691 
692  ///
693  static void getInterpStencil3D(FaceStencil& a_sten,
694  const FaceIndex& a_face,
695  const IntVectSet& a_coarseFineIVS,
696  const EBISBox& a_ebisBox,
697  const ProblemDomain& a_domainBox);
698 
699  ///
700  /**
701  Return true if there is unique vof associated with a_cell
702  that lies in the a_vofsStencil. If so, a_vof = vof. Else return false.
703  */
704  static bool
705  isVoFHere(VolIndex& a_vof,
706  const Vector<VolIndex>& a_vofsStencil,
707  const IntVect& a_cell );
708 
709  ///
710  static bool
711  isVoFHere(VolIndex& a_vof, int& a_whichVoF,
712  const Vector<VolIndex>& a_vofsStencil,
713  const IntVect& a_cell );
714 
715  ///
716  /** Returns all vofs that can be reached from a_vof via a
717  monotone path of length <= than radius
718  */
719  static void
721  const VolIndex& a_vof,
722  const EBISBox& a_ebisBox,
723  const int& a_redistRad);
724 
725  /*******/
726  static void
728  Vector<IntVect> & a_dist,
729  const VolIndex& a_vof,
730  const EBISBox& a_ebisBox,
731  const int& a_redistRad);
732 
733  ///get volume of a vof in rz coords
734  static void
735  getKVolRZ(Real& a_kvol,
736  Real& a_cellVol,
737  const EBISBox& a_ebisBox,
738  const Real& a_dx,
739  const VolIndex& a_vof);
740 
741  ///get volume of a vof in rz coords
742  static void
743  getKVolRZNoDx(Real& a_kvol,
744  Real& a_cellVolDx3,
745  const EBISBox& a_ebisBox,
746  const VolIndex& a_vof);
747 
748  ///
749  /**
750  Return true if there is a unique adjacent face in the
751  given direction. False if either covered or multivalued.
752  */
753  static
754  bool
755  getAdjacentFace(FaceIndex& a_adjacentFace,
756  const FaceIndex& a_face,
757  const EBISBox& a_ebisBox,
758  const ProblemDomain& a_domain,
759  const int& a_idir,
760  const Side::LoHiSide& a_side);
761 
762  ///
763  /**
764  compute a stencil for one of our fancy interpolated
765  gradients.
766  */
767  static
768  void computeGradFluxStencil(VoFStencil& a_thisStencil,
769  const FaceIndex& a_thisFace,
770  const EBISBox& a_ebisBox,
771  const ProblemDomain& a_domain,
772  const int& a_dir);
773 
774  ///
775  /**
776  compute a stencil for one of our fancy interpolated
777  fluxes.
778  */
779  static
780  void computeInterpStencil(FaceStencil& a_thisStencil,
781  const FaceIndex& a_thisFace,
782  const EBISBox& a_ebisBox,
783  const ProblemDomain& a_domain,
784  const int& a_dir);
785 
786  ///
787  /**
788  return lp-norm of component comp of a_src,
789  weighted by local volume fraction.
790  not normalized by number of points or anything like that.
791  if p==0, volume returned is one
792  and norm returned is Max(abs(a_src)) over
793  uncovered regions. otherwise,
794  returns sum(volfrac*a_src(iv,comp)**p) of component comp of a_src
795  weighted by local volume fraction and
796  also returns volume of uncovered regions.
797  Only uncovered regions count here.
798  */
799  static
800  void
801  volWeightedSum(Real& a_norm,
802  Real& a_volume,
803  const EBCellFAB& a_src,
804  const Box& a_region,
805  const EBISBox& a_ebisBox,
806  const RealVect& a_dx,
807  const IntVectSet& a_ivsExclude,
808  const int& a_comp,
809  const int& a_p,
811 
812 
813  static void
814  getCompVolRZ(Real& a_compVol,
815  const EBISBox& a_ebisBox,
816  const Real& a_dx,
817  const VolIndex& a_vof,
818  bool a_verbose = false);
819  ///
820  /**
821  return volume-weighted sum of component comp of a_src,
822  weighted by local volume fraction.
823  and norm returned is Max(abs(a_src)) over
824  uncovered regions. otherwise,
825  returns sum(volfrac*a_src(iv,comp)**p) of component comp of a_src
826  weighted by local volume fraction and
827  also returns volume of uncovered regions.
828  Only uncovered regions count here.
829  */
830  static
831  void
832  computeSum(Real& a_norm,
833  Real& a_volume,
834  const EBCellFAB& a_src,
835  const Box& a_region,
836  const EBISBox& a_ebisBox,
837  const RealVect& a_dx,
838  const IntVectSet& a_ivsExclude,
839  const int& a_comp,
841 
842 
843  ///
844  /**
845  return volume-weighted sum of component comp of a_src,
846  weighted by local volume fraction.
847  and norm returned is Max(abs(a_src)) over
848  uncovered regions. otherwise,
849  returns sum(volfrac*a_src(iv,comp)**p) of component comp of a_src
850  weighted by local volume fraction and
851  also returns volume of uncovered regions.
852  Only uncovered regions count here.
853  */
854  static
855  void
856  computeUnweightedSum(Real& a_norm,
857  Real& a_volume,
858  const EBCellFAB& a_src,
859  const Box& a_region,
860  const EBISBox& a_ebisBox,
861  const RealVect& a_dx,
862  const IntVectSet& a_ivsExclude,
863  const int& a_comp,
865 
866  ///
867  /** return l-p norm of a_src.
868  if p==0, v
869  norm returned is Max(abs(a_src)) over
870  uncovered regions. otherwise,
871  returns 1/vol(sum(volfrac*a_src(iv,comp)**p)^(1/p))
872  of component comp of a_src
873  weighted by local volume fraction and
874  also returns volume of uncovered regions.
875  Only uncovered regions count here.
876  The data must have the same layout as a_layout with
877  the possible exception of ghost cells.
878 
879  int pmode = -2; //norm = (1/v)(sum(phi dv)) ---no absolute values and multiply kappa as you go
880  int pmode = -1; //norm = (1/v)(sum(phi dv)) ---no absolute values and assume kappa already multiplied in
881 
882  */
883  static
884  Real
885  norm(const BoxLayoutData<EBCellFAB >& a_dataOne,
886  const BoxLayout& a_layout,
887  const EBISLayout& a_ebisl,
888  const int& comp,
889  const int& p,
891 
892  static
893  Real
894  norm(const Vector<LevelData<EBCellFAB>* >& a_data,
895  const Vector< DisjointBoxLayout > & a_layout,
896  const Vector< EBISLayout >& a_ebisl,
897  const Vector< int >& a_refRatio,
898  const int& comp,
899  const int& p,
901 
902  ///
903  static
904  void
905  computeCoveredFaces(Vector<VolIndex>& a_coveredFace,
906  IntVectSet& a_coveredSets,
907  IntVectSet& a_irregIVS,
908  const int& a_idir,
909  const Side::LoHiSide& a_sd,
910  const EBISBox& a_ebisBox,
911  const Box& a_region);
912 
913  //testing interface
914  static
915  Real
916  norm(Real& volume, const BoxLayoutData<EBCellFAB >& a_dataOne,
917  const BoxLayout& a_layout,
918  const EBISLayout& a_ebisl,
919  const int& comp,
920  const int& p,
922 
923  ///
924  /** return l-p norm of a_src.
925  if p==0, v
926  norm returned is Max(abs(a_src)) over
927  uncovered regions. otherwise,
928  returns 1/vol(sum(volfrac*a_src(iv,comp)**p)^(1/p))
929  of component comp of a_src
930  weighted by local volume fraction and
931  also returns volume of uncovered regions.
932  Only uncovered regions count here.
933  The data must have the same layout as a_layout with
934  the possible exception of ghost cells.
935  */
936  static
937  Real
938  norm(const EBCellFAB& a_dataOne,
939  const Box& a_grid,
940  const EBISBox& a_ebisl,
941  const int& a_comp,
942  const int& a_p,
944 
945  static
946  Real
947  norm(Real& volume, const EBCellFAB& a_dataOne,
948  const Box& a_grid,
949  const EBISBox& a_ebisl,
950  const int& a_comp,
951  const int& a_p,
953 
954  ///
955  /** return l-p norm of a_src.
956  if p==0, v
957  norm returned is Max(abs(a_src)) over
958  uncovered regions. otherwise,
959  returns sum(volfrac*a_src(iv,comp)**p) of component comp of a_src
960  weighted by local volume fraction and
961  also returns volume of uncovered regions.
962  Only uncovered regions count here.
963  The data must have the same layout as a_layout with
964  the possible exception of ghost cells.
965  */
966  static
967  void
968  volWeightedSum(Real& a_sum,
969  Real& a_volume,
970  const BoxLayoutData<EBCellFAB >& a_dataOne,
971  const BoxLayout& a_layout,
972  const EBISLayout& a_ebisl,
973  const RealVect& a_dx,
974  const IntVectSet& a_ivsExclude,
975  const int& a_comp,
976  const int& a_p,
978 
979  ///
980  /** return the sum of all irregular boundary areas
981  */
982  static
983  void
984  sumBndryArea(Real& a_area,
985  const BoxLayout& a_region,
986  const EBISLayout& a_ebisl);
987 
988  ///
989  /** return the dotproduct of two leveldatas of ebfabs,
990  Only uncovered regions count here.
991  */
992  static
993  Real
994  dotProduct(const BoxLayoutData<EBCellFAB >& a_dataOne,
995  const BoxLayoutData<EBCellFAB >& a_dataTwo,
996  const BoxLayout& a_layout,
997  const EBISLayout& a_ebisl,
998  const int& a_comp);
999 
1000  ///
1001  /** return the dotproduct of two ebfabs,
1002  Only uncovered regions count here.
1003  */
1004  static
1005  Real
1006  dotProduct(const EBCellFAB& a_dataOne,
1007  const EBCellFAB& a_dataTwo,
1008  const Box& a_layout,
1009  const EBISBox& a_ebisBox,
1010  const int& a_comp);
1011 
1012  ///
1013  /** Given a VoF, a_vof1, and a cell, a_cell2, determine if there is a vector of
1014  VoFs in a_cell2 that connects to a_vof1 via a monotone path.
1015  A vector of VolIndices is returned, even if empty.
1016  */
1017  static
1018  void
1020  const Vector<VolIndex>& a_vofsInPath,
1021  const IntVect& a_cell2,
1022  const EBISBox& a_ebisBox);
1023  ///
1024  /** Given a VoF, a_vof1, and a cell, a_cell2, determine if there is a single
1025  VoF in a_cell2 that connects to a_vof1 via a monotone path. If there is
1026  one such VoF then TRUE is returned (and the VolIndex is returned,
1027  a_vof2). If there is no such VoF or if there are more than one such
1028  VoF then FALSE is returned (and a_vof2 is unchanged).
1029  */
1030  static
1031  bool
1033  const VolIndex& a_vof1,
1034  const IntVect& a_cell2,
1035  const EBISBox& a_ebisBox);
1036  /*******/
1037  static void
1039  const VolIndex& a_vof,
1040  const EBISBox& a_ebisBox,
1041  const int& a_redistRad);
1042 
1043  /*******/
1044  static void
1046  const IntVect& a_timesMoved,
1047  const VolIndex& a_vof,
1048  const EBISBox& a_ebisBox,
1049  const int& a_redistRad);
1050 
1051  ///
1052  /** Returns all vofs that can be reached from a_vof via a
1053  monotone path of length <= than radius
1054  */
1055  static
1056  void
1058  const IntVect& a_timesMoved,
1059  const IntVect& a_pathSign,
1060  const VolIndex& a_vof,
1061  const EBISBox& a_ebisBox,
1062  const int& a_radius);
1063 
1065  {
1066  return s_vofMax;
1067  }
1068  static Real& getValMax()
1069  {
1070  return s_valMax;
1071  }
1072 
1073  static void setMinVolumeFraction(Real a_minVolFrac)
1074  {
1075  s_minVolFrac = a_minVolFrac;
1076  }
1077 
1078 private:
1080  static Real s_valMax;
1082 
1083 };
1084 
1085 extern IntVect ebcoarsen (const IntVect& b,
1086  int refinement_ratio);
1087 
1088 extern
1089 Box ebrefine (const Box& b,
1090  int refinement_ratio);
1091 extern
1093  int refinement_ratio);
1094 
1095 extern Box ebcoarsen (const Box& b,
1096  int refinement_ratio);
1097 extern ProblemDomain ebcoarsen (const ProblemDomain& b,
1098  int refinement_ratio);
1099 
1100 extern void ebrefine(DisjointBoxLayout& output,
1101  const DisjointBoxLayout& input,
1102  int refinement);
1103 
1104 extern void ebcoarsen(DisjointBoxLayout& output,
1105  const DisjointBoxLayout& input,
1106  int refinement);
1107 
1108 #include "NamespaceFooter.H"
1109 #endif
static void defineFluxInterpolant(LevelData< BaseIFFAB< Real > > &a_fluxInterpolant, LayoutData< IntVectSet > &a_irregSetsGrown, const DisjointBoxLayout &a_dbl, const EBISLayout &a_ebisl, const ProblemDomain &a_domain, const int &a_ncomp, const int &a_faceDir)
static void computeGradFluxStencil(VoFStencil &a_thisStencil, const FaceIndex &a_thisFace, const EBISBox &a_ebisBox, const ProblemDomain &a_domain, const int &a_dir)
static void computeUnweightedSum(Real &a_norm, Real &a_volume, const EBCellFAB &a_src, const Box &a_region, const EBISBox &a_ebisBox, const RealVect &a_dx, const IntVectSet &a_ivsExclude, const int &a_comp, EBNormType::NormMode=EBNormType::OverBoth)
static RealVect getVofLocation(const VolIndex &a_vof, const RealVect &a_dx, const RealVect &a_probLo)
gets the location in real space of a cell center
IntVect ebcoarsen(const IntVect &b, int refinement_ratio)
Definition: Stencils.H:181
static int getSecondDerivStencil(VoFStencil &a_sten, const VolIndex &a_vof, const EBISBox &a_ebisBox, const int &a_idir, const Real &a_dx, IntVectSet *a_cfivsPtr=NULL, int ivar=0)
static Real extrapFaceVelToOutflow(const FaceIndex &a_bndryFace, const Side::LoHiSide &a_side, const int &a_idir, const EBGraph &a_ebGraph, const EBFaceFAB &a_faceData, const int &a_comp)
static VolIndex s_vofMax
Definition: EBArith.H:1079
static void monotonePathVoFToCellMultiVoFs(Vector< VolIndex > &a_vofsInCell, const Vector< VolIndex > &a_vofsInPath, const IntVect &a_cell2, const EBISBox &a_ebisBox)
static void getVoFsDir(bool &a_hasClose, VolIndex &a_closeVoF, bool &a_hasFar, VolIndex &a_farVoF, const EBISBox &a_ebisBox, const VolIndex &a_vof, int a_idir, Side::LoHiSide a_sd, IntVectSet *a_cfivsPtr)
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
static Real irregNorm(const LevelData< BaseIVFAB< Real > > &a_dataOne, const DisjointBoxLayout &a_layout, const EBISLayout &a_ebisl, const int &a_comp, const int &a_p)
static void timeInterpolate(LevelData< EBCellFAB > &a_U, const LevelData< EBCellFAB > &a_UOld, const LevelData< EBCellFAB > &a_UNew, const DisjointBoxLayout &a_grids, const Real &a_time, const Real &a_told, const Real &a_tnew)
static void getInterpStencil2D(FaceStencil &a_sten, const FaceIndex &a_face, const IntVectSet &a_coarseFineIVS, const EBISBox &a_ebisBox, const ProblemDomain &a_domainBox)
static void defineCFIVS(LayoutData< IntVectSet > &a_cfivs, const DisjointBoxLayout &a_grids, const ProblemDomain &a_probDom)
static void getDir1Dir2(int &a_dir1, int &a_dir2, const int &a_dir)
static void interpolateCFH(EBCellFAB &a_phi, const int &a_idir, const Side::LoHiSide &a_hiorlo, const EBISBox &a_ebisBox, const Real &a_dxfine, const Real &a_dxcoar, const IntVectSet &a_interpIVS)
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:145
static void computeCoveredFaces(Vector< VolIndex > &a_coveredFace, IntVectSet &a_coveredSets, IntVectSet &a_irregIVS, const int &a_idir, const Side::LoHiSide &a_sd, const EBISBox &a_ebisBox, const Box &a_region)
Definition: FaceIndex.H:28
static void loHi(Box &a_loBox, int &a_hasLo, Box &a_hiBox, int &a_hasHi, const ProblemDomain &a_eblg, const Box &a_inBox, const int &a_dir)
static int get1stOrderExtrapolationStencil(VoFStencil &a_stencil, const RealVect &a_dist, const RealVect &a_dx, const VolIndex &a_startVoF, const EBISBox &a_ebisBox, int a_noExtrapThisDirection=-1, IntVectSet *a_cfivsPtr=NULL, int ivar=0)
Definition: EBISBox.H:46
static void getMultiColors(Vector< IntVect > &a_colors)
static void compareError(Vector< Real > &a_orders, const LevelData< EBCellFAB > &a_errorFine, const LevelData< EBCellFAB > &a_errorCoar, const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoar, const EBISLayout &a_ebislFine, const EBISLayout &a_ebislCoar, const Box &a_coarseDom, int a_testverbosity, fstream *a_fout, Vector< string > a_names, string a_prefix)
static int getFirstOrderExtrapolationStencil(VoFStencil &a_stencil, const RealVect &a_dist, const RealVect &a_dx, const VolIndex &a_startVoF, const EBISBox &a_ebisBox, int a_noExtrapThisDir, IntVectSet *a_cfivsPtr, int ivar)
Definition: EBArith.H:37
Definition: EBFaceFAB.H:28
static void shrinkIVS(IntVectSet &a_ivs, const int &a_numShrink)
static RealVect getIVLocation(const IntVect &a_iv, const RealVect &a_dx, const RealVect &a_probLo)
gets the location in real space of a cell center
static Real interpolateVel(const EBFaceFAB &a_vel, const EBISBox &a_ebisBox, const FaceIndex &a_face)
Geometric description within a box.
Definition: EBGraph.H:427
static RealVect getVofLocation(const VolIndex &a_vof, const Real &a_dx, const RealVect &a_probLo)
I have misspelled this one time too many.
Definition: EBArith.H:634
static void getKVolRZNoDx(Real &a_kvol, Real &a_cellVolDx3, const EBISBox &a_ebisBox, const VolIndex &a_vof)
get volume of a vof in rz coords
Definition: IndexTM.H:36
static const RealVect Unit
Definition: RealVect.H:427
VoF-centered stencil.
Definition: Stencils.H:60
static void getAllVoFsWithinRadius(Vector< VolIndex > &a_vofList, Vector< IntVect > &a_dist, const VolIndex &a_vof, const EBISBox &a_ebisBox, const int &a_redistRad)
static void calculateWeightingMatrixRed(RealVect x0, Vector< RealVect > &xp, IntVect dimm, Vector< RealVect > &weightMatrix, bool &deadRed)
static void setMinVolumeFraction(Real a_minVolFrac)
Definition: EBArith.H:1073
static int getFirstDerivStencil(VoFStencil &a_sten, const VolIndex &a_vof, const EBISBox &a_ebisBox, const int &a_idir, const Real &a_dx, IntVectSet *a_cfivsPtr=NULL, int ivar=0)
static bool monotonePathVoFToCellVoF(VolIndex &a_vof2, const VolIndex &a_vof1, const IntVect &a_cell2, const EBISBox &a_ebisBox)
static void sumBndryArea(Real &a_area, const BoxLayout &a_region, const EBISLayout &a_ebisl)
A EBFaceFAB-like container for edge-centered fluxes.
Definition: EBFluxFAB.H:25
static void volWeightedSum(Real &a_norm, Real &a_volume, const EBCellFAB &a_src, const Box &a_region, const EBISBox &a_ebisBox, const RealVect &a_dx, const IntVectSet &a_ivsExclude, const int &a_comp, const int &a_p, EBNormType::NormMode=EBNormType::OverBoth)
static void calculateWeightingMatrix(RealVect x0, Vector< RealVect > &xp, Vector< RealVect > &weightMatrix, bool &detZero)
static void getLeastSquaresGradStenAllVoFsRad(VoFStencil &a_stencil, Real &a_weight, const RealVect &a_normal, const RealVect &a_centroid, const VolIndex &a_vof, const EBISBox &a_ebisBox, const RealVect &a_dx, const ProblemDomain &a_domain, int a_ivar, int a_rad)
Definition: EBCellFAB.H:29
static VolIndex & getVoFMax()
Definition: EBArith.H:1064
static void getLeastSquaresGradStenAllQuad(VoFStencil &a_stencil, Real &a_weight, const RealVect &a_normal, const RealVect &a_centroid, const VolIndex &a_vof, const EBISBox &a_ebisBox, const RealVect &a_dx, const ProblemDomain &a_domain, int a_ivar, bool a_doSymmetric=false)
double Real
Definition: REAL.H:33
static Real dotProduct(const BoxLayoutData< EBCellFAB > &a_dataOne, const BoxLayoutData< EBCellFAB > &a_dataTwo, const BoxLayout &a_layout, const EBISLayout &a_ebisl, const int &a_comp)
static void getCompVolRZ(Real &a_compVol, const EBISBox &a_ebisBox, const Real &a_dx, const VolIndex &a_vof, bool a_verbose=false)
static Real getDiagWeight(VoFStencil &a_vofStencil, const VolIndex &a_vof, int a_var=0)
static int getMixedDerivStencil(VoFStencil &a_sten, const VolIndex &a_vof, const EBISBox &a_ebisBox, const int &a_dir1, const int &a_dir2, const Real &a_dx1, const Real &a_dx2, IntVectSet *a_cfivsPtr=NULL, int ivar=0)
static Real & getValMax()
Definition: EBArith.H:1068
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
static void getLeastSquaresGradStenAllVoFs(VoFStencil &a_stencil, Real &a_weight, const RealVect &a_normal, const RealVect &a_centroid, const VolIndex &a_vof, const EBISBox &a_ebisBox, const RealVect &a_dx, const ProblemDomain &a_domain, int a_ivar)
LoHiSide
Definition: LoHiSide.H:27
static Real getFaceVelForDivFreeCell(const FaceIndex &a_face, const VolIndex &a_vof, const int &a_idir, const Side::LoHiSide &a_side, const EBFluxFAB &a_vel, const RealVect &a_dx, const EBISBox &a_ebisBox)
Definition: EBArith.H:52
static void getKVolRZ(Real &a_kvol, Real &a_cellVol, const EBISBox &a_ebisBox, const Real &a_dx, const VolIndex &a_vof)
get volume of a vof in rz coords
Definition: EBArith.H:53
static RealVect getDomainNormal(int a_idir, Side::LoHiSide a_side)
gets the normal of a domain face
static RealVect getFaceLocation(const FaceIndex &a_face, const RealVect &a_dx, const RealVect &a_probLo)
gets the location in real space of a face center
static Real extrapFaceValueToDomain(const FaceIndex &a_bndryFace, const Side::LoHiSide &a_side, const int &a_idir, const EBGraph &a_ebGraph, const EBFaceFAB &a_faceData, const int &a_comp, const Real &a_dropOrderValue=0.)
static Real getJohanVoFWeight(const VolIndex &a_whichVoF, const RealVect &a_intersectLoc, const IntVect &a_intersectIV, const int &a_nMaxDir, const RealVect &a_dx)
static int getExtrapolationStencil(VoFStencil &a_stencil, const RealVect &a_dist, const RealVect &a_dx, const VolIndex &a_startVoF, const EBISBox &a_ebisBox, int a_noExtrapThisDirection=-1, IntVectSet *a_cfivsPtr=NULL, int ivar=0)
static int getFirstDerivStencilWidthOne(VoFStencil &a_sten, const VolIndex &a_vof, const EBISBox &a_ebisBox, const int &a_idir, const Real &a_dx, IntVectSet *a_cfivsPtr, int ivar)
static void getAllVoFsInMonotonePath(Vector< VolIndex > &a_vofList, const VolIndex &a_vof, const EBISBox &a_ebisBox, const int &a_redistRad)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
static Real s_minVolFrac
Definition: EBArith.H:1081
static void getInterpStencil3D(FaceStencil &a_sten, const FaceIndex &a_face, const IntVectSet &a_coarseFineIVS, const EBISBox &a_ebisBox, const ProblemDomain &a_domainBox)
Definition: BaseIFFAB.H:34
static bool isVoFHere(VolIndex &a_vof, const Vector< VolIndex > &a_vofsStencil, const IntVect &a_cell)
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Definition: EBArith.H:63
static void loHiCenter(Box &a_loBox, int &a_hasLo, Box &a_hiBox, int &a_hasHi, Box &a_centerBox, const ProblemDomain &a_eblg, const Box &a_inBox, const int &a_dir, IntVectSet *a_cfivsPtr=NULL)
Volume of Fluid Index.
Definition: VolIndex.H:31
static void computeSum(Real &a_norm, Real &a_volume, const EBCellFAB &a_src, const Box &a_region, const EBISBox &a_ebisBox, const RealVect &a_dx, const IntVectSet &a_ivsExclude, const int &a_comp, EBNormType::NormMode=EBNormType::OverBoth)
static void johanStencil(bool &a_dropOrder, Vector< VoFStencil > &a_pointStencils, Vector< Real > &a_distanceAlongLine, const RealVect &a_normal, const RealVect &a_bndryCentroid, const VolIndex &a_vof, const EBISBox &a_ebisBox, const RealVect &a_dx, const IntVectSet &a_cfivs, int a_ivar=0)
version which uses incoming normal, boundary centroid
static RealVect getVoFLocation(const VolIndex &a_vof, const Real &a_dx, const RealVect &a_probLo)
I have misspelled this one time too many.
Definition: EBArith.H:624
static Real norm(const BoxLayoutData< EBCellFAB > &a_dataOne, const BoxLayout &a_layout, const EBISLayout &a_ebisl, const int &comp, const int &p, EBNormType::NormMode=EBNormType::OverBoth)
Definition: EBISLayout.H:39
static Real deInterpolateVel(const Real &a_centroidVel, const EBFaceFAB &a_vel, const EBISBox &a_ebisBox, const FaceIndex &a_face)
static bool getAdjacentFace(FaceIndex &a_adjacentFace, const FaceIndex &a_face, const EBISBox &a_ebisBox, const ProblemDomain &a_domain, const int &a_idir, const Side::LoHiSide &a_side)
static int orderScript(int icomp, int inorm, int ncomp)
static bool getCoarserLayouts(DisjointBoxLayout &a_dblCoar, ProblemDomain &a_domainCoar, const DisjointBoxLayout &a_dblFine, const ProblemDomain &a_domainFine, int a_refToCoar, int a_maxBoxSize, bool &a_layoutChanged, int a_testRef=2)
Box ebrefine(const Box &b, int refinement_ratio)
static void convertToITM(IndexTM< Real, SpaceDim > &a_diffrv, const RealVect &a_rv)
Definition: EBArith.H:54
static void getLeastSquaresGradSten(VoFStencil &a_stencil, Real &a_weight, const VolIndex &a_vof, const EBISBox &a_ebisBox, const RealVect &a_dx, const ProblemDomain &a_domain, int a_ivar=0)
standard interface
static Real extrapFaceGradToOutflow(const FaceIndex &a_bndryFace, const Side::LoHiSide &a_side, const int &a_idir, const EBGraph &a_ebGraph, const EBFaceFAB &a_faceData, const int &a_comp)
static void interpolateFluxToCentroids(LevelData< EBFluxFAB > &a_centroidFlux, const LevelData< EBFluxFAB > &a_faceCentFlux, const DisjointBoxLayout &a_grids, const EBISLayout &a_ebisl, const ProblemDomain &a_domain)
NormMode
Definition: EBArith.H:50
static RealVect getVoFLocation(const VolIndex &a_vof, const RealVect &a_dx, const RealVect &a_probLo)
I have misspelled this one time too many.
Definition: EBArith.H:616
static void dataRayCast(bool &a_dropOrder, Vector< VoFStencil > &a_pointStencils, Vector< Real > &a_distanceAlongLine, const RealVect &a_normal, const RealVect &a_bndryCentroid, const VolIndex &a_vof, const EBISBox &a_ebisBox, const RealVect &a_dx, const IntVectSet &a_cfivs, int a_ivar, int a_numPoints)
get stencils for points along a line (generalized johansen stencil)
static void computeInterpStencil(FaceStencil &a_thisStencil, const FaceIndex &a_thisFace, const EBISBox &a_ebisBox, const ProblemDomain &a_domain, const int &a_dir)
static FaceStencil getInterpStencil(const FaceIndex &a_face, const IntVectSet &a_coarseFineIVS, const EBISBox &a_ebisBox, const ProblemDomain &a_domainBox)
static Real s_valMax
Definition: EBArith.H:1080
static RealVect getFaceLocation(const FaceIndex &a_face, const Real &a_dx, const RealVect &a_probLo)
gets the location in real space of a face center
Definition: EBArith.H:590
static void compareIrregError(Vector< Real > &a_orders, const LevelData< BaseIVFAB< Real > > &a_errorFine, const LevelData< BaseIVFAB< Real > > &a_errorCoar, const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoar, const EBISLayout &a_ebislFine, const EBISLayout &a_ebislCoar, const Box &a_coarseDom, const string &a_prefix, Vector< string > a_names)
static void meanOverHierarchy(Real &a_mean, const Vector< LevelData< EBCellFAB > * > &a_divu, const Vector< DisjointBoxLayout > &a_grids, const Vector< EBISLayout > &a_ebisl, const Vector< int > &a_refRat, const ProblemDomain &a_domainCoarsest, const RealVect &a_dxCoarsest, const int &a_comp, int pval=-1)