Chombo + EB  3.2
EBData.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 // ANAG, LBNL
12 
13 #ifndef _EBDATA_H_
14 #define _EBDATA_H_
15 
16 #include "REAL.H"
17 #include "RealVect.H"
18 
19 #include "EBGraph.H"
20 #include "IrregNode.H"
21 #include "BaseIVFAB.H"
22 #include "BaseIFFAB.H"
23 
24 #include "NamespaceHeader.H"
25 
26 class EBIndexSpace;
27 
28 template <class T>
29 int linearSize(const T& inputT);
30 
31 template <class T>
32 void linearIn(T& a_outputT, const void* const inBuf);
33 
34 template <class T>
35 void linearOut(void* const a_outBuf, const T& inputT);
36 
38 {
39 public:
40  BoundaryData();
41 
42  BoundaryData(const Real& bndryArea, const RealVect& normal,
43  const RealVect& bndryCentroid, int phase,const VolIndex& index)
44  :
45  m_bndryArea(bndryArea),
46  m_normal(normal),
47  m_bndryCentroid(bndryCentroid),
48  m_bndryPhase(phase),
49  m_volIndex(index)
50  {
51  }
52 
58 
59 
60  /// the moment at the irregular face associated with the monomial with the input exponents
61  /**
62  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
63  returns integral_over_irregular_area((x^p y^q z^r) dA)
64  **/
66 
67 
68  /// the derivatives of the normal
69  /**
70  (d_p)(n_d)
71  **/
73 
74  /// ebmoments with the the normal integrated in
75  /**
76  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
77  returns integral_over_irregular_area((x^p y^q z^r)n_i dA)
78  **/
80 
81  void
83  {
84  m_bndryArea = 0.;
86  m_normal = BASISV(0); //have to give it something non-zero
88  for(int idir = 0; idir < SpaceDim; idir++)
89  {
92 
93  }
94  }
95 
97  {
98  if(&a_in != this)
99  {
100  m_bndryArea = a_in.m_bndryArea;
102  m_bndryPhase = a_in.m_bndryPhase;
103  m_normal = a_in.m_normal;
104  m_volIndex = a_in.m_volIndex;
105  m_EBMoments = a_in.m_EBMoments;
106  for(int idir = 0; idir < SpaceDim; idir++)
107  {
108  m_normalPartialDeriv[idir] = a_in.m_normalPartialDeriv[idir];
109  m_EBNormalMoments [idir] = a_in.m_EBNormalMoments [idir];
110  }
111  }
112  return *this;
113  }
114 };
115 
116 template < >
117 int linearSize(const BoundaryData& vdata);
118 template < >
119 void linearIn(BoundaryData& a_outputT, const void* const inBuf);
120 template < >
121 void linearOut(void* const a_outBuf, const BoundaryData& a_inputT);
122 ///
123 /**
124  */
125 class VolData
126 {
127 public:
128  VolData();
134  void setToRegular(Real a_dx)
135  {
136  m_volFrac = 1.0;
140  m_phaseFaces.resize(0);
141  }
142 
144  {
145  m_volFrac = 0.0;
149  m_phaseFaces.resize(0);
150  }
151 };
152 
153 /// VolData specializations of linear* functions used by LevelData
154 //[NOTE: see also SPMD.H. <dbs>]
155 template < >
156 int linearSize(const VolData& vdata);
157 template < >
158 void linearIn(VolData& a_outputT, const void* const inBuf);
159 template < >
160 void linearOut(void* const a_outBuf, const VolData& a_inputT);
161 
162 ///
163 /**
164  */
165 class FaceData
166 {
167 public:
171  void setToRegular(Real a_dx)
172  {
173  m_areaFrac = 0.;
176  }
178  {
179  m_areaFrac = 0.;
182  }
183 };
184 
185 
186 template < >
187 int linearSize(const FaceData& vdata);
188 template < >
189 void linearIn(FaceData& a_outputT, const void* const inBuf);
190 template < >
191 void linearOut(void* const a_outBuf, const FaceData& a_inputT);
192 
193 ///
194 /**
195  This class contains all the geometric information
196  for an ebisbox.
197 */
199 {
200 
201 public:
202 
203  ///
204  EBDataImplem();
205 
206  ///
207  ~EBDataImplem();
208 
209  ///
210  /**
211  noop---real defines are more complicated
212  */
213  void define(const Box& box, int comps)
214  {
215  }
216 
217 
218  ///
219  /**
220  noop --- real constructor more complicated
221  */
222  EBDataImplem(const Box& a_box, int a_comps)
223  {
224  define(a_box, a_comps);
225  }
226 
227  ///
228  /**
229  Copy the information from a_source to the over the intersection
230  of the box a_region, the box of the current EBDataImplem and
231  the box of a_source. The Interval arguments are ignored.
232  This function is required by LevelData.
233  */
234  void copy(const Box& a_regionFrom,
235  const Interval& a_Cd,
236  const Box& a_regionto,
237  const EBDataImplem& a_source,
238  const Interval& a_Cs);
239 
240  ///define the whole thing
241  void
242  define(const EBGraph& a_graph,
243  const Vector<IrregNode>& a_irregData,
244  const Box& a_validBox,
245  const Real & a_dx,
246  bool a_hasMoments );
247 
248  //this is the define to use when you are just going to copy the data into it. region should include ghost cells
249  void define(const EBGraph& a_graph,
250  const Box& a_region,
251  const Real& a_dx,
252  bool a_hasMoments) ;
253 
254  ///
255  void
256  coarsenVoFs(const EBDataImplem& a_fineEBDataImplem,
257  const EBGraph& a_fineGraph,
258  const EBGraph& a_coarGraph,
259  const Box& a_validRegion);
260 
261  ///
262  void
263  coarsenFaces(const EBDataImplem& a_fineEBDataImplem,
264  const EBGraph& a_fineGraph,
265  const EBGraph& a_coarGraph,
266  const Box& a_validRegion);
267  ///
268  const Real& volFrac(const VolIndex& a_vof) const;
269 
270  ///
271  const Real& areaFrac(const FaceIndex& a_face1) const;
272 
273  ///
274  const RealVect& centroid(const FaceIndex& facein) const;
275 
276  ///
277  const RealVect& centroid(const VolIndex& a_vof) const;
278 
279  ///
280  const RealVect& bndryCentroid(const VolIndex& a_vof) const;
281  const RealVect& bndryCentroid(const VolIndex& a_vof, int face) const;
282 
283  ///
284  const Real& bndryArea(const VolIndex& a_vof) const;
285  const Real& bndryArea(const VolIndex& a_vof, int face) const;
286 
287  ///
288  const RealVect& normal(const VolIndex& a_vof) const;
289  const RealVect& normal(const VolIndex& a_vof, int face) const;
290 
291  // New set of boundary inquiry functions to support multi-fluid applications
292  /// used by multi-fluid applications
293 
294  /// used by multi-fluid code
295  int facePhase(const VolIndex& a_vof, int aface) const ;
296 
297  /// used by multi-fluid code
298  const VolIndex& faceIndex(const VolIndex& a_vof, int face) const ;
299 
300  /// used by multi-fluid code
301  void setFacePhase(const VolIndex& a_vof, int face, int phase);
302  ///
303  /// used by multi-fluid code
304  void setFaceIndex(const VolIndex& a_vof, int face, const VolIndex& index);
305 
306  ///
307  int numFacePhase(const VolIndex& a_vof) const ;
308 
309  void clearMultiBoundaries();
310 
311  void setBoundaryPhase(int phase);
312  /**
313  This stuff required by LevelData in parallel:
314  */
315  int size(const Box& R, const Interval& comps) const;
316 
317  ///
318  void linearOut(void* buf, const Box& R, const Interval& comps) const;
319 
320  ///
321  void linearIn(void* buf, const Box& R, const Interval& comps);
322 
323  ///
324  static int preAllocatable()
325  {
326  return 2; // dyanmic allocatable.
327  }
328 
330  {
331  return m_volData;
332  }
334  {
335  return m_volData;
336  }
337 
338 
339  ///return true if higher order moments are available
340  bool hasMoments() const
341  {
342  return m_hasMoments;
343  }
344  ///
345  void addFullIrregularVoFs(const IntVectSet& a_vofsToChange,
346  const EBGraph& a_newGhostGraph,
347  const BaseIVFAB<VolData>& a_newGhostData,
348  const EBGraph& a_oldGhostGraph);
349 
350  ///multifluid angels dancing on the heads of pins.
351  void addEmptyIrregularVoFs(const IntVectSet& a_vofsToChange,
352  const EBGraph& a_newGraph);
353  ///
354  static void setVerbose(bool a_verbose);
355  ///
356  static void setVerboseDebug(bool a_verboseDebug);
357 
358 
359  /// get the moment at the VoF associated with the monomial with the input exponents
360  /**
361  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
362  returns integral_over_VoF(x^p y^q z^r dV) for all p q
363  **/
364  IndMomSpaceDim getVolumeMoments(const VolIndex& a_vof) const;
365 
366  /// get the normal the irregular face associated with the monomial with the input exponents
367  /**
368  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
369  returns integral_over_VoF((x^p y^q z^r) dV) for p q r
370  **/
371  IndMomSpaceDim getEBMoments(const VolIndex& a_vof) const;
372 
373  /// get the moment at the face associated with the monomial with the input exponents
374  /**
375  Given face variables x, y, p = mono(0), q = mono(1)),
376  returns integral_over_face(x^p y^q dA) for all p q
377  **/
378  IndMomSDMinOne getFaceMoments(const FaceIndex& a_face) const;
379 
380  /// I am sick of guessing this name wrong
382  {
383  return getFaceMoments(a_face);
384  }
385 
386  ///
387  /**
388  gets the partial derivs of the normal component.
389  **/
390  IndMomSpaceDim getEBNormalPartialDerivs(const VolIndex& a_vof, int normalComponent) const;
391 
392  /// get the normal*moment at the irregular face associated with the monomial with the input exponents
393  /**
394  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
395  returns integral_over_VoF(((x-x0)^p (y-y0)^q (z-z0)^r)*n_i dV) for p q r,
396  and (x0,y0,z0) is the center of the cell
397  **/
398  IndMomSpaceDim getEBNormalMoments(const VolIndex& a_vof, int normalComponent) const;
399 
400 private:
401 
402 
403  bool
404  irregFace(const FaceIndex& a_face) const;
405 
406  bool
407  irregVoF(const VolIndex& a_vof) const;
408 
409  /// each data holder is defined over the irregular cells of the graph
410  void
411  defineVoFData(const EBGraph& a_graph, const Box& a_region);
412 
413  /// each data holder is defined over the irregular cells of the graph
414  void
415  defineFaceData(const EBGraph& a_graph, const Box& a_region);
416 
417  void setVolumeMomentsToZero(const VolIndex& a_vof);
418 
419  void setAreaMomentsToZero(const FaceIndex& a_face);
420 
421  void setCoveredAndRegular();
422 
423  void shiftAndIncrement(IndMomSpaceDim& a_output, const IndMomSpaceDim& a_input,const RealVect& a_shiftRV);
424  void shiftAndIncrement(IndMomSDMinOne& a_output, const IndMomSDMinOne& a_input,const RealVect& a_shiftRV, int faceDir);
425 
426  static bool s_verbose;
427  static bool s_verboseDebug;
428  ///
430 
431  ///
433 
434  ///
436 
437  ///
439 
440  ///
442 
443  ///
445 
446  ///
448 
449  ///
451  void operator=(const EBDataImplem& ebiin)
452  {;}
453 
455  {;}
456 
457  void
458  coarsenFaceCentroid(RealVect& a_centroidCoar,
459  const Vector<RealVect>& a_centroidsFine,
460  const Vector<Real>& a_areaFracFine,
461  const Vector<FaceIndex>& a_facesFine,
462  const FaceIndex& a_faceCoar);
463  void
464  coarsenAreaFrac(Real& a_areaFracCoar,
465  const Vector<Real>& a_areaFracFine);
466 
467  void
468  coarsenVolFracAndCentroid(Real& a_volFracCoar,
469  RealVect& a_volCentroidCoar,
470  const Vector<Real>& a_volFracFine,
471  const Vector<RealVect>& a_volCentroidFine,
472  const Vector<VolIndex>& a_fineVoFs,
473  const VolIndex& a_coarVoF);
474 
475  void
476  coarsenBoundaryAreaAndNormal(Real& a_bndryAreaCoar,
477  RealVect& a_normalCoar,
478  const Vector<Real>& a_bndryAreaFine,
479  const Vector<RealVect>& a_normalFine);
480 
481  RealVect
482  fineToCoarseTransform(const RealVect& a_finePoint,
483  const IntVect& a_coarCell,
484  const IntVect& a_fineCell);
485 
486  void
487  coarsenBndryCentroid(RealVect& a_bndryCentroidCoar,
488  const Vector<RealVect>& a_bndryCentroidFine,
489  const Vector<Real>& a_bndryAreaFine,
490  const Vector<VolIndex>& a_fineVoFs,
491  const VolIndex& a_coarVoF);
492 
493  void fetch(std::list<const VolData*>& fineVols, const Vector<VolIndex>& vofsFine) const;
494 
495  friend class EBIndexSpace;
496  friend class EBISLevel;
497 };
498 
499 ///
500 /**
501  Ref-counted version of EBDataImplem.
502 */
503 class EBData
504 {
505 public:
506 
507  ///
509  {
510  }
511 
512  ///
514  {
515  }
516 
517  ///
518  /**
519  */
520  void define(const Box& a_box, int a_comps)
521  {
522  m_implem->define(a_box, a_comps);
523  }
524 
525 
526  ///
527  /**
528  */
529  EBData(const Box& a_box, int a_comps)
530  :m_implem(new EBDataImplem(a_box, a_comps))
531  {
532  }
533 
534  ///
535  /**
536  Copy the information from a_source to the over the intersection
537  of the box a_region, the box of the current EBData and
538  the box of a_source. The Interval arguments are ignored.
539  This function is required by LevelData.
540  */
541  void copy(const Box& a_regionFrom,
542  const Interval& a_Cd,
543  const Box& a_regionto,
544  const EBData& a_source,
545  const Interval& a_Cs)
546  {
547  m_implem->copy(a_regionFrom, a_Cd, a_regionto, *a_source.m_implem, a_Cs);
548  }
549 
550 
551  ///define the whole thing
552  void
553  define(const EBGraph& a_graph,
554  const Vector<IrregNode>& a_irregData,
555  const Box& a_validBox,
556  const Real & a_dx,
557  bool a_hasMoments)
558  {
559  m_implem->define(a_graph, a_irregData, a_validBox, a_dx, a_hasMoments);
560  computeNormalsAndBoundaryAreas(a_graph, a_validBox);
561  }
562 
563  //this is the define to use when you are just going to copy the data into it. region should include ghost cells
564  void define(const EBGraph& a_graph,
565  const Box& a_region,
566  const Real& a_dx,
567  bool a_hasMoments)
568  {
569  m_implem->define(a_graph, a_region, a_dx, a_hasMoments);
570  }
571  ///
572  void
573  coarsenVoFs(const EBData& a_fineEBData,
574  const EBGraph& a_fineGraph,
575  const EBGraph& a_coarGraph,
576  const Box& a_validRegion)
577  {
578  m_implem->coarsenVoFs(*a_fineEBData.m_implem, a_fineGraph, a_coarGraph, a_validRegion);
579  }
580 
581  void
582  coarsenFaces(const EBData& a_fineEBData,
583  const EBGraph& a_fineGraph,
584  const EBGraph& a_coarGraph,
585  const Box& a_validRegion)
586  {
587  m_implem->coarsenFaces(*a_fineEBData.m_implem, a_fineGraph, a_coarGraph, a_validRegion);
588  }
589 
590  /// get the moment at the VoF associated with the monomial with the input exponents
591  /**
592  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
593  returns integral_over_VoF(x^p y^q z^r dV) for all p q
594  **/
596  {
597  return m_implem->getVolumeMoments(a_vof);
598  }
599 
600  /// get the normal the irregular face associated with the monomial with the input exponents
601  /**
602  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
603  returns integral_over_VoF((x^p y^q z^r) dV) for p q r
604  **/
606  {
607  return m_implem->getEBMoments(a_vof);
608  }
609 
610  /// get the moment at the face associated with the monomial with the input exponents
611  /**
612  Given face variables x, y, p = mono(0), q = mono(1)),
613  returns integral_over_face(x^p y^q dA) for all p q
614  **/
616  {
617  return m_implem->getFaceMoments(a_face);
618  }
619 
620  /// I am sick of guessing this name wrong
622  {
623  return getFaceMoments(a_face);
624  }
625 
626  ///
627  /**
628  gets the partial derivs of the normal component.
629  **/
630  IndMomSpaceDim getEBNormalPartialDerivs(const VolIndex& a_vof, int a_normalComponent) const
631  {
632  return m_implem->getEBNormalPartialDerivs(a_vof, a_normalComponent);
633  }
634 
635  /// get the normal*moment at the irregular face associated with the monomial with the input exponents
636  /**
637  Given VoF variables x, y, z, p = mono(0), q = mono(1), r = mono(2),
638  returns integral_over_VoF((x^p y^q z^r)*n_i dV) for p q r
639  returns the OUTWARD (away from the center of the vof) normal comps
640  **/
641  IndMomSpaceDim getEBNormalMoments(const VolIndex& a_vof, int a_normalComponent) const
642  {
643  return m_implem->getEBNormalMoments(a_vof, a_normalComponent);
644  }
645 
646  ///
647  const Real& volFrac(const VolIndex& a_vof) const;
648 
649  ///
650  const Real& areaFrac(const FaceIndex& a_face1) const;
651 
652  ///
653  const RealVect& centroid(const FaceIndex& facein) const;
654 
655  ///
656  const RealVect& centroid(const VolIndex& a_vof) const;
657 
658  ///return true if higher order moments are available
659  bool hasMoments() const
660  {
661  return m_implem->hasMoments();
662  }
663  ///
664  const RealVect& bndryCentroid(const VolIndex& a_vof) const;
665  const RealVect& bndryCentroid(const VolIndex& a_vof, int face) const;
666 
667  ///
668  const Real& bndryArea(const VolIndex& a_vof) const;
669  const Real& bndryArea(const VolIndex& a_vof, int face) const;
670 
671  ///
672  const RealVect& normal(const VolIndex& a_vof) const;
673  const RealVect& normal(const VolIndex& a_vof, int face) const;
674 
675  /// used by multi-fluid code
676  int facePhase(const VolIndex& a_vof, int a_face) const
677  {
678  return m_implem->facePhase(a_vof, a_face);
679  }
680 
681  /// used by multi-fluid code
682  const VolIndex& faceIndex(const VolIndex& a_vof, int face) const
683  {
684  return m_implem->faceIndex(a_vof, face);
685  }
686 
687  /// used by multi-fluid code
688  void setFacePhase(const VolIndex& a_vof, int face, int phase)
689  {
690  m_implem->setFacePhase(a_vof, face, phase);
691  }
692 
693  /// used by multi-fluid code
694  void setFaceIndex(const VolIndex& a_vof, int face, const VolIndex& index)
695  {
696  m_implem->setFaceIndex(a_vof, face, index);
697  }
698  ///
699  int numFacePhase(const VolIndex& a_vof) const
700  {
701  return m_implem->numFacePhase(a_vof);
702  }
703 
705  {
707  }
708  void setBoundaryPhase(int phase)
709  {
710  m_implem->setBoundaryPhase(phase);
711  }
712  ///
713  EBData(const EBData& a_ebiin)
714  {
715  m_implem = a_ebiin.m_implem;
716  }
717 
718  ///
719  /**
720  This is a pointer comparison.
721  */
722  bool operator==(const EBData& a_ebiin)
723  {
724  return ((&(*m_implem)) == (&(*a_ebiin.m_implem)));
725  }
726 
727  ///
728  EBData& operator=(const EBData& a_ebiin)
729  {
730  m_implem = a_ebiin.m_implem;
731  return *this;
732  }
733 
734  ///
735  /**
736  This stuff required by LevelData in parallel:
737  */
738  int size(const Box& R, const Interval& comps) const
739  {
740  return (m_implem->size(R, comps));
741  }
742 
743  ///
744  void linearOut(void* buf, const Box& R, const Interval& comps) const
745  {
746  m_implem->linearOut(buf, R, comps);
747  }
748 
749  ///
750  void linearIn(void* buf, const Box& R, const Interval& comps)
751  {
752  m_implem->linearIn(buf, R, comps);
753  }
754 
755  ///
756  void
757  addFullIrregularVoFs(const IntVectSet& a_vofsToChange,
758  const EBGraph& a_newGraph,
759  const BaseIVFAB<VolData>& a_grownData,
760  const EBGraph& a_oldGraph)
761  {
762  m_implem->addFullIrregularVoFs(a_vofsToChange, a_newGraph, a_grownData, a_oldGraph);
763  }
764 
765 
766  ///multifluid angels dancing on the heads of pins.
767  void
768  addEmptyIrregularVoFs(const IntVectSet& a_vofsToChange,
769  const EBGraph& a_newGraph)
770  {
771  m_implem->addEmptyIrregularVoFs(a_vofsToChange, a_newGraph);
772  }
773 
774 
775  ///
776  void
778  const Box& a_validRegion);
779 
781  {
782  return m_implem->getVolData();
783  }
784 
786  {
787  return m_implem->getVolData();
788  }
789 
790  ///
791  static int preAllocatable()
792  {
793  return 2; // dyanmic allocatable.
794  }
795 
796 
797 private:
798 
799  ///
801 
802  friend class EBIndexSpace;
803  friend class EBISLevel;
804 };
805 
806 /*******************************/
807 inline const Real& EBData::volFrac(const VolIndex& a_vof) const
808 {
809  return m_implem->volFrac(a_vof);
810 }
811 /*******************************/
812 inline const Real& EBData::bndryArea(const VolIndex& a_vof, int face) const
813 {
814  return m_implem->bndryArea(a_vof, face);
815 }
816 inline const Real& EBData::bndryArea(const VolIndex& a_vof) const
817 {
818  return m_implem->bndryArea(a_vof);
819 }
820 /*******************************/
821 inline const RealVect& EBData::normal(const VolIndex& a_vof, int face) const
822 {
823  return m_implem->normal(a_vof, face);
824 }
825 inline const RealVect& EBData::normal(const VolIndex& a_vof) const
826 {
827  return m_implem->normal(a_vof);
828 }
829 /*******************************/
830 inline const RealVect& EBData::centroid(const VolIndex& a_vof) const
831 {
832  return m_implem->centroid(a_vof);
833 }
834 /*******************************/
835 inline const RealVect& EBData::bndryCentroid(const VolIndex& a_vof, int face) const
836 {
837  return m_implem->bndryCentroid(a_vof, face);
838 }
839 inline const RealVect& EBData::bndryCentroid(const VolIndex& a_vof) const
840 {
841  return m_implem->bndryCentroid(a_vof);
842 }
843 /*******************************/
844 inline const RealVect& EBData::centroid(const FaceIndex& a_face) const
845 {
846  return m_implem->centroid(a_face);
847 }
848 /*******************************/
849 inline const Real& EBData::areaFrac(const FaceIndex& a_face) const
850 {
851  return m_implem->areaFrac(a_face);
852 }
853 /*******************************/
854 
855 #include "NamespaceFooter.H"
856 #endif
void setToCovered()
Definition: EBData.H:177
Definition: EBData.H:125
EBData(const EBData &a_ebiin)
Definition: EBData.H:713
void computeNormalsAndBoundaryAreas(const EBGraph &a_graph, const Box &a_validRegion)
IndMomSpaceDim m_regularVolumeMoments
Definition: EBData.H:435
int facePhase(const VolIndex &a_vof, int a_face) const
used by multi-fluid code
Definition: EBData.H:676
IndMomSDMinOne m_faceMoments
Definition: EBData.H:170
void addEmptyIrregularVoFs(const IntVectSet &a_vofsToChange, const EBGraph &a_newGraph)
multifluid angels dancing on the heads of pins.
A reference-counting handle class.
Definition: RefCountedPtr.H:173
static bool s_verboseDebug
Definition: EBData.H:427
void setRegular(const Real a_dx)
set to a regular IndexTM
Definition: IndexedMomentsImplem.H:346
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
const Real & volFrac(const VolIndex &a_vof) const
const BaseIVFAB< VolData > & getVolData() const
Definition: EBData.H:785
IndMomSpaceDim getVolumeMoments(const VolIndex &a_vof) const
get the moment at the VoF associated with the monomial with the input exponents
Definition: EBData.H:595
void setFacePhase(const VolIndex &a_vof, int face, int phase)
used by multi-fluid code
Definition: EBData.H:688
EBDataImplem(const Box &a_box, int a_comps)
Definition: EBData.H:222
IndMomSDMinOne getFaceMoments(const FaceIndex &a_face) const
get the moment at the face associated with the monomial with the input exponents
IndMomSDMinOne getAreaMoments(const FaceIndex &a_face) const
I am sick of guessing this name wrong.
Definition: EBData.H:381
bool hasMoments() const
return true if higher order moments are available
Definition: EBData.H:340
Definition: EBIndexSpace.H:50
void define(const Box &a_box, int a_comps)
Definition: EBData.H:520
IndMomSpaceDim getEBNormalPartialDerivs(const VolIndex &a_vof, int normalComponent) const
Definition: EBData.H:165
void coarsenBoundaryAreaAndNormal(Real &a_bndryAreaCoar, RealVect &a_normalCoar, const Vector< Real > &a_bndryAreaFine, const Vector< RealVect > &a_normalFine)
void setToZero()
Definition: IndexedMoments.H:173
static bool s_verbose
Definition: EBData.H:426
const RealVect & centroid(const FaceIndex &facein) const
const RealVect & normal(const VolIndex &a_vof) const
Definition: EBData.H:825
const RealVect & bndryCentroid(const VolIndex &a_vof) const
IndMomSpaceDim getEBMoments(const VolIndex &a_vof) const
get the normal the irregular face associated with the monomial with the input exponents ...
Definition: FaceIndex.H:28
const RealVect & normal(const VolIndex &a_vof) const
static void setVerboseDebug(bool a_verboseDebug)
void defineVoFData(const EBGraph &a_graph, const Box &a_region)
each data holder is defined over the irregular cells of the graph
RealVect m_normal
Definition: EBData.H:54
IndMomSpaceDim getVolumeMoments(const VolIndex &a_vof) const
get the moment at the VoF associated with the monomial with the input exponents
const BaseIVFAB< VolData > & getVolData() const
Definition: EBData.H:333
void setBoundaryPhase(int phase)
Definition: EBData.H:708
Definition: EBISLevel.H:84
EBData & operator=(const EBData &a_ebiin)
Definition: EBData.H:728
IntVect BASISV(int dir)
Definition: IntVect.H:1257
BaseIVFAB< VolData > & getVolData()
Definition: EBData.H:329
void copy(const Box &a_regionFrom, const Interval &a_Cd, const Box &a_regionto, const EBData &a_source, const Interval &a_Cs)
Definition: EBData.H:541
IndMomSDMinOne getAreaMoments(const FaceIndex &a_face) const
I am sick of guessing this name wrong.
Definition: EBData.H:621
void coarsenFaces(const EBDataImplem &a_fineEBDataImplem, const EBGraph &a_fineGraph, const EBGraph &a_coarGraph, const Box &a_validRegion)
int facePhase(const VolIndex &a_vof, int aface) const
used by multi-fluid applications
static int preAllocatable()
Definition: EBData.H:324
Geometric description within a box.
Definition: EBGraph.H:427
bool m_isFaceDataDefined
Definition: EBData.H:441
const int SpaceDim
Definition: SPACE.H:38
Vector< BoundaryData > m_phaseFaces
Definition: EBData.H:133
IndMomSpaceDim getEBNormalPartialDerivs(const VolIndex &a_vof, int a_normalComponent) const
Definition: EBData.H:630
Definition: EBData.H:503
Definition: EBInterface.H:45
const VolIndex & faceIndex(const VolIndex &a_vof, int face) const
used by multi-fluid code
Definition: EBData.H:682
void resize(unsigned int isize)
Definition: Vector.H:346
void linearIn(void *buf, const Box &R, const Interval &comps)
IndMomSpaceDim getEBMoments(const VolIndex &a_vof) const
get the normal the irregular face associated with the monomial with the input exponents ...
Definition: EBData.H:605
EBData()
Definition: EBData.H:508
EBDataImplem(const EBDataImplem &ebiin)
Definition: EBData.H:454
void coarsenAreaFrac(Real &a_areaFracCoar, const Vector< Real > &a_areaFracFine)
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: EBData.H:750
void clearMultiBoundaries()
static const RealVect Zero
Definition: RealVect.H:421
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: EBData.H:744
BaseIFFAB< FaceData > m_faceData[SpaceDim]
Definition: EBData.H:438
int linearSize(const T &inputT)
Definition: SPMDI.H:21
BoundaryData(const Real &bndryArea, const RealVect &normal, const RealVect &bndryCentroid, int phase, const VolIndex &index)
Definition: EBData.H:42
Structure for passing component ranges in code.
Definition: Interval.H:23
void define(const EBGraph &a_graph, const Vector< IrregNode > &a_irregData, const Box &a_validBox, const Real &a_dx, bool a_hasMoments)
define the whole thing
Definition: EBData.H:553
const Real & volFrac(const VolIndex &a_vof) const
Definition: EBData.H:807
Real m_volFrac
Definition: EBData.H:129
IndMomSpaceDim getEBNormalMoments(const VolIndex &a_vof, int normalComponent) const
get the normal*moment at the irregular face associated with the monomial with the input exponents ...
void coarsenFaces(const EBData &a_fineEBData, const EBGraph &a_fineGraph, const EBGraph &a_coarGraph, const Box &a_validRegion)
Definition: EBData.H:582
void fetch(std::list< const VolData * > &fineVols, const Vector< VolIndex > &vofsFine) const
void define(const Box &box, int comps)
Definition: EBData.H:213
int size(const Box &R, const Interval &comps) const
IndMomSDMinOne m_regularAreaMoments
Definition: EBData.H:432
static void setVerbose(bool a_verbose)
double Real
Definition: REAL.H:33
void coarsenFaceCentroid(RealVect &a_centroidCoar, const Vector< RealVect > &a_centroidsFine, const Vector< Real > &a_areaFracFine, const Vector< FaceIndex > &a_facesFine, const FaceIndex &a_faceCoar)
BoundaryData m_averageFace
Definition: EBData.H:131
void setToZero()
Definition: EBData.H:82
RealVect m_bndryCentroid
Definition: EBData.H:55
void linearIn(T &a_outputT, const void *const inBuf)
Definition: SPMDI.H:27
IndMomSpaceDim m_EBNormalMoments[SpaceDim]
ebmoments with the the normal integrated in
Definition: EBData.H:79
RealVect m_volCentroid
Definition: EBData.H:130
Definition: EBData.H:198
int m_bndryPhase
Definition: EBData.H:56
int size(const Box &R, const Interval &comps) const
Definition: EBData.H:738
const RealVect & bndryCentroid(const VolIndex &a_vof) const
Definition: EBData.H:839
IndMomSpaceDim getEBNormalMoments(const VolIndex &a_vof, int a_normalComponent) const
get the normal*moment at the irregular face associated with the monomial with the input exponents ...
Definition: EBData.H:641
bool irregFace(const FaceIndex &a_face) const
static int preAllocatable()
Definition: EBData.H:791
BaseIVFAB< VolData > m_volData
Definition: EBData.H:429
int numFacePhase(const VolIndex &a_vof) const
void coarsenVolFracAndCentroid(Real &a_volFracCoar, RealVect &a_volCentroidCoar, const Vector< Real > &a_volFracFine, const Vector< RealVect > &a_volCentroidFine, const Vector< VolIndex > &a_fineVoFs, const VolIndex &a_coarVoF)
void operator=(const EBDataImplem &ebiin)
Definition: EBData.H:451
void linearOut(void *const a_outBuf, const T &inputT)
Definition: SPMDI.H:33
const Real & areaFrac(const FaceIndex &a_face1) const
Definition: EBData.H:849
void coarsenBndryCentroid(RealVect &a_bndryCentroidCoar, const Vector< RealVect > &a_bndryCentroidFine, const Vector< Real > &a_bndryAreaFine, const Vector< VolIndex > &a_fineVoFs, const VolIndex &a_coarVoF)
void shiftAndIncrement(IndMomSpaceDim &a_output, const IndMomSpaceDim &a_input, const RealVect &a_shiftRV)
IndMomSpaceDim m_normalPartialDeriv[SpaceDim]
the derivatives of the normal
Definition: EBData.H:72
EBData(const Box &a_box, int a_comps)
Definition: EBData.H:529
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
void setVolumeMomentsToZero(const VolIndex &a_vof)
BaseIVFAB< VolData > & getVolData()
Definition: EBData.H:780
IndMomSDMinOne getFaceMoments(const FaceIndex &a_face) const
get the moment at the face associated with the monomial with the input exponents
Definition: EBData.H:615
IndMomSpaceDim m_EBMoments
the moment at the irregular face associated with the monomial with the input exponents ...
Definition: EBData.H:65
bool m_hasMoments
Definition: EBData.H:447
void setToRegular(Real a_dx)
Definition: EBData.H:134
void setFaceIndex(const VolIndex &a_vof, int face, const VolIndex &index)
used by multi-fluid code
void setToCovered()
Definition: EBData.H:143
void linearOut(void *buf, const Box &R, const Interval &comps) const
void define(const EBGraph &a_graph, const Box &a_region, const Real &a_dx, bool a_hasMoments)
Definition: EBData.H:564
void setAreaMomentsToZero(const FaceIndex &a_face)
RealVect fineToCoarseTransform(const RealVect &a_finePoint, const IntVect &a_coarCell, const IntVect &a_fineCell)
void copy(const Box &a_regionFrom, const Interval &a_Cd, const Box &a_regionto, const EBDataImplem &a_source, const Interval &a_Cs)
const Real & bndryArea(const VolIndex &a_vof) const
Definition: EBData.H:816
BoundaryData & operator=(const BoundaryData &a_in)
Definition: EBData.H:96
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
bool irregVoF(const VolIndex &a_vof) const
void addFullIrregularVoFs(const IntVectSet &a_vofsToChange, const EBGraph &a_newGhostGraph, const BaseIVFAB< VolData > &a_newGhostData, const EBGraph &a_oldGhostGraph)
void coarsenVoFs(const EBData &a_fineEBData, const EBGraph &a_fineGraph, const EBGraph &a_coarGraph, const Box &a_validRegion)
Definition: EBData.H:573
bool hasMoments() const
return true if higher order moments are available
Definition: EBData.H:659
void addEmptyIrregularVoFs(const IntVectSet &a_vofsToChange, const EBGraph &a_newGraph)
multifluid angels dancing on the heads of pins.
Definition: EBData.H:768
~EBData()
Definition: EBData.H:513
RefCountedPtr< EBDataImplem > m_implem
Definition: EBData.H:800
void setToRegular(Real a_dx)
Definition: EBData.H:171
Volume of Fluid Index.
Definition: VolIndex.H:31
void defineFaceData(const EBGraph &a_graph, const Box &a_region)
each data holder is defined over the irregular cells of the graph
void clearMultiBoundaries()
Definition: EBData.H:704
bool m_isVoFDataDefined
Definition: EBData.H:444
const Real & bndryArea(const VolIndex &a_vof) const
const RealVect & centroid(const FaceIndex &facein) const
Definition: EBData.H:844
const Real & areaFrac(const FaceIndex &a_face1) const
Real m_areaFrac
Definition: EBData.H:168
void setCoveredAndRegular()
const VolIndex & faceIndex(const VolIndex &a_vof, int face) const
used by multi-fluid code
RealVect m_faceCentroid
Definition: EBData.H:169
Real m_bndryArea
Definition: EBData.H:53
int numFacePhase(const VolIndex &a_vof) const
Definition: EBData.H:699
void setBoundaryPhase(int phase)
Real m_dx
Definition: EBData.H:450
void setFacePhase(const VolIndex &a_vof, int face, int phase)
used by multi-fluid code
void addFullIrregularVoFs(const IntVectSet &a_vofsToChange, const EBGraph &a_newGraph, const BaseIVFAB< VolData > &a_grownData, const EBGraph &a_oldGraph)
Definition: EBData.H:757
void setFaceIndex(const VolIndex &a_vof, int face, const VolIndex &index)
used by multi-fluid code
Definition: EBData.H:694
bool operator==(const EBData &a_ebiin)
Definition: EBData.H:722
IndMomSpaceDim m_volumeMoments
Definition: EBData.H:132
VolIndex m_volIndex
Definition: EBData.H:57
Definition: EBData.H:37
void coarsenVoFs(const EBDataImplem &a_fineEBDataImplem, const EBGraph &a_fineGraph, const EBGraph &a_coarGraph, const Box &a_validRegion)