Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_Geometry.H
Go to the documentation of this file.
1#ifndef AMREX_GEOMETRY_H_
2#define AMREX_GEOMETRY_H_
3#include <AMReX_Config.H>
4
10#include <AMReX_Array.H>
11#include <AMReX_CoordSys.H>
13#include <AMReX_RealBox.H>
14#include <AMReX_Periodicity.H>
15
16#ifdef AMREX_USE_OMP
17#include <omp.h>
18#endif
19
20#include <iosfwd>
21#include <map>
22#include <numbers>
23
24namespace amrex {
25
26class MultiFab;
27class DistributionMapping;
28class BoxArray;
29
36{
39 const Real* CellSize () const noexcept { return dx; }
42 Real CellSize (int dir) const noexcept { return dx[dir]; }
45 const Real* ProbLo () const noexcept { return prob_domain.lo(); }
48 Real ProbLo (int dir) const noexcept { return prob_domain.lo(dir); }
51 const Real* ProbHi () const noexcept { return prob_domain.hi(); }
54 Real ProbHi (int dir) const noexcept { return prob_domain.hi(dir); }
57 const Box& Domain () const noexcept { return domain; }
60 int isPeriodic (const int i) const noexcept { return is_periodic[i]; }
63 int Coord () const noexcept { return coord; }
64
65public:
68 Real dx[AMREX_SPACEDIM];
69 int is_periodic[AMREX_SPACEDIM];
70 int coord;
71};
72
83 :
84 public CoordSys
85{
86public:
93 Geometry () noexcept;
94
108 explicit Geometry (const Box& dom,
109 const RealBox* rb = nullptr,
110 int coord = -1,
111 int const* is_per = nullptr);
124 Geometry (const Box& dom, const RealBox& rb, int coord,
125 Array<int,AMREX_SPACEDIM> const& is_per);
126
127 ~Geometry () = default;
128 Geometry (const Geometry& rhs) = default;
129 Geometry (Geometry&& rhs) noexcept = default;
130 Geometry& operator= (const Geometry& rhs) = default;
131 Geometry& operator= (Geometry&& rhs) noexcept = default;
132
134 [[nodiscard]] GeometryData data() const noexcept {
135 return {
136 .prob_domain = prob_domain,
137 .domain = domain,
138 .dx = {AMREX_D_DECL(dx[0],dx[1],dx[2])},
139 .is_periodic = {AMREX_D_DECL(is_periodic[0], is_periodic[1], is_periodic[2])},
140 .coord = static_cast<int>(c_sys)
141 };
142 }
143
162 static void Setup (const RealBox* rb = nullptr, int coord = -1, int const* isper = nullptr);
164 static void ResetDefaultProbDomain (const RealBox& rb) noexcept;
166 static void ResetDefaultPeriodicity (const Array<int,AMREX_SPACEDIM>& is_per) noexcept;
168 static void ResetDefaultCoord (int coord) noexcept;
169
183 void define (const Box& dom, const RealBox* rb = nullptr, int coord = -1, int const* is_per = nullptr);
184
197 void define (const Box& dom, const RealBox& rb, int coord, Array<int,AMREX_SPACEDIM> const& is_per);
198
200 [[nodiscard]] const RealBox& ProbDomain () const noexcept { return prob_domain; }
202 void ProbDomain (const RealBox& rb)
203 {
204 prob_domain = rb;
206 }
208 [[nodiscard]] const Real* ProbLo () const noexcept { return prob_domain.lo(); }
210 [[nodiscard]] const Real* ProbHi () const noexcept { return prob_domain.hi(); }
212 [[nodiscard]] Real ProbLo (int dir) const noexcept { return prob_domain.lo(dir); }
214 [[nodiscard]] Real ProbHi (int dir) const noexcept { return prob_domain.hi(dir); }
215
217 [[nodiscard]] GpuArray<Real,AMREX_SPACEDIM> ProbLoArray () const noexcept {
218 return {{AMREX_D_DECL(prob_domain.lo(0),prob_domain.lo(1),prob_domain.lo(2))}};
219 }
220
222 [[nodiscard]] GpuArray<Real,AMREX_SPACEDIM> ProbHiArray () const noexcept {
223 return {{AMREX_D_DECL(prob_domain.hi(0),prob_domain.hi(1),prob_domain.hi(2))}};
224 }
225
228 return roundoff_lo;
229 }
230
233 return roundoff_hi;
234 }
235
237 [[nodiscard]] Real ProbSize () const noexcept
238 {
239 return AMREX_D_TERM(prob_domain.length(0),*prob_domain.length(1),*prob_domain.length(2));
240 }
242 [[nodiscard]] Real ProbLength (int dir) const noexcept { return prob_domain.length(dir); }
244 [[nodiscard]] const Box& Domain () const noexcept { return domain; }
246 void Domain (const Box& bx)
247 {
249 domain = bx;
251 }
257 void GetVolume (MultiFab& vol,
258 const BoxArray& grds,
259 const DistributionMapping& dm,
260 int grow) const;
262 void GetVolume (MultiFab& vol) const;
263
268 void GetVolume (FArrayBox& vol,
269 const BoxArray& grds,
270 int idx,
271 int grow) const;
272
275 static Real Volume (const IntVect& point, const GeometryData& geomdata)
276 {
277 const auto *dx = geomdata.CellSize();
278
279 Real vol;
280
281#if AMREX_SPACEDIM == 1
282
283 auto coord = geomdata.Coord();
284
285 if (coord == CoordSys::cartesian) {
286 // Cartesian
287
288 vol = dx[0];
289 }
290 else {
291 // Spherical
292
293 Real rl = geomdata.ProbLo()[0] + static_cast<Real>(point[0]) * dx[0];
294 Real rr = rl + dx[0];
295
296 constexpr Real pi = std::numbers::pi_v<Real>;
297 vol = (4.0_rt / 3.0_rt) * pi * dx[0] * (rl * rl + rl * rr + rr * rr);
298 }
299
300#elif AMREX_SPACEDIM == 2
301
302 auto coord = geomdata.Coord();
303
304 if (coord == CoordSys::cartesian) {
305 // Cartesian
306
307 vol = dx[0] * dx[1];
308 }
309 else if (coord == CoordSys::RZ) {
310 // Cylindrical
311
312 Real r_l = geomdata.ProbLo()[0] + static_cast<Real>(point[0]) * dx[0];
313 Real r_r = geomdata.ProbLo()[0] + static_cast<Real>(point[0]+1) * dx[0];
314
315 constexpr Real pi = std::numbers::pi_v<Real>;
316 vol = pi * (r_l + r_r) * dx[0] * dx[1];
317 }
318 else {
319 // Spherical
320
321 Real r_l = geomdata.ProbLo()[0] + static_cast<Real>(point[0]) * dx[0];
322 Real r_r = geomdata.ProbLo()[0] + static_cast<Real>(point[0]+1) * dx[0];
323
324 Real theta_l = geomdata.ProbLo()[1] + static_cast<Real>(point[1]) * dx[1];
325 Real theta_r = geomdata.ProbLo()[1] + static_cast<Real>(point[1]+1) * dx[1];
326
327 constexpr Real twoThirdsPi = static_cast<Real>((2.0 / 3.0) * std::numbers::pi_v<Real>);
328 vol = twoThirdsPi * (std::cos(theta_l) - std::cos(theta_r)) * dx[0] *
329 (r_r*r_r + r_r*r_l + r_l*r_l);
330 }
331
332#else
333
335
336 // Cartesian
337
338 vol = dx[0] * dx[1] * dx[2];
339
340#endif
341
342 return vol;
343 }
344
354 void GetDLogA (MultiFab& dloga,
355 const BoxArray& grds,
356 const DistributionMapping& dm,
357 int dir,
358 int grow) const;
365 void GetFaceArea (MultiFab& area,
366 const BoxArray& grds,
367 const DistributionMapping& dm,
368 int dir,
369 int grow) const;
374 void GetFaceArea (MultiFab& area,
375 int dir) const;
376
382 void GetFaceArea (FArrayBox& area,
383 const BoxArray& grds,
384 int idx,
385 int dir,
386 int grow) const;
388 [[nodiscard]] bool isPeriodic (int dir) const noexcept { return is_periodic[dir]; }
390 [[nodiscard]] bool isAnyPeriodic () const noexcept
391 {
392 return AMREX_D_TERM(isPeriodic(0),||isPeriodic(1),||isPeriodic(2));
393 }
395 [[nodiscard]] bool isAllPeriodic () const noexcept
396 {
397 return AMREX_D_TERM(isPeriodic(0),&&isPeriodic(1),&&isPeriodic(2));
398 }
400 [[nodiscard]] Array<int,AMREX_SPACEDIM> isPeriodic () const noexcept {
401 return {{AMREX_D_DECL(static_cast<int>(is_periodic[0]),
402 static_cast<int>(is_periodic[1]),
403 static_cast<int>(is_periodic[2]))}};
404 }
406 [[nodiscard]] GpuArray<int,AMREX_SPACEDIM> isPeriodicArray () const noexcept {
407 return {{AMREX_D_DECL(static_cast<int>(is_periodic[0]),
408 static_cast<int>(is_periodic[1]),
409 static_cast<int>(is_periodic[2]))}};
410 }
412 [[nodiscard]] int period (int dir) const noexcept { BL_ASSERT(is_periodic[dir]); return domain.length(dir); }
413
415 [[nodiscard]] Periodicity periodicity () const noexcept {
416 return Periodicity(IntVect(AMREX_D_DECL(domain.length(0) * is_periodic[0],
417 domain.length(1) * is_periodic[1],
418 domain.length(2) * is_periodic[2])));
419 }
420
422 [[nodiscard]] Periodicity periodicity (const Box& b) const noexcept {
423 AMREX_ASSERT(b.cellCentered());
424 return Periodicity(IntVect(AMREX_D_DECL(b.length(0) * is_periodic[0],
425 b.length(1) * is_periodic[1],
426 b.length(2) * is_periodic[2])));
427 }
428
440 void periodicShift (const Box& target,
441 const Box& src,
442 Vector<IntVect>& out) const noexcept;
443
445 [[nodiscard]] Box growNonPeriodicDomain (IntVect const& ngrow) const noexcept;
447 [[nodiscard]] Box growNonPeriodicDomain (int ngrow) const noexcept;
449 [[nodiscard]] Box growPeriodicDomain (IntVect const& ngrow) const noexcept;
451 [[nodiscard]] Box growPeriodicDomain (int ngrow) const noexcept;
452
462 Array<int,AMREX_SPACEDIM> r{{AMREX_D_DECL(is_periodic[0],
463 is_periodic[1],
464 is_periodic[2])}};
465 AMREX_D_TERM(is_periodic[0] = period[0];,
466 is_periodic[1] = period[1];,
467 is_periodic[2] = period[2];);
468 return r;
469 }
470
477 void coarsen (IntVect const& rr) {
478 domain.coarsen(rr);
479 for (int i = 0; i < AMREX_SPACEDIM; ++i) {
480 dx[i] = (ProbHi(i) - ProbLo(i)) / static_cast<Real>(domain.length(i));
481 inv_dx[i] = Real(1.)/dx[i];
482 }
483 }
484
491 void refine (IntVect const& rr) {
492 domain.refine(rr);
493 for (int i = 0; i < AMREX_SPACEDIM; ++i) {
494 dx[i] = (ProbHi(i) - ProbLo(i)) / static_cast<Real>(domain.length(i));
495 inv_dx[i] = Real(1.)/dx[i];
496 }
497 }
498
506
514
516 void computeRoundoffDomain ();
517
519 [[nodiscard]] GpuArray<ParticleReal, AMREX_SPACEDIM> const&
520 RoundOffLo () const { return roundoff_lo; }
521
523 [[nodiscard]] GpuArray<ParticleReal, AMREX_SPACEDIM> const&
524 RoundOffHi () const { return roundoff_hi; }
525
526private:
527 void read_params ();
528
529 // is_periodic and RealBox used to be static
530 bool is_periodic[AMREX_SPACEDIM] = {AMREX_D_DECL(false,false,false)};
531 RealBox prob_domain;
532
533 // Due to round-off errors, not all floating point numbers for which plo >= x < phi
534 // will map to a cell that is inside "domain". "roundoff_{lo,hi}" store
535 // positions that are very close to that in prob_domain, and for which all doubles and floats
536 // between them will map to a cell inside domain.
537 GpuArray<ParticleReal , AMREX_SPACEDIM> roundoff_lo, roundoff_hi;
538
539 //
540 Box domain;
541
542 friend std::istream& operator>> (std::istream&, Geometry&);
543};
544
545
550std::ostream& operator<< (std::ostream&, const Geometry&);
555std::istream& operator>> (std::istream&, Geometry&);
556
563inline
564Geometry
565coarsen (Geometry const& fine, IntVect const& rr) {
566 Geometry r{fine};
567 r.coarsen(rr);
568 return r;
569}
570
577inline
578Geometry
579coarsen (Geometry const& fine, int rr) { return coarsen(fine, IntVect(rr)); }
580
587inline
588Geometry
589refine (Geometry const& crse, IntVect const& rr) {
590 Geometry r{crse};
591 r.refine(rr);
592 return r;
593}
594
601inline
602Geometry
603refine (Geometry const& crse, int rr) { return refine(crse, IntVect(rr)); }
604
609inline
610const Geometry&
612 return *(AMReX::top()->getDefaultGeometry());
613}
614
615}
616
617#endif /*_GEOMETRY_H_*/
Fixed-size array types for use on GPU and CPU.
#define BL_ASSERT(EX)
Definition AMReX_BLassert.H:39
#define AMREX_ASSERT(EX)
Definition AMReX_BLassert.H:38
Coordinate system that maps between physical space and index space.
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:124
#define AMREX_INLINE
Definition AMReX_Extension.H:132
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
Array4< Real > fine
Definition AMReX_InterpFaceRegister.cpp:90
Array4< Real const > crse
Definition AMReX_InterpFaceRegister.cpp:92
#define AMREX_D_TERM(a, b, c)
Definition AMReX_SPACE.H:172
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
Geometry * getDefaultGeometry() noexcept
Geometry owned by this context (constructed with the AMReX object).
Definition AMReX.H:534
static AMReX * top() noexcept
Pointer to the most recently pushed instance.
Definition AMReX.H:516
Reference-counted collection of Boxes.
Definition AMReX_BoxArray.H:676
__host__ __device__ bool cellCentered() const noexcept
Return true if BoxND is cell-centered in all indexing directions.
Definition AMReX_Box.H:356
__host__ __device__ IntVectND< dim > length() const noexcept
Return the length of the BoxND.
Definition AMReX_Box.H:167
__host__ __device__ BoxND & coarsen(int ref_ratio) noexcept
Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/rati...
Definition AMReX_Box.H:754
__host__ __device__ BoxND & refine(int ref_ratio) noexcept
Refine BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo*ratio...
Definition AMReX_Box.H:730
Coordinate system; provides mapping between physical space and index space.
Definition AMReX_CoordSys.H:31
Real inv_dx[3]
Definition AMReX_CoordSys.H:322
CoordType c_sys
Definition AMReX_CoordSys.H:317
Real dx[3]
Definition AMReX_CoordSys.H:320
@ RZ
Definition AMReX_CoordSys.H:35
@ cartesian
Definition AMReX_CoordSys.H:35
Calculates the distribution of FABs to MPI processes.
Definition AMReX_DistributionMapping.H:51
A Fortran Array of REALs.
Definition AMReX_FArrayBox.H:237
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:85
Geometry(Geometry &&rhs) noexcept=default
Real ProbLo(int dir) const noexcept
Returns the lo end of the problem domain in specified direction.
Definition AMReX_Geometry.H:212
~Geometry()=default
GpuArray< ParticleReal, 3 > ProbLoArrayInParticleReal() const noexcept
Return the lo end of the roundoff domain in ParticleReal precision.
Definition AMReX_Geometry.H:227
void ProbDomain(const RealBox &rb)
Sets the problem domain.
Definition AMReX_Geometry.H:202
bool outsideRoundoffDomain(ParticleReal x, ParticleReal y, ParticleReal z) const
Returns true if a point is outside the roundoff domain. All particles with positions inside the round...
Definition AMReX_Geometry.cpp:708
void GetVolume(MultiFab &vol, const BoxArray &grds, const DistributionMapping &dm, int grow) const
Define vol on grds with dm and fill it with cell volumes.
Definition AMReX_Geometry.cpp:207
void refine(IntVect const &rr)
Refine the Geometry by rr.
Definition AMReX_Geometry.H:491
void coarsen(IntVect const &rr)
Coarsen the Geometry by rr.
Definition AMReX_Geometry.H:477
GpuArray< ParticleReal, 3 > ProbHiArrayInParticleReal() const noexcept
Return the hi end of the roundoff domain in ParticleReal precision.
Definition AMReX_Geometry.H:232
const Real * ProbHi() const noexcept
Returns the hi end of the problem domain in each dimension.
Definition AMReX_Geometry.H:210
__host__ static __device__ Real Volume(const IntVect &point, const GeometryData &geomdata)
Return the volume of the specified cell.
Definition AMReX_Geometry.H:275
bool isAnyPeriodic() const noexcept
Is domain periodic in any direction?
Definition AMReX_Geometry.H:390
Array< int, 3 > setPeriodicity(Array< int, 3 > const &period) noexcept
Set the periodicity flags and return the old flags.
Definition AMReX_Geometry.H:461
friend std::istream & operator>>(std::istream &, Geometry &)
Read a Geometry from an input stream in ASCII format.
Definition AMReX_Geometry.cpp:25
static void ResetDefaultProbDomain(const RealBox &rb) noexcept
Set the problem domain of the default Geometry to rb.
Definition AMReX_Geometry.cpp:183
void GetFaceArea(MultiFab &area, const BoxArray &grds, const DistributionMapping &dm, int dir, int grow) const
Define area on the faces of grds normal to dir, using dm, and fill it with face areas.
Definition AMReX_Geometry.cpp:302
Real ProbHi(int dir) const noexcept
Returns the hi end of the problem domain in specified direction.
Definition AMReX_Geometry.H:214
Geometry(const Geometry &rhs)=default
int period(int dir) const noexcept
What's period in specified direction?
Definition AMReX_Geometry.H:412
Geometry & operator=(const Geometry &rhs)=default
const Box & Domain() const noexcept
Returns our rectangular domain.
Definition AMReX_Geometry.H:244
void Domain(const Box &bx)
Sets our rectangular domain.
Definition AMReX_Geometry.H:246
static void Setup(const RealBox *rb=nullptr, int coord=-1, int const *isper=nullptr)
Set up the default Geometry, unless it has already been set up.
Definition AMReX_Geometry.cpp:108
GpuArray< int, 3 > isPeriodicArray() const noexcept
Return the periodicity flags in a GpuArray for device code.
Definition AMReX_Geometry.H:406
const RealBox & ProbDomain() const noexcept
Returns the problem domain.
Definition AMReX_Geometry.H:200
Periodicity periodicity() const noexcept
Return the Periodicity based on the length of the domain.
Definition AMReX_Geometry.H:415
Array< int, 3 > isPeriodic() const noexcept
Return the periodicity flags for all directions as an Array.
Definition AMReX_Geometry.H:400
void GetDLogA(MultiFab &dloga, const BoxArray &grds, const DistributionMapping &dm, int dir, int grow) const
Define dloga on grds with dm and fill it with d(log(A))/dr at cell centers.
Box growNonPeriodicDomain(IntVect const &ngrow) const noexcept
Return domain box with non-periodic directions grown by ngrow.
Definition AMReX_Geometry.cpp:485
void periodicShift(const Box &target, const Box &src, Vector< IntVect > &out) const noexcept
Compute Array of shifts which will translate src so that it will intersect target with non-zero inter...
Definition AMReX_Geometry.cpp:375
Real ProbLength(int dir) const noexcept
Returns length of problem domain in specified dimension.
Definition AMReX_Geometry.H:242
void computeRoundoffDomain()
Compute the roundoff domain.
Definition AMReX_Geometry.cpp:521
const Real * ProbLo() const noexcept
Returns the lo end of the problem domain in each dimension.
Definition AMReX_Geometry.H:208
GeometryData data() const noexcept
Return a GPU-safe snapshot of the Geometry data.
Definition AMReX_Geometry.H:134
Geometry() noexcept
Construct a copy of the default Geometry, if one is available.
Definition AMReX_Geometry.cpp:45
GpuArray< Real, 3 > ProbHiArray() const noexcept
Return the hi end of the problem domain in a GpuArray for device code.
Definition AMReX_Geometry.H:222
Box growPeriodicDomain(IntVect const &ngrow) const noexcept
Return domain box with periodic directions grown by ngrow.
Definition AMReX_Geometry.cpp:497
Real ProbSize() const noexcept
Returns the overall size of the domain by multiplying the ProbLength's together.
Definition AMReX_Geometry.H:237
bool insideRoundoffDomain(ParticleReal x, ParticleReal y, ParticleReal z) const
Returns true if a point is inside the roundoff domain. All particles with positions inside the roundo...
Definition AMReX_Geometry.cpp:720
GpuArray< Real, 3 > ProbLoArray() const noexcept
Return the lo end of the problem domain in a GpuArray for device code.
Definition AMReX_Geometry.H:217
bool isAllPeriodic() const noexcept
Is domain periodic in all directions?
Definition AMReX_Geometry.H:395
bool isPeriodic(int dir) const noexcept
Is the domain periodic in the specified direction?
Definition AMReX_Geometry.H:388
static void ResetDefaultPeriodicity(const Array< int, 3 > &is_per) noexcept
Set the periodicity flags of the default Geometry to is_per.
Definition AMReX_Geometry.cpp:192
GpuArray< ParticleReal, 3 > const & RoundOffLo() const
Returns roundoff domain's lower end.
Definition AMReX_Geometry.H:520
static void ResetDefaultCoord(int coord) noexcept
Set the coordinate-system type of the default Geometry to coord.
Definition AMReX_Geometry.cpp:199
void define(const Box &dom, const RealBox *rb=nullptr, int coord=-1, int const *is_per=nullptr)
Define this Geometry for the specified index-space domain.
Definition AMReX_Geometry.cpp:70
GpuArray< ParticleReal, 3 > const & RoundOffHi() const
Returns roundoff domain's higher end.
Definition AMReX_Geometry.H:524
Periodicity periodicity(const Box &b) const noexcept
Return the Periodicity based on the length of the cell-centered box b.
Definition AMReX_Geometry.H:422
A collection (stored as an array) of FArrayBox objects.
Definition AMReX_MultiFab.H:40
This provides length of period for periodic domains. 0 means it is not periodic in that direction....
Definition AMReX_Periodicity.H:17
A Box with real dimensions.
Definition AMReX_RealBox.H:28
__host__ __device__ const Real * lo() const &noexcept
Returns lo side.
Definition AMReX_RealBox.H:53
__host__ __device__ const Real * hi() const &noexcept
Returns hide side.
Definition AMReX_RealBox.H:58
__host__ __device__ Real length(int dir) const noexcept
Returns length in specified direction.
Definition AMReX_RealBox.H:69
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:29
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:79
amrex_particle_real ParticleReal
Floating Point Type for Particles.
Definition AMReX_REAL.H:90
__host__ __device__ BoxND< dim > coarsen(const BoxND< dim > &b, int ref_ratio) noexcept
Return a copy of b coarsened by the isotropic ratio ref_ratio.
Definition AMReX_Box.H:1469
__host__ __device__ BoxND< dim > grow(const BoxND< dim > &b, int i) noexcept
Return a copy of b grown uniformly by i cells in every direction.
Definition AMReX_Box.H:1326
__host__ __device__ BoxND< dim > refine(const BoxND< dim > &b, int ref_ratio) noexcept
Return a copy of b refined by the isotropic ratio ref_ratio.
Definition AMReX_Box.H:1510
std::array< T, N > Array
Definition AMReX_Array.H:31
const Geometry & DefaultGeometry()
Return the default Geometry held by the top-level AMReX instance.
Definition AMReX_Geometry.H:611
Definition AMReX_Amr.cpp:50
std::ostream & operator<<(std::ostream &os, AmrMesh const &amr_mesh)
Stream helper; forwards to the friend declared inside AmrMesh.
Definition AMReX_AmrMesh.cpp:1306
__host__ __device__ void ignore_unused(const Ts &...)
No-op helper that marks variables as intentionally unused.
Definition AMReX.H:259
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:35
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:38
std::istream & operator>>(std::istream &is, BoxND< dim > &bx)
Read a BoxND from is.
Definition AMReX_Box.H:1965
GPU-safe snapshot of Geometry data suitable for capture in GPU kernels.
Definition AMReX_Geometry.H:36
Box domain
Cell-centered index-space domain.
Definition AMReX_Geometry.H:67
__host__ __device__ Real ProbLo(int dir) const noexcept
Returns the lo end of the problem domain in direction dir.
Definition AMReX_Geometry.H:48
__host__ __device__ Real CellSize(int dir) const noexcept
Returns the cellsize for direction dir.
Definition AMReX_Geometry.H:42
__host__ __device__ int Coord() const noexcept
Coordinates type.
Definition AMReX_Geometry.H:63
__host__ __device__ const Box & Domain() const noexcept
Returns our rectangular domain.
Definition AMReX_Geometry.H:57
Real dx[3]
Cell size in each dimension.
Definition AMReX_Geometry.H:68
__host__ __device__ Real ProbHi(int dir) const noexcept
Returns the hi end of the problem domain in direction dir.
Definition AMReX_Geometry.H:54
__host__ __device__ const Real * CellSize() const noexcept
Returns the cellsize for each coordinate direction.
Definition AMReX_Geometry.H:39
int coord
Coordinate-system type: 0 for Cartesian, 1 for RZ, and 2 for spherical.
Definition AMReX_Geometry.H:70
__host__ __device__ int isPeriodic(const int i) const noexcept
Returns whether the domain is periodic in the given direction.
Definition AMReX_Geometry.H:60
int is_periodic[3]
For each dimension, 0 if the domain is non-periodic and 1 if it is.
Definition AMReX_Geometry.H:69
__host__ __device__ const Real * ProbLo() const noexcept
Returns the lo end of the problem domain in each dimension.
Definition AMReX_Geometry.H:45
RealBox prob_domain
Physical bounds of the problem domain.
Definition AMReX_Geometry.H:66
__host__ __device__ const Real * ProbHi() const noexcept
Returns the hi end of the problem domain in each dimension.
Definition AMReX_Geometry.H:51
Fixed-size array that can be used on GPU.
Definition AMReX_Array.H:52