#include <ERF_EB.H>
|
| | ~eb_ () |
| |
| | eb_ (amrex::Geometry const &a_geom, amrex::FArrayBox const &terrain_fab, amrex::Gpu::DeviceVector< amrex::Real > &a_dz_stretched, bool is_anelastic) |
| |
| | eb_ () |
| |
| void | define (int level, amrex::Geometry const &a_geom, amrex::EB2::Level const *a_eb_level, bool is_anelastic) |
| |
| void | make_all_factories (int level, amrex::Geometry const &a_geom, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm, amrex::EB2::Level const &a_eb_level) |
| |
| void | make_cc_factory (int level, amrex::Geometry const &a_geom, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm, amrex::EB2::Level const &a_eb_level) |
| |
| int | nghost_basic () const |
| |
| int | nghost_volume () const |
| |
| int | nghost_full () const |
| |
| const std::unique_ptr< amrex::EBFArrayBoxFactory > & | get_const_factory () const noexcept |
| |
| void | set_connection_flags () |
| |
| eb_aux_ const * | get_u_const_factory () const noexcept |
| |
| eb_aux_ const * | get_v_const_factory () const noexcept |
| |
| eb_aux_ const * | get_w_const_factory () const noexcept |
| |
|
| void | make_terrain (amrex::Geometry const &a_geom) |
| |
| template<class F > |
| void | build_level (amrex::Geometry const &a_geom, amrex::EB2::GeometryShop< F > a_gshop) |
| | Construct EB levels from Geometry shop. More...
|
| |
| amrex::FabArray< amrex::EBCellFlagFab > & | getNonConstEBCellFlags (const amrex::EBFArrayBoxFactory &ebfact) |
| |
| amrex::MultiFab & | getNonConstVolFrac (const amrex::EBFArrayBoxFactory &ebfact) |
| |
| amrex::MultiCutFab & | getNonConstCentroid (const amrex::EBFArrayBoxFactory &ebfact) |
| |
| amrex::Array< amrex::MultiCutFab *, AMREX_SPACEDIM > | getNonConstAreaFrac (const amrex::EBFArrayBoxFactory &ebfact) |
| |
| amrex::Array< amrex::MultiCutFab *, AMREX_SPACEDIM > | getNonConstFaceCent (const amrex::EBFArrayBoxFactory &ebfact) |
| |
◆ ~eb_()
◆ eb_() [1/2]
| eb_::eb_ |
( |
amrex::Geometry const & |
a_geom, |
|
|
amrex::FArrayBox const & |
terrain_fab, |
|
|
amrex::Gpu::DeviceVector< amrex::Real > & |
a_dz_stretched, |
|
|
bool |
is_anelastic |
|
) |
| |
◆ eb_() [2/2]
amrex::EBSupport m_support_level
Definition: ERF_EB.H:61
int m_has_eb
Definition: ERF_EB.H:54
int m_write_eb_surface
Definition: ERF_EB.H:63
◆ build_level()
template<class F >
| void eb_::build_level |
( |
amrex::Geometry const & |
a_geom, |
|
|
amrex::EB2::GeometryShop< F > |
a_gshop |
|
) |
| |
|
inlineprivate |
Construct EB levels from Geometry shop.
86 amrex::EB2::Build(a_gshop, a_geom, req_lev, max_lev);
87 const amrex::EB2::IndexSpace& ebis = amrex::EB2::IndexSpace::top();
amrex::EB2::Level const * m_eb_level
EB level constructed from building GeometryShop.
Definition: ERF_EB.H:68
◆ define()
| void eb_::define |
( |
int |
level, |
|
|
amrex::Geometry const & |
a_geom, |
|
|
amrex::EB2::Level const * |
a_eb_level, |
|
|
bool |
is_anelastic |
|
) |
| |
◆ get_const_factory()
| const std::unique_ptr<amrex::EBFArrayBoxFactory>& eb_::get_const_factory |
( |
| ) |
const |
|
inlinenoexcept |
◆ get_u_const_factory()
| eb_aux_ const* eb_::get_u_const_factory |
( |
| ) |
const |
|
inlinenoexcept |
◆ get_v_const_factory()
| eb_aux_ const* eb_::get_v_const_factory |
( |
| ) |
const |
|
inlinenoexcept |
◆ get_w_const_factory()
| eb_aux_ const* eb_::get_w_const_factory |
( |
| ) |
const |
|
inlinenoexcept |
◆ getNonConstAreaFrac()
| amrex::Array<amrex::MultiCutFab*, AMREX_SPACEDIM> eb_::getNonConstAreaFrac |
( |
const amrex::EBFArrayBoxFactory & |
ebfact | ) |
|
|
inlineprivate |
116 auto afrac_const = ebfact.getAreaFrac();
117 amrex::Array<amrex::MultiCutFab*, AMREX_SPACEDIM> afrac;
118 for (
int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
119 afrac[dir] =
const_cast<amrex::MultiCutFab*
>(afrac_const[dir]);
◆ getNonConstCentroid()
| amrex::MultiCutFab& eb_::getNonConstCentroid |
( |
const amrex::EBFArrayBoxFactory & |
ebfact | ) |
|
|
inlineprivate |
109 const amrex::MultiCutFab& vcent_const = ebfact.getCentroid();
110 return const_cast<amrex::MultiCutFab&
>(vcent_const);
◆ getNonConstEBCellFlags()
| amrex::FabArray<amrex::EBCellFlagFab>& eb_::getNonConstEBCellFlags |
( |
const amrex::EBFArrayBoxFactory & |
ebfact | ) |
|
|
inlineprivate |
95 const amrex::FabArray<amrex::EBCellFlagFab>& flags_const = ebfact.getMultiEBCellFlagFab();
96 return const_cast<amrex::FabArray<amrex::EBCellFlagFab>&
>(flags_const);
Referenced by set_connection_flags().
◆ getNonConstFaceCent()
| amrex::Array<amrex::MultiCutFab*, AMREX_SPACEDIM> eb_::getNonConstFaceCent |
( |
const amrex::EBFArrayBoxFactory & |
ebfact | ) |
|
|
inlineprivate |
127 auto fcent_const = ebfact.getFaceCent();
128 amrex::Array<amrex::MultiCutFab*, AMREX_SPACEDIM> fcent;
129 for (
int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
130 fcent[dir] =
const_cast<amrex::MultiCutFab*
>(fcent_const[dir]);
◆ getNonConstVolFrac()
| amrex::MultiFab& eb_::getNonConstVolFrac |
( |
const amrex::EBFArrayBoxFactory & |
ebfact | ) |
|
|
inlineprivate |
102 const amrex::MultiFab& vfrac_const = ebfact.getVolFrac();
103 return const_cast<amrex::MultiFab&
>(vfrac_const);
◆ make_all_factories()
| void eb_::make_all_factories |
( |
int |
level, |
|
|
amrex::Geometry const & |
a_geom, |
|
|
amrex::BoxArray const & |
ba, |
|
|
amrex::DistributionMapping const & |
dm, |
|
|
amrex::EB2::Level const & |
a_eb_level |
|
) |
| |
39 Print() <<
"making EB factory\n";
40 m_factory = std::make_unique<EBFArrayBoxFactory>(a_eb_level, a_geom, ba, dm,
47 Print() <<
"making EB staggered u-factory\n";
55 Print() <<
"making EB staggered v-factory\n";
63 Print() <<
"making EB staggered w-factory\n";
69 Print() <<
"\nDone making EB factory at level = " << level <<
".\n\n";
int nghost_volume() const
Definition: ERF_EB.H:43
int nghost_full() const
Definition: ERF_EB.H:44
int nghost_basic() const
Definition: ERF_EB.H:42
void set_connection_flags()
Definition: ERF_EB.cpp:91
void define(int const &a_level, int const &a_idim, amrex::Geometry const &a_geom, amrex::BoxArray const &a_grids, amrex::DistributionMapping const &a_dmap, amrex::Vector< int > const &a_ngrow, amrex::EBFArrayBoxFactory const *a_factory)
Definition: ERF_EBAux.cpp:25
◆ make_cc_factory()
| void eb_::make_cc_factory |
( |
int |
level, |
|
|
amrex::Geometry const & |
a_geom, |
|
|
amrex::BoxArray const & |
ba, |
|
|
amrex::DistributionMapping const & |
dm, |
|
|
amrex::EB2::Level const & |
a_eb_level |
|
) |
| |
79 Print() <<
"making EB factory\n";
80 m_factory = std::make_unique<EBFArrayBoxFactory>(a_eb_level, a_geom, ba, dm,
83 Print() <<
"\nDone making EB factory at level " << level <<
".\n\n";
◆ make_terrain()
| void eb_::make_terrain |
( |
amrex::Geometry const & |
a_geom | ) |
|
|
private |
◆ nghost_basic()
| int eb_::nghost_basic |
( |
| ) |
const |
|
inline |
◆ nghost_full()
| int eb_::nghost_full |
( |
| ) |
const |
|
inline |
◆ nghost_volume()
| int eb_::nghost_volume |
( |
| ) |
const |
|
inline |
◆ set_connection_flags()
| void eb_::set_connection_flags |
( |
| ) |
|
96 const MultiFab& volfrac =
m_factory->getVolFrac();
98 for (MFIter mfi(cellflag,
false); mfi.isValid(); ++mfi) {
99 const Box& bx = mfi.validbox();
100 const Box gbx = amrex::grow(bx, cellflag.nGrow()-1);
102 Array4<EBCellFlag>
const& flag = cellflag.array(mfi);
103 Array4<Real const>
const& vfrac = volfrac.const_array(mfi);
105 ParallelFor(gbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
107 for(
int kk(-1); kk<=1; kk++) {
108 for(
int jj(-1); jj<=1; jj++) {
109 for(
int ii(-1); ii<=1; ii++)
111 if (vfrac(i+ii,j+jj,k+kk) == 0.0) {
112 flag(i,j,k).setDisconnected(ii,jj,kk);
117 ParallelFor(gbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
119 if (vfrac(i,j,k)==0.0) {
120 flag(i,j,k).setCovered();
amrex::FabArray< amrex::EBCellFlagFab > & getNonConstEBCellFlags(const amrex::EBFArrayBoxFactory &ebfact)
Definition: ERF_EB.H:93
Referenced by make_all_factories().
◆ m_cellflags
| amrex::FabArray<amrex::EBCellFlagFab>* eb_::m_cellflags = nullptr |
|
private |
◆ m_eb_level
| amrex::EB2::Level const* eb_::m_eb_level |
|
private |
EB level constructed from building GeometryShop.
Referenced by build_level().
◆ m_factory
| std::unique_ptr<amrex::EBFArrayBoxFactory> eb_::m_factory = nullptr |
|
private |
◆ m_has_eb
◆ m_support_level
| amrex::EBSupport eb_::m_support_level |
|
private |
◆ m_type
◆ m_u_factory
◆ m_v_factory
◆ m_w_factory
◆ m_write_eb_surface
| int eb_::m_write_eb_surface |
|
private |
The documentation for this class was generated from the following files: