Block-Structured AMR Software Framework
AMReX_EBDataCollection.H
Go to the documentation of this file.
1 #ifndef AMREX_EB_DATA_COLLECTION_H_
2 #define AMREX_EB_DATA_COLLECTION_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_Geometry.H>
6 #include <AMReX_EBCellFlag.H>
7 #include <AMReX_EBSupport.H>
8 #include <AMReX_Array.H>
9 
10 namespace amrex {
11 
12 class EBFArrayBoxFactory;
13 template <class T> class FabArray;
14 class MultiFab;
15 class iMultiFab;
16 class MultiCutFab;
17 namespace EB2 { class Level; }
18 
20 {
21 public:
22 
23  friend class EBFArrayBoxFactory;
24 
25  EBDataCollection (const EB2::Level& a_level, const Geometry& a_geom,
26  const BoxArray& a_ba, const DistributionMapping& a_dm,
27  Vector<int> a_ngrow, EBSupport a_support);
28 
30 
35 
36  [[nodiscard]] const FabArray<EBCellFlagFab>& getMultiEBCellFlagFab () const;
37  [[nodiscard]] const MultiFab& getLevelSet () const;
38  [[nodiscard]] const MultiFab& getVolFrac () const;
39  [[nodiscard]] const MultiCutFab& getCentroid () const;
40  [[nodiscard]] const MultiCutFab& getBndryCent () const;
41  [[nodiscard]] const MultiCutFab& getBndryArea () const;
42  [[nodiscard]] const MultiCutFab& getBndryNormal () const;
46  [[nodiscard]] const iMultiFab* getCutCellMask () const;
47 
48  // public for cuda
49  void extendDataOutsideDomain (IntVect const& level_ng);
50 
51 private:
52 
56 
57  // have to use pointer to break include loop
58 
59  // EBSupport::basic
61  MultiFab* m_levelset = nullptr;
62 
63  // EBSupport::volume
64  MultiFab* m_volfrac = nullptr;
65  MultiCutFab* m_centroid = nullptr;
66 
67  // EBSupport::full
74 
75  // for levels created by addRegularCoarseLevels only
77 };
78 
79 }
80 
81 #endif
#define AMREX_D_DECL(a, b, c)
Definition: AMReX_SPACE.H:104
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:550
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
Definition: AMReX_EB2_Level.H:33
Definition: AMReX_EBDataCollection.H:20
const MultiCutFab & getCentroid() const
Definition: AMReX_EBDataCollection.cpp:275
Array< MultiCutFab *, AMREX_SPACEDIM > m_facecent
Definition: AMReX_EBDataCollection.H:72
EBDataCollection(const EB2::Level &a_level, const Geometry &a_geom, const BoxArray &a_ba, const DistributionMapping &a_dm, Vector< int > a_ngrow, EBSupport a_support)
Definition: AMReX_EBDataCollection.cpp:13
iMultiFab * m_cutcellmask
Definition: AMReX_EBDataCollection.H:76
Array< MultiCutFab *, AMREX_SPACEDIM > m_edgecent
Definition: AMReX_EBDataCollection.H:73
EBDataCollection(EBDataCollection &&)=delete
FabArray< EBCellFlagFab > * m_cellflags
Definition: AMReX_EBDataCollection.H:60
void extendDataOutsideDomain(IntVect const &level_ng)
Definition: AMReX_EBDataCollection.cpp:86
Geometry m_geom
Definition: AMReX_EBDataCollection.H:55
MultiCutFab * m_bndrynorm
Definition: AMReX_EBDataCollection.H:70
const MultiFab & getLevelSet() const
Definition: AMReX_EBDataCollection.cpp:261
const MultiCutFab & getBndryCent() const
Definition: AMReX_EBDataCollection.cpp:282
MultiCutFab * m_bndrycent
Definition: AMReX_EBDataCollection.H:68
Vector< int > m_ngrow
Definition: AMReX_EBDataCollection.H:53
MultiCutFab * m_bndryarea
Definition: AMReX_EBDataCollection.H:69
const MultiCutFab & getBndryArea() const
Definition: AMReX_EBDataCollection.cpp:289
const iMultiFab * getCutCellMask() const
Definition: AMReX_EBDataCollection.cpp:324
const MultiFab & getVolFrac() const
Definition: AMReX_EBDataCollection.cpp:268
EBSupport m_support
Definition: AMReX_EBDataCollection.H:54
EBDataCollection & operator=(const EBDataCollection &)=delete
MultiFab * m_levelset
Definition: AMReX_EBDataCollection.H:61
MultiFab * m_volfrac
Definition: AMReX_EBDataCollection.H:64
~EBDataCollection()
Definition: AMReX_EBDataCollection.cpp:236
EBDataCollection(const EBDataCollection &)=delete
Array< MultiCutFab *, AMREX_SPACEDIM > m_areafrac
Definition: AMReX_EBDataCollection.H:71
const FabArray< EBCellFlagFab > & getMultiEBCellFlagFab() const
Definition: AMReX_EBDataCollection.cpp:254
Array< const MultiCutFab *, AMREX_SPACEDIM > getFaceCent() const
Definition: AMReX_EBDataCollection.cpp:303
const MultiCutFab & getBndryNormal() const
Definition: AMReX_EBDataCollection.cpp:317
Array< const MultiCutFab *, AMREX_SPACEDIM > getAreaFrac() const
Definition: AMReX_EBDataCollection.cpp:296
Array< const MultiCutFab *, AMREX_SPACEDIM > getEdgeCent() const
Definition: AMReX_EBDataCollection.cpp:310
MultiCutFab * m_centroid
Definition: AMReX_EBDataCollection.H:65
Definition: AMReX_EBFabFactory.H:24
An Array of FortranArrayBox(FAB)-like Objects.
Definition: AMReX_FabArray.H:344
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
Definition: AMReX_MultiCutFab.H:81
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
Definition: AMReX_iMultiFab.H:32
Definition: AMReX_Amr.cpp:49
EBSupport
Definition: AMReX_EBSupport.H:7
std::array< T, N > Array
Definition: AMReX_Array.H:24