3 #include <AMReX_Config.H>
13 #include <type_traits>
49 "Have you forgot to call EB2::build? It's required even if the geometry is all regular.");
75 int required_coarsening_level,
int max_coarsening_level,
76 int ngrow,
bool build_coarse_level_by_coarsening,
89 return m_geom.back().Domain();
94 using F =
typename G::FunctionType;
114 template <
typename G>
117 int required_coarsening_level,
int max_coarsening_level,
118 int ngrow = 4,
bool build_coarse_level_by_coarsening =
true,
124 required_coarsening_level,
125 max_coarsening_level,
126 ngrow, build_coarse_level_by_coarsening,
132 int required_coarsening_level,
133 int max_coarsening_level,
135 bool build_coarse_level_by_coarsening =
true,
141 int required_coarsening_level,
142 int max_coarsening_level,
144 bool build_coarse_level_by_coarsening =
true,
#define BL_PROFILE(a)
Definition: AMReX_BLProfiler.H:551
#define AMREX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
Definition: AMReX_BLassert.H:49
#define AMREX_EXPORT
Definition: AMReX_Extension.H:191
Definition: AMReX_EB2.H:71
typename G::FunctionType F
Definition: AMReX_EB2.H:94
const Level & getLevel(const Geometry &geom) const final
Definition: AMReX_EB2_IndexSpaceI.H:68
Vector< GShopLevel< G > > m_gslevel
Definition: AMReX_EB2.H:103
Vector< int > m_ngrow
Definition: AMReX_EB2.H:106
int m_num_coarsen_opt
Definition: AMReX_EB2.H:101
~IndexSpaceImp() override=default
void addFineLevels(int num_new_fine_levels) final
Definition: AMReX_EB2_IndexSpaceI.H:86
IndexSpaceImp(IndexSpaceImp< G > const &)=delete
Vector< Geometry > m_geom
Definition: AMReX_EB2.H:104
void addRegularCoarseLevels(int num_new_coarse_levels) final
Definition: AMReX_EB2_IndexSpaceI.H:112
G m_gshop
Definition: AMReX_EB2.H:98
Vector< Box > m_domain
Definition: AMReX_EB2.H:105
const Box & coarsestDomain() const final
Definition: AMReX_EB2.H:88
bool m_extend_domain_face
Definition: AMReX_EB2.H:100
const Geometry & getGeometry(const Box &dom) const final
Definition: AMReX_EB2_IndexSpaceI.H:77
IndexSpaceImp(IndexSpaceImp< G > &&)=delete
bool m_build_coarse_level_by_coarsening
Definition: AMReX_EB2.H:99
void operator=(IndexSpaceImp< G > const &)=delete
IndexSpaceImp(const G &gshop, const Geometry &geom, int required_coarsening_level, int max_coarsening_level, int ngrow, bool build_coarse_level_by_coarsening, bool extend_domain_face, int num_coarsen_opt)
Definition: AMReX_EB2_IndexSpaceI.H:3
Definition: AMReX_EB2.H:26
IndexSpace() noexcept=default
virtual void addFineLevels(int num_new_fine_levels)=0
static void pop() noexcept
Definition: AMReX_EB2.H:45
static void push(IndexSpace *ispace)
Definition: AMReX_EB2.cpp:53
virtual const Geometry & getGeometry(const Box &domain) const =0
virtual const Level & getLevel(const Geometry &geom) const =0
virtual const Box & coarsestDomain() const =0
static bool empty() noexcept
Definition: AMReX_EB2.H:52
virtual void addRegularCoarseLevels(int num_new_coarse_levels)=0
static AMREX_EXPORT Vector< std::unique_ptr< IndexSpace > > m_instance
Definition: AMReX_EB2.H:62
static int size() noexcept
Definition: AMReX_EB2.H:53
virtual ~IndexSpace()=default
static void clear() noexcept
Definition: AMReX_EB2.H:46
static const IndexSpace & top()
Definition: AMReX_EB2.H:47
static void erase(IndexSpace *ispace)
Definition: AMReX_EB2.cpp:66
Definition: AMReX_EB2_Level.H:33
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
Definition: AMReX_FabArrayBase.H:32
int NumCoarsenOpt()
Definition: AMReX_EB2.cpp:47
void Build(const Geometry &geom, int required_coarsening_level, int max_coarsening_level, int ngrow, bool build_coarse_level_by_coarsening, bool a_extend_domain_face, int a_num_coarsen_opt)
Definition: AMReX_EB2.cpp:84
void addRegularCoarseLevels(int num_new_coarse_levels)
Definition: AMReX_EB2.cpp:246
AMREX_EXPORT int max_grid_size
Definition: AMReX_EB2.cpp:23
bool ExtendDomainFace()
Definition: AMReX_EB2.cpp:42
int maxCoarseningLevel(const Geometry &geom)
Definition: AMReX_EB2.cpp:282
const IndexSpace * TopIndexSpace() noexcept
Definition: AMReX_EB2.H:66
void Initialize()
Definition: AMReX_EB2.cpp:27
void addFineLevels(int num_new_fine_levels)
Definition: AMReX_EB2.cpp:237
AMREX_EXPORT bool extend_domain_face
Definition: AMReX_EB2.cpp:24
AMREX_EXPORT int num_coarsen_opt
Definition: AMReX_EB2.cpp:25
const IndexSpace * TopIndexSpaceIfPresent() noexcept
Definition: AMReX_EB2.cpp:76
void BuildFromChkptFile(std::string const &fname, const Geometry &geom, int required_coarsening_level, int max_coarsening_level, int ngrow, bool build_coarse_level_by_coarsening, bool a_extend_domain_face)
Definition: AMReX_EB2.cpp:255
void Finalize()
Definition: AMReX_EB2.cpp:37