1 #ifndef AMREX_HYPRE_ML_ABECLAP_3D_K_H_
2 #define AMREX_HYPRE_ML_ABECLAP_3D_K_H_
8 GpuArray<Real,AMREX_SPACEDIM>
const& dx, Real sb,
9 GpuArray<Array4<Real const>,AMREX_SPACEDIM>
const& b,
10 GpuArray<Array4<int const>,AMREX_SPACEDIM*2>
const& bmask,
11 IntVect const& refratio,
int not_covered)
13 Array3D<Real,-1,1,-1,1,-1,1> tmp;
14 for (
auto& x : tmp) {
x = Real(0.0); }
16 Array3D<bool,-1,1,-1,1,-1,1> used;
17 for (
auto& x : used) {
x =
false; }
19 for (OrientationIter ori; ori; ++ori) {
20 auto const face = ori();
21 int const idir = face.coordDir();
22 int const idir1 = (
idir+1 < AMREX_SPACEDIM) ?
idir+1 :
idir+1-AMREX_SPACEDIM;
23 int const idir2 = (
idir+2 < AMREX_SPACEDIM) ?
idir+2 :
idir+2-AMREX_SPACEDIM;
27 auto const& msk = bmask[face];
28 if (msk.contains(cell_out) && msk(cell_out) == not_covered) {
30 int const rr1 = refratio[idir1];
31 int const rr2 = refratio[idir2];
36 offset_t1 [idir1] = 1;
37 offset_t2 [idir2] = 1;
38 offset_tr1[idir1] = rr1;
39 offset_tr2[idir2] = rr2;
41 Real bcoeff =
b[
idir] ?
b[
idir](face.isLow() ? cell : cell_out) : Real(1.0);
44 Real xx[3] = {Real(-0.5)*Real(refratio[
idir]), Real(0.5), Real(1.5)};
45 poly_interp_coeff<3>(Real(-0.5), xx, poly_coef);
47 Real fac = -(sb / (dx[
idir]*dx[
idir])) * bcoeff * poly_coef[0];
54 Real
const xt1 = Real(-0.5) + (it-itc*rr1+Real(0.5))/Real(rr1);
57 Real
const xt2 = Real(-0.5) + (it-itc*rr2+Real(0.5))/Real(rr2);
59 if (msk(cell_out-offset_tr1) == not_covered &&
60 msk(cell_out+offset_tr1) == not_covered)
63 used(iv[0],iv[1],iv[2]) =
true;
64 tmp(iv[0],iv[1],iv[2]) += fac*(Real(-0.5)*xt1 + Real(0.5)*xt1*xt1);
67 used(iv[0],iv[1],iv[2]) =
true;
68 tmp(iv[0],iv[1],iv[2]) += fac*(Real(0.5)*xt1 + Real(0.5)*xt1*xt1);
72 else if (msk(cell_out+offset_tr1) == not_covered)
75 used(iv[0],iv[1],iv[2]) =
true;
76 tmp(iv[0],iv[1],iv[2]) += fac*xt1;
83 used(iv[0],iv[1],iv[2]) =
true;
84 tmp(iv[0],iv[1],iv[2]) -= fac*xt1;
89 if (msk(cell_out-offset_tr2) == not_covered &&
90 msk(cell_out+offset_tr2) == not_covered)
93 used(iv[0],iv[1],iv[2]) =
true;
94 tmp(iv[0],iv[1],iv[2]) += fac*(Real(-0.5)*xt2 + Real(0.5)*xt2*xt2);
97 used(iv[0],iv[1],iv[2]) =
true;
98 tmp(iv[0],iv[1],iv[2]) += fac*(Real(0.5)*xt2 + Real(0.5)*xt2*xt2);
102 else if (msk(cell_out+offset_tr2) == not_covered)
105 used(iv[0],iv[1],iv[2]) =
true;
106 tmp(iv[0],iv[1],iv[2]) += fac*xt2;
113 used(iv[0],iv[1],iv[2]) =
true;
114 tmp(iv[0],iv[1],iv[2]) -= fac*xt2;
119 if (msk(cell_out-offset_tr1-offset_tr2) == not_covered &&
120 msk(cell_out+offset_tr1-offset_tr2) == not_covered &&
121 msk(cell_out-offset_tr1+offset_tr2) == not_covered &&
122 msk(cell_out+offset_tr1+offset_tr2) == not_covered)
124 Real tmp2 = fac*xt1*xt2*Real(0.25);
127 used(iv[0],iv[1],iv[2]) =
true;
128 tmp(iv[0],iv[1],iv[2]) += tmp2;
130 iv =
offset + offset_t1 + offset_t2;
131 used(iv[0],iv[1],iv[2]) =
true;
132 tmp(iv[0],iv[1],iv[2]) += tmp2;
134 iv =
offset - offset_t1 + offset_t2;
135 used(iv[0],iv[1],iv[2]) =
true;
136 tmp(iv[0],iv[1],iv[2]) -= tmp2;
138 iv =
offset + offset_t1 - offset_t2;
139 used(iv[0],iv[1],iv[2]) =
true;
140 tmp(iv[0],iv[1],iv[2]) -= tmp2;
145 auto const* ptmp = tmp.
begin();
146 auto const* pused = used.begin();
147 for (
int m = 0; m < 27; ++m) {
149 (*values) += ptmp[m];
159 int* entry_offset, Real* entry_values,
167 Real
const* bx, Real
const* by, Real
const* bz,
171 if (fine_mask(i,j,k)) {
173 for (
int m = 1; m < 2*AMREX_SPACEDIM+1; ++m) {
174 stencil(i,j,k)[m] = Real(0.0);
176 }
else if (nentries_to(i,j,k) > 0) {
177 int const fromoff = offset_from(i,j,k);
181 nentries[fromoff] = nentries_to(i,j,k);
182 int const tooff = offset_to(i,j,k);
183 entry_offset[fromoff] = tooff;
189 bool corner[3] = {
false,
false,
false};
190 if ((fine_mask(i-1,j,k) || fine_mask(i+1,j,k)) &&
191 (! fine_mask(i,j-1,k-1)) &&
192 (! fine_mask(i,j+1,k-1)) &&
193 (! fine_mask(i,j-1,k+1)) &&
194 (! fine_mask(i,j+1,k+1)) &&
195 ( crse_mask(i,j-1,k-1)) &&
196 ( crse_mask(i,j+1,k-1)) &&
197 ( crse_mask(i,j-1,k+1)) &&
198 ( crse_mask(i,j+1,k+1)))
202 if((fine_mask(i,j-1,k) || fine_mask(i,j+1,k)) &&
203 (! fine_mask(i-1,j,k-1)) &&
204 (! fine_mask(i+1,j,k-1)) &&
205 (! fine_mask(i-1,j,k+1)) &&
206 (! fine_mask(i+1,j,k+1)) &&
207 ( crse_mask(i-1,j,k-1)) &&
208 ( crse_mask(i+1,j,k-1)) &&
209 ( crse_mask(i-1,j,k+1)) &&
210 ( crse_mask(i+1,j,k+1)))
214 if((fine_mask(i,j,k-1) || fine_mask(i,j,k+1)) &&
215 (! fine_mask(i-1,j-1,k)) &&
216 (! fine_mask(i+1,j-1,k)) &&
217 (! fine_mask(i-1,j+1,k)) &&
218 (! fine_mask(i+1,j+1,k)) &&
219 ( crse_mask(i-1,j-1,k)) &&
220 ( crse_mask(i+1,j-1,k)) &&
221 ( crse_mask(i-1,j+1,k)) &&
222 ( crse_mask(i+1,j+1,k)))
226 int nentries_c = 4 * (
int(corner[0]) +
int(corner[1]) +
int(corner[2]));
227 int foff = tooff + nentries_c;
236 if (fine_mask(i,j,k-1)) {
237 stencil(i,j,k)[0] += stencil(i,j,k)[5];
238 stencil(i,j,k)[5] = Real(0.0);
241 Real dzf = dx[2] / Real(rr[2]);
242 Real dzcinv = Real(1.0) / dx[2];
243 Real dzfinv = Real(1.0) / dzf;
245 Real zz[3] = {dx[2]*Real(-0.5), dzf*Real(0.5), dzf*Real(1.5)};
246 poly_interp_coeff<3>(dzf*Real(-0.5), zz, cc);
247 for (
int iry = 0; iry < rr[1]; ++iry) {
248 for (
int irx = 0; irx < rr[0]; ++irx) {
249 Real bzm = bz ? bz[offset_bz(i,j,k)+irx+iry*rr[0]] : Real(1.0);
250 Real fac = sb*dzcinv*dzfinv*bzm/Real(rr[0]*rr[1]);
259 entry_values[foff+irx+iry*rr[0] ] += fac* cc[2];
260 entry_values[foff+irx+iry*rr[0]+rr[0]*rr[1]] += fac*(cc[1]-Real(1.0));
263 Real
x = Real(-0.5) + (irx+Real(0.5))/Real(rr[0]);
264 Real y = Real(-0.5) + (iry+Real(0.5))/Real(rr[1]);
265 Real fac0 = fac*cc[0];
268 if ( fine_mask(i-1,j,k) ||
272 stencil(i,j,k)[2] += fac0*Real(0.5)*
x;
273 }
else if ( fine_mask(i+1,j,k) ||
274 !crse_mask(i+1,j,k)) {
276 stencil(i,j,k)[1] += fac0*Real(-0.5)*
x;
279 stencil(i,j,k)[1] += fac0*Real(0.5)*
x*(
x-Real(1.0));
280 stencil(i,j,k)[2] += fac0*Real(0.5)*
x*(
x+Real(1.0));
283 if ( fine_mask(i,j-1,k) ||
287 stencil(i,j,k)[4] += fac0*Real(0.5)*y;
288 }
else if ( fine_mask(i,j+1,k) ||
289 !crse_mask(i,j+1,k)) {
291 stencil(i,j,k)[3] += fac0*Real(-0.5)*y;
294 stencil(i,j,k)[3] += fac0*Real(0.5)*y*(y-Real(1.0));
295 stencil(i,j,k)[4] += fac0*Real(0.5)*y*(y+Real(1.0));
298 stencil(i,j,k)[0] += fac0*s0;
301 int offset = tooff + (corner[0] ? 2 : 0) + (corner[1] ? 2 : 0);
302 entry_values[
offset++] += fac0*Real( 0.25)*
x*y;
303 entry_values[
offset++] += fac0*Real(-0.25)*
x*y;
304 entry_values[
offset++] += fac0*Real(-0.25)*
x*y;
305 entry_values[
offset ] += fac0*Real( 0.25)*
x*y;
308 foff += 2*rr[0]*rr[1];
311 if (fine_mask(i,j-1,k)) {
312 stencil(i,j,k)[0] += stencil(i,j,k)[3];
313 stencil(i,j,k)[3] = Real(0.0);
316 Real dyf = dx[1] / Real(rr[1]);
317 Real dycinv = Real(1.0) / dx[1];
318 Real dyfinv = Real(1.0) / dyf;
320 Real yy[3] = {dx[1]*Real(-0.5), dyf*Real(0.5), dyf*Real(1.5)};
321 poly_interp_coeff<3>(dyf*Real(-0.5), yy, cc);
322 for (
int irz = 0; irz < rr[2]; ++irz) {
323 for (
int irx = 0; irx < rr[0]; ++irx) {
324 Real bym = by ? by[offset_by(i,j,k)+irx+irz*rr[0]] : Real(1.0);
325 Real fac = sb*dycinv*dyfinv*bym/Real(rr[0]*rr[2]);
334 entry_values[foff+irx +irz*rr[0]*2] += fac* cc[2];
335 entry_values[foff+irx+rr[0]+irz*rr[0]*2] += fac*(cc[1]-Real(1.0));
338 Real
x = Real(-0.5) + (irx+Real(0.5))/Real(rr[0]);
339 Real z = Real(-0.5) + (irz+Real(0.5))/Real(rr[2]);
340 Real fac0 = fac*cc[0];
343 if ( fine_mask(i-1,j,k) ||
347 stencil(i,j,k)[2] += fac0*Real(0.5)*
x;
348 }
else if ( fine_mask(i+1,j,k) ||
349 !crse_mask(i+1,j,k)) {
351 stencil(i,j,k)[1] += fac0*Real(-0.5)*
x;
354 stencil(i,j,k)[1] += fac0*Real(0.5)*
x*(
x-Real(1.0));
355 stencil(i,j,k)[2] += fac0*Real(0.5)*
x*(
x+Real(1.0));
358 if ( fine_mask(i,j,k-1) ||
362 stencil(i,j,k)[6] += fac0*Real(0.5)*z;
363 }
else if ( fine_mask(i,j,k+1) ||
364 !crse_mask(i,j,k+1)) {
366 stencil(i,j,k)[5] += fac0*Real(-0.5)*z;
369 stencil(i,j,k)[5] += fac0*Real(0.5)*z*(z-Real(1.0));
370 stencil(i,j,k)[6] += fac0*Real(0.5)*z*(z+Real(1.0));
373 stencil(i,j,k)[0] += fac0*s0;
376 int offset = tooff + (corner[0] ? 1 : 0);
377 entry_values[
offset++] += fac0*Real( 0.25)*
x*z;
378 entry_values[
offset++] += fac0*Real(-0.25)*
x*z;
379 if (corner[0]) {
offset += 2; }
380 if (corner[2]) {
offset += 4; }
381 entry_values[
offset++] += fac0*Real(-0.25)*
x*z;
382 entry_values[
offset ] += fac0*Real( 0.25)*
x*z;
385 foff += 2*rr[0]*rr[2];
388 if (fine_mask(i-1,j,k)) {
389 stencil(i,j,k)[0] += stencil(i,j,k)[1];
390 stencil(i,j,k)[1] = Real(0.0);
393 Real dxf = dx[0] / Real(rr[0]);
394 Real dxcinv = Real(1.0) / dx[0];
395 Real dxfinv = Real(1.0) / dxf;
397 Real xx[3] = {dx[0]*Real(-0.5), dxf*Real(0.5), dxf*Real(1.5)};
398 poly_interp_coeff<3>(dxf*Real(-0.5), xx, cc);
399 for (
int irz = 0; irz < rr[2]; ++irz) {
400 for (
int iry = 0; iry < rr[1]; ++iry) {
401 Real bxm = bx ? bx[offset_bx(i,j,k)+iry+irz*rr[1]] : Real(1.0);
402 Real fac = sb*dxcinv*dxfinv*bxm/Real(rr[1]*rr[2]);
411 entry_values[foff++] = fac* cc[2];
412 entry_values[foff++] = fac*(cc[1] - Real(1.0));
415 Real y = Real(-0.5) + (iry+Real(0.5))/Real(rr[1]);
416 Real z = Real(-0.5) + (irz+Real(0.5))/Real(rr[2]);
417 Real fac0 = fac*cc[0];
420 if ( fine_mask(i,j-1,k) ||
424 stencil(i,j,k)[4] += fac0*Real(0.5)*y;
425 }
else if ( fine_mask(i,j+1,k) ||
426 !crse_mask(i,j+1,k)) {
428 stencil(i,j,k)[3] += fac0*Real(-0.5)*y;
431 stencil(i,j,k)[3] += fac0*Real(0.5)*y*(y-Real(1.0));
432 stencil(i,j,k)[4] += fac0*Real(0.5)*y*(y+Real(1.0));
435 if ( fine_mask(i,j,k-1) ||
439 stencil(i,j,k)[6] += fac0*Real(0.5)*z;
440 }
else if ( fine_mask(i,j,k+1) ||
441 !crse_mask(i,j,k+1)) {
443 stencil(i,j,k)[5] += fac0*Real(-0.5)*z;
446 stencil(i,j,k)[5] += fac0*Real(0.5)*z*(z-Real(1.0));
447 stencil(i,j,k)[6] += fac0*Real(0.5)*z*(z+Real(1.0));
450 stencil(i,j,k)[0] += fac0*s0;
454 entry_values[
offset++] += fac0*Real( 0.25)*y*z;
455 if (corner[1]) {
offset += 2; }
456 entry_values[
offset++] += fac0*Real(-0.25)*y*z;
457 if (corner[2]) {
offset += 4; }
458 entry_values[
offset++] += fac0*Real(-0.25)*y*z;
459 if (corner[1]) {
offset += 2; }
460 entry_values[
offset ] += fac0*Real( 0.25)*y*z;
465 if (fine_mask(i+1,j,k)) {
466 stencil(i,j,k)[0] += stencil(i,j,k)[2];
467 stencil(i,j,k)[2] = Real(0.0);
470 Real dxf = dx[0] / Real(rr[0]);
471 Real dxcinv = Real(1.0) / dx[0];
472 Real dxfinv = Real(1.0) / dxf;
474 Real xx[3] = {dx[0]*Real(-0.5), dxf*Real(0.5), dxf*Real(1.5)};
475 poly_interp_coeff<3>(dxf*Real(-0.5), xx, cc);
476 for (
int irz = 0; irz < rr[2]; ++irz) {
477 for (
int iry = 0; iry < rr[1]; ++iry) {
478 Real bxp = bx ? bx[offset_bx(i+1,j,k)+iry+irz*rr[1]] : Real(1.0);
479 Real fac = sb*dxcinv*dxfinv*bxp/Real(rr[1]*rr[2]);
487 entry_values[foff++] = fac*(cc[1] - Real(1.0));
488 entry_values[foff++] = fac* cc[2];
491 Real y = Real(-0.5) + (iry+Real(0.5))/Real(rr[1]);
492 Real z = Real(-0.5) + (irz+Real(0.5))/Real(rr[2]);
493 Real fac0 = fac*cc[0];
496 if ( fine_mask(i,j-1,k) ||
500 stencil(i,j,k)[4] += fac0*Real(0.5)*y;
501 }
else if ( fine_mask(i,j+1,k) ||
502 !crse_mask(i,j+1,k)) {
504 stencil(i,j,k)[3] += fac0*Real(-0.5)*y;
507 stencil(i,j,k)[3] += fac0*Real(0.5)*y*(y-Real(1.0));
508 stencil(i,j,k)[4] += fac0*Real(0.5)*y*(y+Real(1.0));
511 if ( fine_mask(i,j,k-1) ||
515 stencil(i,j,k)[6] += fac0*Real(0.5)*z;
516 }
else if ( fine_mask(i,j,k+1) ||
517 !crse_mask(i,j,k+1)) {
519 stencil(i,j,k)[5] += fac0*Real(-0.5)*z;
522 stencil(i,j,k)[5] += fac0*Real(0.5)*z*(z-Real(1.0));
523 stencil(i,j,k)[6] += fac0*Real(0.5)*z*(z+Real(1.0));
526 stencil(i,j,k)[0] += fac0*s0;
530 entry_values[
offset++] += fac0*Real( 0.25)*y*z;
531 if (corner[1]) {
offset += 2; }
532 entry_values[
offset++] += fac0*Real(-0.25)*y*z;
533 if (corner[2]) {
offset += 4; }
534 entry_values[
offset++] += fac0*Real(-0.25)*y*z;
535 if (corner[1]) {
offset += 2; }
536 entry_values[
offset ] += fac0*Real( 0.25)*y*z;
541 if (fine_mask(i,j+1,k)) {
542 stencil(i,j,k)[0] += stencil(i,j,k)[4];
543 stencil(i,j,k)[4] = Real(0.0);
546 Real dyf = dx[1] / Real(rr[1]);
547 Real dycinv = Real(1.0) / dx[1];
548 Real dyfinv = Real(1.0) / dyf;
550 Real yy[3] = {dx[1]*Real(-0.5), dyf*Real(0.5), dyf*Real(1.5)};
551 poly_interp_coeff<3>(dyf*Real(-0.5), yy, cc);
552 for (
int irz = 0; irz < rr[2]; ++irz) {
553 for (
int irx = 0; irx < rr[0]; ++irx) {
554 Real byp = by ? by[offset_by(i,j+1,k)+irx+irz*rr[0]] : Real(1.0);
555 Real fac = sb*dycinv*dyfinv*byp/Real(rr[0]*rr[2]);
564 entry_values[foff+irx +irz*rr[0]*2] += fac*(cc[1]-Real(1.0));
565 entry_values[foff+irx+rr[0]+irz*rr[0]*2] += fac* cc[2];
568 Real
x = Real(-0.5) + (irx+Real(0.5))/Real(rr[0]);
569 Real z = Real(-0.5) + (irz+Real(0.5))/Real(rr[2]);
570 Real fac0 = fac*cc[0];
573 if ( fine_mask(i-1,j,k) ||
577 stencil(i,j,k)[2] += fac0*Real(0.5)*
x;
578 }
else if ( fine_mask(i+1,j,k) ||
579 !crse_mask(i+1,j,k)) {
581 stencil(i,j,k)[1] += fac0*Real(-0.5)*
x;
584 stencil(i,j,k)[1] += fac0*Real(0.5)*
x*(
x-Real(1.0));
585 stencil(i,j,k)[2] += fac0*Real(0.5)*
x*(
x+Real(1.0));
588 if ( fine_mask(i,j,k-1) ||
592 stencil(i,j,k)[6] += fac0*Real(0.5)*z;
593 }
else if ( fine_mask(i,j,k+1) ||
594 !crse_mask(i,j,k+1)) {
596 stencil(i,j,k)[5] += fac0*Real(-0.5)*z;
599 stencil(i,j,k)[5] += fac0*Real(0.5)*z*(z-Real(1.0));
600 stencil(i,j,k)[6] += fac0*Real(0.5)*z*(z+Real(1.0));
603 stencil(i,j,k)[0] += fac0*s0;
606 int offset = tooff + (corner[0] ? 1 : 0);
607 entry_values[
offset++] += fac0*Real( 0.25)*
x*z;
608 entry_values[
offset++] += fac0*Real(-0.25)*
x*z;
609 if (corner[0]) {
offset += 2; }
610 if (corner[2]) {
offset += 4; }
611 entry_values[
offset++] += fac0*Real(-0.25)*
x*z;
612 entry_values[
offset ] += fac0*Real( 0.25)*
x*z;
615 foff += 2*rr[0]*rr[2];
618 if (fine_mask(i,j,k+1)) {
619 stencil(i,j,k)[0] += stencil(i,j,k)[6];
620 stencil(i,j,k)[6] = Real(0.0);
623 Real dzf = dx[2] / Real(rr[2]);
624 Real dzcinv = Real(1.0) / dx[2];
625 Real dzfinv = Real(1.0) / dzf;
627 Real zz[3] = {dx[2]*Real(-0.5), dzf*Real(0.5), dzf*Real(1.5)};
628 poly_interp_coeff<3>(dzf*Real(-0.5), zz, cc);
629 for (
int iry = 0; iry < rr[1]; ++iry) {
630 for (
int irx = 0; irx < rr[0]; ++irx) {
631 Real bzp = bz ? bz[offset_bz(i,j,k+1)+irx+iry*rr[0]] : Real(1.0);
632 Real fac = sb*dzcinv*dzfinv*bzp/Real(rr[0]*rr[1]);
641 entry_values[foff+irx+iry*rr[0] ] += fac*(cc[1]-Real(1.0));
642 entry_values[foff+irx+iry*rr[0]+rr[0]*rr[1]] += fac* cc[2];
645 Real
x = Real(-0.5) + (irx+Real(0.5))/Real(rr[0]);
646 Real y = Real(-0.5) + (iry+Real(0.5))/Real(rr[1]);
647 Real fac0 = fac*cc[0];
650 if ( fine_mask(i-1,j,k) ||
654 stencil(i,j,k)[2] += fac0*Real(0.5)*
x;
655 }
else if ( fine_mask(i+1,j,k) ||
656 !crse_mask(i+1,j,k)) {
658 stencil(i,j,k)[1] += fac0*Real(-0.5)*
x;
661 stencil(i,j,k)[1] += fac0*Real(0.5)*
x*(
x-Real(1.0));
662 stencil(i,j,k)[2] += fac0*Real(0.5)*
x*(
x+Real(1.0));
665 if ( fine_mask(i,j-1,k) ||
669 stencil(i,j,k)[4] += fac0*Real(0.5)*y;
670 }
else if ( fine_mask(i,j+1,k) ||
671 !crse_mask(i,j+1,k)) {
673 stencil(i,j,k)[3] += fac0*Real(-0.5)*y;
676 stencil(i,j,k)[3] += fac0*Real(0.5)*y*(y-Real(1.0));
677 stencil(i,j,k)[4] += fac0*Real(0.5)*y*(y+Real(1.0));
680 stencil(i,j,k)[0] += fac0*s0;
683 int offset = tooff + (corner[0] ? 2 : 0) + (corner[1] ? 2 : 0);
684 entry_values[
offset++] += fac0*Real( 0.25)*
x*y;
685 entry_values[
offset++] += fac0*Real(-0.25)*
x*y;
686 entry_values[
offset++] += fac0*Real(-0.25)*
x*y;
687 entry_values[
offset ] += fac0*Real( 0.25)*
x*y;
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_DEVICE
Definition: AMReX_GpuQualifiers.H:18
int idir
Definition: AMReX_HypreMLABecLap.cpp:1093
Array4< int const > offset
Definition: AMReX_HypreMLABecLap.cpp:1089
Definition: AMReX_Amr.cpp:49
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void hypmlabeclap_c2f(int i, int j, int k, Array4< GpuArray< Real, 2 *AMREX_SPACEDIM+1 >> const &stencil, GpuArray< HYPRE_Int, AMREX_SPACEDIM > *civ, HYPRE_Int *nentries, int *entry_offset, Real *entry_values, Array4< int const > const &offset_from, Array4< int const > const &nentries_to, Array4< int const > const &offset_to, GpuArray< Real, AMREX_SPACEDIM > const &dx, Real sb, Array4< int const > const &offset_bx, Array4< int const > const &offset_by, Real const *bx, Real const *by, Array4< int const > const &fine_mask, IntVect const &rr, Array4< int const > const &crse_mask)
Definition: AMReX_HypreMLABecLap_2D_K.H:100
IntVectND< AMREX_SPACEDIM > IntVect
Definition: AMReX_BaseFwd.H:30
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void hypmlabeclap_f2c_set_values(IntVect const &cell, Real *values, GpuArray< Real, AMREX_SPACEDIM > const &dx, Real sb, GpuArray< Array4< Real const >, AMREX_SPACEDIM > const &b, GpuArray< Array4< int const >, AMREX_SPACEDIM *2 > const &bmask, IntVect const &refratio, int not_covered)
Definition: AMReX_HypreMLABecLap_2D_K.H:10
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE BoxND< dim > coarsen(const BoxND< dim > &b, int ref_ratio) noexcept
Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/rati...
Definition: AMReX_Box.H:1304
const int[]
Definition: AMReX_BLProfiler.cpp:1664
Definition: AMReX_Array4.H:61
Dim3 begin
Definition: AMReX_Array4.H:66
Definition: AMReX_Array.H:34