26 #include <AMReX_Geometry.H>
29 #include <fmt/ranges.h>
31 #ifndef FUB_AMREX_CARTESIAN_GRID_GEOMETRY_HPP
32 #define FUB_AMREX_CARTESIAN_GRID_GEOMETRY_HPP
41 template <
typename Log>
void Print(
Log& log);
45 std::array<double, AMREX_SPACEDIM>{},
46 std::array<double, AMREX_SPACEDIM>{AMREX_D_DECL(1.0, 1.0, 1.0)}};
51 std::array<double, AMREX_SPACEDIM> xlo{};
52 std::array<double, AMREX_SPACEDIM> xup{};
53 std::copy_n(
coordinates.lo(), AMREX_SPACEDIM, xlo.data());
54 std::copy_n(
coordinates.hi(), AMREX_SPACEDIM, xup.data());
55 BOOST_LOG(log) << fmt::format(
" - cell_dimensions = {{{}}}",
57 BOOST_LOG(log) << fmt::format(
" - coordinates:lower = {{{}}}", fmt::join(xlo,
", "));
58 BOOST_LOG(log) << fmt::format(
" - coordinates:upper = {{{}}}", fmt::join(xup,
", "));
59 BOOST_LOG(log) << fmt::format(
" - periodicity = {{{}}}",
66 const ::amrex::RealArray& rx);
69 const ::amrex::Geometry& geom);
Definition: AMReX/Geometry.hpp:30
::amrex::RealBox DomainAroundCenter(const ::amrex::RealArray &x, const ::amrex::RealArray &rx)
::amrex::Geometry GetCoarseGeometry(const CartesianGridGeometry &grid_geometry)
::amrex::Box BoxWhichContains(const ::amrex::RealBox &xbox, const ::amrex::Geometry &geom)
The fub namespace.
Definition: AnyBoundaryCondition.hpp:31
void Log(std::string message, Duration timepoint, boost::log::trivial::severity_level level=boost::log::trivial::severity_level::info)
IndexBox< Rank > Box(const BasicView< State, Layout, Rank > &view)
Definition: State.hpp:486
std::map< std::string, pybind11::object > ProgramOptions
Definition: ProgramOptions.hpp:40
Definition: CartesianGridGeometry.hpp:37
CartesianGridGeometry(const ProgramOptions &options)
::amrex::RealBox coordinates
Definition: CartesianGridGeometry.hpp:44
void Print(Log &log)
Definition: CartesianGridGeometry.hpp:50
std::array< int, AMREX_SPACEDIM > periodicity
Definition: CartesianGridGeometry.hpp:47
std::array< int, AMREX_SPACEDIM > cell_dimensions
Definition: CartesianGridGeometry.hpp:43
CartesianGridGeometry()=default