1#ifndef AMREX_EB2_GEOMETRYSHOP_H_
2#define AMREX_EB2_GEOMETRYSHOP_H_
3#include <AMReX_Config.H>
29requires (!IsGPUable<F>::value)
47 int rangedir,
F const& f)
50 const Real h = std::abs(hi[rangedir] - lo[rangedir]);
53 const Real EPS = 1.0e-6_rt;
56 const Real EPS = 3.0e-15;
58 const int MAXITER = 100;
67 Real c = bPt[rangedir];
72 amrex::Error(
"BrentRootFinder. Root must be bracketed, but instead the supplied end points have the same sign.");
74 }
else if (fa == 0.0_rt) {
76 }
else if (fb == 0.0_rt) {
80 Real d = 0.0_rt, e = 0.0_rt;
82 for (i = 0; i < MAXITER; ++i)
89 d = bPt[rangedir] - aPt[rangedir];
93 if (std::abs(fc) < std::abs(fb))
95 aPt[rangedir] = bPt[rangedir];
104 Real tol1 = 2.0_rt * EPS * std::abs(bPt[rangedir]) + 0.5_rt * tol;
105 Real xm = 0.5_rt * (c - bPt[rangedir]);
107 if (std::abs(xm) <= tol1 || fb == 0.0_rt)
112 if (std::abs(e) >= tol1 && std::abs(fa) > std::abs(fb))
116 if (aPt[rangedir] == c)
125 p = s * (2.0_rt * xm * q * (q-r) - (bPt[rangedir]-aPt[rangedir]) * (r-1.0_rt));
126 q = (q-1.0_rt) * (r-1.0_rt) * (s-1.0_rt);
130 if (
p > 0) { q = -q; }
134 if (2.0_rt *
p <
amrex::min(3.0_rt*xm*q-std::abs(tol1*q), 1.0_rt*std::abs(e*q)))
155 aPt[rangedir] = bPt[rangedir];
159 if (std::abs(d) > tol1)
161 bPt[rangedir] = bPt[rangedir] + d;
165 if (xm < 0) { bPt[rangedir] = bPt[rangedir] - tol1; }
166 else { bPt[rangedir] = bPt[rangedir] + tol1; }
174 amrex::Error(
"BrentRootFinder: exceeding maximum iterations.");
177 return bPt[rangedir];
185 Real const d2x = dx[0]*dx[0];
186 Real const d2y = dx[1]*dx[1];
187 Real const d2z = (AMREX_SPACEDIM == 3) ? dx[AMREX_SPACEDIM-1]*dx[AMREX_SPACEDIM-1] : 0.0_rt;
190 for (
int m = 1; m < 8; ++m) {
192 invd2[m] = (den > 0.0_rt) ?
Real(1.0)/den : 0.0_rt;
203 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
204 size += std::abs(problo[d]) + (probhi[d]-problo[d]);
213 Real const dv = vmax - vmin;
214 Real invd2max = invd2[1];
215 for (
int m = 2; m < 8; ++m) { invd2max =
amrex::max(invd2max, invd2[m]); }
216 return Real(16.0) * std::numeric_limits<Real>::epsilon() * std::sqrt(dv*dv*invd2max) * size;
235 for (
int d = 0; d < AMREX_SPACEDIM; ++d) { ivc[d] =
amrex::Clamp(iv[d], blo[d], bhi[d]); }
236 constexpr int kmax = (AMREX_SPACEDIM == 3) ? 1 : 0;
237 int const ic = ivc[0];
238 int const jc = ivc[1];
239 int const kc = (AMREX_SPACEDIM == 3) ? ivc[AMREX_SPACEDIM-1] : 0;
240 Real slope2 = 0.0_rt;
245 Real const* q = fab.
ptr(ic,jc,kc);
246 Long const js = fab.template get_stride<1>();
247 auto sq = [=] (
Real a) {
return (a-fv)*(a-fv); };
248 slope2 =
amrex::max(sq(q[-1]), sq(q[1])) * invd2[1];
251 sq(q[-1+js]), sq(q[1+js])) * invd2[3]);
252#if (AMREX_SPACEDIM == 3)
253 Long const ks = fab.template get_stride<2>();
256 sq(q[-1+ks]), sq(q[1+ks])) * invd2[5]);
258 sq(q[-js+ks]), sq(q[js+ks])) * invd2[6]);
260 sq(q[-1+js-ks]), sq(q[1+js-ks]),
261 sq(q[-1-js+ks]), sq(q[1-js+ks]),
262 sq(q[-1+js+ks]), sq(q[1+js+ks])) * invd2[7]);
265 for (
int kk = -kmax; kk <= kmax; ++kk) {
266 for (
int jj = -1; jj <= 1; ++jj) {
267 for (
int ii = -1; ii <= 1; ++ii) {
268 int const m =
int(ii != 0) | (
int(jj != 0) << 1) | (
int(kk != 0) << 2);
271 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
279 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
284 Real const df = fn - fv;
289 return Real(16.0) * std::numeric_limits<Real>::epsilon() * std::sqrt(slope2) * size;
305 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
311 ivf[rangedir] += side;
312 Real a =
p[rangedir];
315 Real const xtol =
Real(4.0) * std::numeric_limits<Real>::epsilon()
316 *
amrex::max(std::abs(a), std::abs(b), std::abs(problo[rangedir]));
320 Real const h = std::abs(b - a);
323 Real const node_tol = (fb != 0.0_rt) ?
Real(2.0)*tol*h/std::abs(fb) : 0.0_rt;
326 if (node_tol >= h) {
return x0; }
327 p[rangedir] = x0 +
Real(side)*node_tol;
328 if (
IF_f(f,
p) < -tol) {
return x0; }
329 for (
int iter = 0; iter < 200 && std::abs(b-a) > xtol; ++iter) {
330 p[rangedir] =
Real(0.5)*(a+b);
331 if (
IF_f(f,
p) >= -tol) {
337 return (std::abs(a - x0) <= node_tol) ? x0 : a;
346template <
class F,
class R =
int>
367 : m_f(std::move(f)), m_resource()
377 : m_f(std::move(f)), m_resource(std::move(r))
390 Box const& bounding_box)
const noexcept
392 const auto& problo = geom.ProbLoArray();
393 const auto& dx = geom.CellSizeArray();
398 const auto& fv = ffab.
array();
402 int npos = 0, nneg = 0;
403 for (
int k = lo.z; k <= hi.z; ++k) {
404 for (
int j = lo.y; j <= hi.y; ++j) {
405 for (
int i = lo.x; i <= hi.x; ++i) {
410 if (v >= 0.0_rt) { ++npos; }
else { ++nneg; }
411 if (npos > 0 && nneg > 0) {
return mixedcells; }
415 Real vmin = std::numeric_limits<Real>::max();
416 Real vmax = std::numeric_limits<Real>::lowest();
428 IntVect const glo = bounding_box.smallEnd();
429 IntVect const ghi = bounding_box.bigEnd();
431 auto const size =
IF_size(problo, geom.ProbHiArray());
434 for (
int k = lo.z; k <= hi.z; ++k) {
435 for (
int j = lo.y; j <= hi.y; ++j) {
436 for (
int i = lo.x; i <= hi.x; ++i) {
438 Real const v = fc(i,j,k);
439 if (std::abs(v) <= tolmax &&
440 std::abs(v) <=
IF_roundoff(m_f, iv, v, fc, problo, dx, invd2, size, glo, ghi)) {
459 Box const& bounding_box)
const noexcept
471 auto const& fv = ffab.
array();
475 using ReduceTuple =
typename decltype(reduce_data)
::Type;
476 reduce_op.
eval(gbx, reduce_data,
485 return {
int(inbx && v >= 0.0_rt),
int(inbx && v < 0.0_rt), v, v};
487 ReduceTuple hv = reduce_data.
value(reduce_op);
490 if (npos > 0 && nneg > 0) {
return mixedcells; }
501 using ReduceTuple2 =
typename decltype(reduce_data2)
::Type;
502 reduce_op2.
eval(bx, reduce_data2,
507 Real const v = fc(iv);
508 bool const body = std::abs(v) <= tolmax &&
509 std::abs(v) <=
IF_roundoff(f, iv, v, fc, problo, dx, invd2, size, glo, ghi);
525 Box const& bounding_box)
const noexcept
532 static constexpr bool isGPUable ()
noexcept {
return true; }
536 static constexpr bool isGPUable ()
noexcept {
return false; }
549 Box const& bounding_box)
const noexcept
557 const Box ibx = bx & bounding_box;
558 const Box ibx2 = gbx & bounding_box;
559 IntVect const bloiv = bounding_box.smallEnd();
560 IntVect const bhiiv = bounding_box.bigEnd();
565 auto const& fv = ffab.
array();
568 auto*
const pmm =
static_cast<Real*
>(arena->
alloc(2*
sizeof(
Real)));
573 pmm[0] = std::numeric_limits<Real>::max();
574 pmm[1] = std::numeric_limits<Real>::lowest();
590 Real vmin = std::numeric_limits<Real>::max();
591 Real vmax = std::numeric_limits<Real>::lowest();
612 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
627 Real const v = fc(i,j,k);
629 s(i,j,k) = (v != 0.0_rt && std::abs(v) <= tolmax &&
630 std::abs(v) <=
IF_roundoff(f, iv, v, fc, problo, dx, invd2, size,
642 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
655 Box const& bounding_box)
const noexcept
658 if (!
levelset.arena()->isHostAccessible()) {
674 Box const& bounding_box)
const noexcept
681 const Box ibx = bx & bounding_box;
682 const Box ibx2 = gbx & bounding_box;
683 IntVect const bloiv = bounding_box.smallEnd();
684 IntVect const bhiiv = bounding_box.bigEnd();
687 const auto& fv = ffab.
array();
689 Real vmin = std::numeric_limits<Real>::max();
690 Real vmax = std::numeric_limits<Real>::lowest();
708 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
724 Real const v = fc(i,j,k);
725 s(i,j,k) = (v != 0.0_rt && std::abs(v) <= tolmax &&
726 std::abs(v) <=
IF_roundoff(m_f, iv, v, fc, problo, dx, invd2, size,
737 for (
int d = 0; d < AMREX_SPACEDIM; ++d) {
763 Box const& bounding_box)
const noexcept
773 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
783 if (lst(ivlo) == 0.0_rt) {
784 inter(i,j,k) =
ZeroEndIntercept(f, ivlo, idim, 1, lst, problo, dx, size,
786 }
else if (lst(ivhi) == 0.0_rt) {
787 inter(i,j,k) =
ZeroEndIntercept(f, ivhi, idim, -1, lst, problo, dx, size,
812 Box const& bounding_box)
const noexcept
825 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
836 h_type_fab.
nBytes(bx, 1));
838 const auto& h_inter = h_inter_fab.
array();
842 h_inter_fab.
nBytes(bx, 1));
858 Box const& bounding_box,
859 const int idim)
const noexcept
875 if (lst(ivlo) == 0.0_rt) {
876 inter(i,j,k) =
ZeroEndIntercept(m_f, ivlo, idim, 1, lst, problo, dx, size,
878 }
else if (lst(ivhi) == 0.0_rt) {
879 inter(i,j,k) =
ZeroEndIntercept(m_f, ivhi, idim, -1, lst, problo, dx, size,
911 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
931 bool const at_lo = lst(ivlo) >=
Real(0.0);
932 int const inode = at_lo ? ivlo[idim] : ivhi[idim];
933 inter(i,j,k) =
node_coord(problo[idim], inode, dx[idim]);
955GeometryShop<std::decay_t<F>>
958 return GeometryShop<std::decay_t<F>>(std::forward<F>(f));
968template <
class F,
class R>
974 (std::forward<F>(f), std::forward<R>(r));
Fixed-size array types for use on GPU and CPU.
BaseFab container template providing box-based field storage.
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:124
Problem-domain geometry: maps between index space and physical space.
#define AMREX_HOST_DEVICE_PARALLEL_FOR_3D(...)
Definition AMReX_GpuLaunchMacrosC.nolint.H:110
#define AMREX_HOST_DEVICE_FOR_3D_FLAG(where_to_run, box, i, j, k, block)
Definition AMReX_GpuLaunch.nolint.H:102
#define AMREX_IF_ON_DEVICE(CODE)
Definition AMReX_GpuQualifiers.H:56
#define AMREX_IF_ON_HOST(CODE)
Definition AMReX_GpuQualifiers.H:58
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
while parser_exe_t p
Definition AMReX_Parser_Exe_Body.H:33
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
Abstract base class for memory arenas.
Definition AMReX_Arena.H:154
virtual void free(void *pt)=0
Free a previously allocated block pointed to by pt.
virtual void * alloc(std::size_t sz)=0
Allocate sz bytes from this arena.
A FortranArrayBox(FAB)-like object.
Definition AMReX_BaseFab.H:222
Array4< T const > const_array() const noexcept
Return a const-qualified Array4 view over all components.
Definition AMReX_BaseFab.H:547
void resize(const Box &b, int N=1, Arena *ar=nullptr)
This function resizes a BaseFab so it covers the Box b with N components.
Definition AMReX_BaseFab.H:1776
std::size_t nBytes() const noexcept
Returns how many bytes used.
Definition AMReX_BaseFab.H:332
Array4< T const > array() const noexcept
Create an Array4 view over all components.
Definition AMReX_BaseFab.H:475
T * dataPtr(int n=0) noexcept
Returns a pointer to an object of type T that is the value of the Nth component associated with the c...
Definition AMReX_BaseFab.H:418
__host__ __device__ const IntVectND< dim > & bigEnd() const &noexcept
Return the inclusive upper bound of the box.
Definition AMReX_Box.H:136
__host__ __device__ bool contains(const IntVectND< dim > &p) const noexcept
Return true if argument is contained within BoxND.
Definition AMReX_Box.H:233
__host__ __device__ const IntVectND< dim > & smallEnd() const &noexcept
Return the inclusive lower bound of the box.
Definition AMReX_Box.H:124
GpuArray< Real, 3 > CellSizeArray() const noexcept
Returns the cell sizes as a GpuArray for use on host or device.
Definition AMReX_CoordSys.H:85
Samples an implicit function on boxes and fills EB data.
Definition AMReX_EB2_GeometryShop.H:348
F const & GetImpFunc() const &
Immutable access to the underlying implicit function.
Definition AMReX_EB2_GeometryShop.H:381
GeometryShop(F f, R r)
Construct a GeometryShop with an implicit function and resource handle.
Definition AMReX_EB2_GeometryShop.H:376
static constexpr int in_body
Definition AMReX_EB2_GeometryShop.H:353
int getBoxType(const Box &bx, const Geometry &geom, RunOn run_on, Box const &bounding_box) const noexcept
Classify bx as regular, covered, or mixed (GPU-capable case). Nodes on the surface within roundoff co...
Definition AMReX_EB2_GeometryShop.H:458
static constexpr int allcovered
Definition AMReX_EB2_GeometryShop.H:357
GeometryShop(F f)
Construct a GeometryShop that owns an implicit function f.
Definition AMReX_EB2_GeometryShop.H:366
static constexpr int in_fluid
Definition AMReX_EB2_GeometryShop.H:351
static constexpr bool isGPUable() noexcept
Definition AMReX_EB2_GeometryShop.H:532
int getBoxType_Cpu(const Box &bx, Geometry const &geom, Box const &bounding_box) const noexcept
Definition AMReX_EB2_GeometryShop.H:389
void fillFab(BaseFab< Real > &levelset, const Geometry &geom, RunOn run_on, Box const &bounding_box) const noexcept
Fill a level-set FAB by sampling the implicit function on each point in the FAB.
Definition AMReX_EB2_GeometryShop.H:548
void fillFab_Cpu(BaseFab< Real > &levelset, const Geometry &geom, Box const &bounding_box) const noexcept
Definition AMReX_EB2_GeometryShop.H:673
void getIntercept_Cpu(Array4< Real > const &inter, Array4< Type_t const > const &type, Array4< Real const > const &lst, Geometry const &geom, Box const &bounding_box, const int idim) const noexcept
Definition AMReX_EB2_GeometryShop.H:854
F FunctionType
Definition AMReX_EB2_GeometryShop.H:359
static constexpr int mixedcells
Definition AMReX_EB2_GeometryShop.H:356
static constexpr int allregular
Definition AMReX_EB2_GeometryShop.H:355
void getIntercept(Array< Array4< Real >, 3 > const &inter_arr, Array< Array4< Type_t const >, 3 > const &type_arr, Array4< Real const > const &lst, Geometry const &geom, RunOn run_on, Box const &bounding_box) const noexcept
Compute EB intercepts for irregular edges (GPU-capable case).
Definition AMReX_EB2_GeometryShop.H:760
static constexpr int on_boundary
Definition AMReX_EB2_GeometryShop.H:352
void updateIntercept(Array< Array4< Real >, 3 > const &inter_arr, Array< Array4< Type_t const >, 3 > const &type_arr, Array4< Real const > const &lst, Geometry const &geom) const noexcept
Update intercepts when level-set data has been adjusted (e.g., fixing small cells).
Definition AMReX_EB2_GeometryShop.H:905
F && GetImpFunc() &&
Definition AMReX_EB2_GeometryShop.H:382
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:87
GpuArray< Real, 3 > ProbHiArray() const noexcept
Return the hi end of the problem domain in a GpuArray for device code.
Definition AMReX_Geometry.H:224
GpuArray< Real, 3 > ProbLoArray() const noexcept
Return the lo end of the problem domain in a GpuArray for device code.
Definition AMReX_Geometry.H:219
Definition AMReX_GpuKernelInfo.H:8
__host__ __device__ constexpr bool allGE(const IntVectND< dim > &rhs) const noexcept
Returns true if this is greater than or equal to argument for all components. NOTE: This is NOT a str...
Definition AMReX_IntVect.H:542
__host__ __device__ constexpr bool allLE(const IntVectND< dim > &rhs) const noexcept
Returns true if this is less than or equal to argument for all components. NOTE: This is NOT a strict...
Definition AMReX_IntVect.H:492
Definition AMReX_Reduce.H:556
Type value()
Definition AMReX_Reduce.H:591
Definition AMReX_Reduce.H:715
void eval(MF const &mf, IntVect const &nghost, D &reduce_data, F &&f)
Definition AMReX_Reduce.H:852
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:80
amrex_long Long
Definition AMReX_INT.H:30
__host__ __device__ Dim3 ubound(Array4< T > const &a) noexcept
Return the inclusive upper bounds of an Array4 in Dim3 form.
Definition AMReX_Array4.H:1365
ArrayND< T, 4, true > Array4
Convenient alias for a 4D ArrayND with three spatial dimensions plus a component dimension.
Definition AMReX_Array4.H:1340
__host__ __device__ Dim3 lbound(Array4< T > const &a) noexcept
Return the inclusive lower bounds of an Array4 in Dim3 form.
Definition AMReX_Array4.H:1351
__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:1328
std::array< T, N > Array
Definition AMReX_Array.H:31
Array< Real, 3 > RealArray
Definition AMReX_Array.H:35
Arena * The_Pinned_Arena()
Definition AMReX_Arena.cpp:879
Arena * The_Async_Arena()
Definition AMReX_Arena.cpp:849
Arena * The_Cpu_Arena()
Definition AMReX_Arena.cpp:889
Arena * The_Arena()
Definition AMReX_Arena.cpp:839
__host__ __device__ T node_coord(T problo, int i, T dx) noexcept
Coordinate of node i: problo + i*dx.
Definition AMReX_Geometry.H:625
__host__ __device__ constexpr const T & min(const T &a, const T &b) noexcept
Definition AMReX_Algorithm.H:31
__host__ __device__ constexpr const T & max(const T &a, const T &b) noexcept
Definition AMReX_Algorithm.H:54
__host__ __device__ constexpr T Clamp(const T &v, const T &lo, const T &hi)
Definition AMReX_Algorithm.H:123
Type flags representing regular/covered/etc.
Definition AMReX_EB2_Graph.H:49
static constexpr Type_t irregular
Definition AMReX_EB2_Graph.H:52
Definition AMReX_FabArrayBase.H:38
__host__ __device__ Real IF_tolmax(Real vmin, Real vmax, GpuArray< Real, 8 > const &invd2, Real size)
Definition AMReX_EB2_GeometryShop.H:211
__host__ __device__ GpuArray< Real, 8 > IF_invdist2(GpuArray< Real, 3 > const &dx)
Definition AMReX_EB2_GeometryShop.H:183
__host__ __device__ Real IF_roundoff(F const &f, IntVect const &iv, Real fv, Array4< Real const > const &fab, GpuArray< Real, 3 > const &problo, GpuArray< Real, 3 > const &dx, GpuArray< Real, 8 > const &invd2, Real size, IntVect const &blo, IntVect const &bhi)
Definition AMReX_EB2_GeometryShop.H:229
__host__ __device__ Real ZeroEndIntercept(F const &f, IntVect const &ivz, int rangedir, int side, Array4< Real const > const &lst, GpuArray< Real, 3 > const &problo, GpuArray< Real, 3 > const &dx, Real size, IntVect const &blo, IntVect const &bhi)
Definition AMReX_EB2_GeometryShop.H:298
__host__ __device__ Real IF_size(GpuArray< Real, 3 > const &problo, GpuArray< Real, 3 > const &probhi)
Definition AMReX_EB2_GeometryShop.H:199
__host__ __device__ Real BrentRootFinder(GpuArray< Real, 3 > const &lo, GpuArray< Real, 3 > const &hi, int rangedir, F const &f)
Definition AMReX_EB2_GeometryShop.H:45
__host__ __device__ Real IF_f(F const &f, GpuArray< Real, 3 > const &p) noexcept
Definition AMReX_EB2_GeometryShop.H:23
static constexpr Real no_intercept
Marker stored in an edge intercept array when the edge has no intercept.
Definition AMReX_EB2_Graph.H:57
GeometryShop< std::decay_t< F > > makeShop(F &&f)
Helper that constructs a GeometryShop owning the supplied implicit function.
Definition AMReX_EB2_GeometryShop.H:965
__device__ void deviceReduceMax(T *dest, T source, Gpu::Handler const &h) noexcept
Definition AMReX_GpuReduce.H:645
void streamSynchronize() noexcept
Definition AMReX_GpuDevice.H:329
void dtoh_memcpy_async(void *p_h, const void *p_d, const std::size_t sz) noexcept
Definition AMReX_GpuDevice.H:454
bool inLaunchRegion() noexcept
Definition AMReX_GpuControl.H:88
void htod_memcpy_async(void *p_d, const void *p_h, const std::size_t sz) noexcept
Definition AMReX_GpuDevice.H:440
__device__ void deviceReduceMin(T *dest, T source, Gpu::Handler const &h) noexcept
Definition AMReX_GpuReduce.H:626
__host__ __device__ void ignore_unused(const Ts &...)
No-op helper that marks variables as intentionally unused.
Definition AMReX.H:273
@ F
Definition AMReX_Order.H:7
RunOn
Definition AMReX_GpuControl.H:65
@ Gpu
Definition AMReX_GpuControl.H:65
void ParallelFor(TypeList< CTOs... > ctos, std::array< int, sizeof...(CTOs)> const &runtime_options, T N, F &&f)
Definition AMReX_CTOParallelForImpl.H:202
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:35
void single_task(L &&f) noexcept
Definition AMReX_GpuLaunchFunctsC.H:1245
void Error(const std::string &msg)
Print a message to stderr and abort the program.
Definition AMReX.cpp:238
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:38
const int[]
Definition AMReX_BLProfiler.cpp:1665
void LoopOnCpu(Dim3 lo, Dim3 hi, F const &f) noexcept
Definition AMReX_Loop.H:365
@ levelset
Definition AMReX_EBData.H:20
__host__ __device__ constexpr int get(IntVectND< dim > const &iv) noexcept
Get the Idx-th element of IntVectND<dim>.
Definition AMReX_IntVect.H:1360
__host__ __device__ constexpr bool contains(idx... i) const noexcept
Test whether an index tuple lies inside the ArrayND bounds.
Definition AMReX_Array4.H:691
__host__ __device__ constexpr T * dataPtr() const noexcept
Get raw data pointer.
Definition AMReX_Array4.H:617
__host__ __device__ T * ptr(idx... i) const noexcept
Multi-index ptr() for accessing pointer to element.
Definition AMReX_Array4.H:561
Type trait that reports whether a functor derives from GPUable.
Definition AMReX_EB2_IF_Base.H:24
Fixed-size array that can be used on GPU.
Definition AMReX_Array.H:52
Definition AMReX_GpuTypes.H:86