1 #ifndef AMREX_INTERP_3D_C_H_
2 #define AMREX_INTERP_3D_C_H_
3 #include <AMReX_Config.H>
12 Array4<Real>
const&
fine,
const int fcomp,
const int ncomp,
13 Array4<Real const>
const&
crse,
const int ccomp,
19 for (
int n = 0; n < ncomp; ++n) {
20 for (
int k = lo.z; k <= hi.z; ++k) {
22 for (
int j = lo.y; j <= hi.y; ++j) {
25 for (
int i = lo.x; i <= hi.x; ++i) {
27 fine(i,j,k,n+fcomp) =
crse(ic,jc,kc,n+ccomp);
34 namespace interp_detail {
38 constexpr
int ixy = 3;
39 constexpr
int ixz = 4;
40 constexpr
int iyz = 5;
50 const int icomp,
const int ncomp,
IntVect const& ratio) noexcept
52 using namespace interp_detail;
57 const Real rx = Real(1.)/Real(ratio[0]);
58 const Real ry = Real(1.)/Real(ratio[1]);
59 const Real rz = Real(1.)/Real(ratio[2]);
61 for (
int n = 0; n < ncomp; ++n) {
62 const int nu = n + icomp;
63 for (
int k = lo.z; k <= hi.z; ++k) {
64 for (
int j = lo.y; j <= hi.y; ++j) {
66 for (
int i = lo.x; i <= hi.x; ++i) {
67 T dx00 = u(i+1,j,k,nu) - u(i,j,k,nu);
68 T d0x0 = u(i,j+1,k,nu) - u(i,j,k,nu);
69 T d00x = u(i,j,k+1,nu) - u(i,j,k,nu);
71 T dx10 = u(i+1,j+1,k,nu) - u(i,j+1,k,nu);
72 T dx01 = u(i+1,j,k+1,nu) - u(i,j,k+1,nu);
73 T d0x1 = u(i,j+1,k+1,nu) - u(i,j,k+1,nu);
75 T dx11 = u(i+1,j+1,k+1,nu) - u(i,j+1,k+1,nu);
77 slope(i,j,k,n+ncomp*
ix ) = rx*dx00;
78 slope(i,j,k,n+ncomp*
iy ) = ry*d0x0;
79 slope(i,j,k,n+ncomp*
iz ) = rz*d00x;
80 slope(i,j,k,n+ncomp*
ixy ) = rx*ry*(dx10 - dx00);
81 slope(i,j,k,n+ncomp*
ixz ) = rx*rz*(dx01 - dx00);
82 slope(i,j,k,n+ncomp*
iyz ) = ry*rz*(d0x1 - d0x0);
83 slope(i,j,k,n+ncomp*
ixyz) = rx*ry*rz*(dx11 - dx01 - dx10 + dx00);
93 Array4<T const>
const&
slope, Array4<T const>
const&
crse,
94 const int ccomp,
IntVect const& ratio) noexcept
96 using namespace interp_detail;
102 for (
int n = 0; n < ncomp; ++n) {
103 for (
int k = lo.z; k <= hi.z; ++k) {
105 const Real fz = k - kc*ratio[2];
106 for (
int j = lo.y; j <= hi.y; ++j) {
108 const Real fy = j - jc*ratio[1];
110 for (
int i = lo.x; i <= hi.x; ++i) {
112 const Real fx = i - ic*ratio[0];
113 fine(i,j,k,n+fcomp) =
crse(ic,jc,kc,n+ccomp)
114 + fx*
slope(ic,jc,kc,n+ncomp*
ix)
115 + fy*
slope(ic,jc,kc,n+ncomp*
iy)
116 + fz*
slope(ic,jc,kc,n+ncomp*
iz)
131 int nc,
int nf,
int idir,
132 Array4<T const>
const&
crse,
133 Array4<T>
const&
fine,
134 Array4<int const>
const&
mask,
139 if (!
mask(ci, cj, ck, nc))
143 const int fi = ci*ratio[0];
144 const int fj = cj*ratio[1];
145 const int fk = ck*ratio[2];
150 const Real ll =
crse(ci, cj-1, ck-1, nc);
151 const Real cl =
crse(ci, cj-1, ck, nc);
152 const Real rl =
crse(ci, cj-1, ck+1, nc);
154 const Real lc =
crse(ci, cj , ck-1, nc);
155 const Real cc =
crse(ci, cj , ck, nc);
156 const Real rc =
crse(ci, cj , ck+1, nc);
158 const Real lu =
crse(ci, cj+1, ck-1, nc);
159 const Real cu =
crse(ci, cj+1, ck, nc);
160 const Real ru =
crse(ci, cj+1, ck+1, nc);
162 fine(
fi,fj ,fk ,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cl+lc-cu-rc) + (ll+ru-lu-rl) );
163 fine(
fi,fj ,fk+1,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cl+rc-cu-lc) + (lu+rl-ll-ru) );
164 fine(
fi,fj+1,fk ,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cu+lc-cl-rc) + (lu+rl-ll-ru) );
165 fine(
fi,fj+1,fk+1,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cu+rc-cl-lc) + (ll+ru-lu-rl) );
171 const Real ll =
crse(ci-1, cj, ck-1, nc);
172 const Real cl =
crse(ci , cj, ck-1, nc);
173 const Real rl =
crse(ci+1, cj, ck-1, nc);
175 const Real lc =
crse(ci-1, cj, ck , nc);
176 const Real cc =
crse(ci , cj, ck , nc);
177 const Real rc =
crse(ci+1, cj, ck , nc);
179 const Real lu =
crse(ci-1, cj, ck+1, nc);
180 const Real cu =
crse(ci , cj, ck+1, nc);
181 const Real ru =
crse(ci+1, cj, ck+1, nc);
183 fine(
fi ,fj,fk ,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cl+lc-cu-rc) + (ll+ru-lu-rl) );
184 fine(
fi+1,fj,fk ,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cl+rc-cu-lc) + (lu+rl-ll-ru) );
185 fine(
fi ,fj,fk+1,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cu+lc-cl-rc) + (lu+rl-ll-ru) );
186 fine(
fi+1,fj,fk+1,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cu+rc-cl-lc) + (ll+ru-lu-rl) );
192 const Real ll =
crse(ci-1, cj-1, ck, nc);
193 const Real cl =
crse(ci , cj-1, ck, nc);
194 const Real rl =
crse(ci+1, cj-1, ck, nc);
196 const Real lc =
crse(ci-1, cj , ck, nc);
197 const Real cc =
crse(ci , cj , ck, nc);
198 const Real rc =
crse(ci+1, cj , ck, nc);
200 const Real lu =
crse(ci-1, cj+1, ck, nc);
201 const Real cu =
crse(ci , cj+1, ck, nc);
202 const Real ru =
crse(ci+1, cj+1, ck, nc);
204 fine(
fi ,fj ,fk,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cl+lc-cu-rc) + (ll+ru-lu-rl) );
205 fine(
fi+1,fj ,fk,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cl+rc-cu-lc) + (lu+rl-ll-ru) );
206 fine(
fi ,fj+1,fk,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cu+lc-cl-rc) + (lu+rl-ll-ru) );
207 fine(
fi+1,fj+1,fk,nf) = Real(1.)/Real(64.)*( 64*cc + 8*(cu+rc-cl-lc) + (ll+ru-lu-rl) );
218 GpuArray<Array4<T>, AMREX_SPACEDIM>
const&
fine,
220 GpuArray<Real, AMREX_SPACEDIM>
const& cellSize) noexcept
222 const int fi = ci*ratio[0];
223 const int fj = cj*ratio[1];
224 const int fk = ck*ratio[1];
227 const Real u000 =
fine[0](
fi, fj , fk , nf);
228 const Real u200 =
fine[0](
fi+2, fj , fk , nf);
229 const Real u010 =
fine[0](
fi, fj+1, fk , nf);
230 const Real u210 =
fine[0](
fi+2, fj+1, fk , nf);
231 const Real u001 =
fine[0](
fi, fj , fk+1, nf);
232 const Real u201 =
fine[0](
fi+2, fj , fk+1, nf);
233 const Real u011 =
fine[0](
fi, fj+1, fk+1, nf);
234 const Real u211 =
fine[0](
fi+2, fj+1, fk+1, nf);
236 const Real v000 =
fine[1](
fi , fj , fk , nf);
237 const Real v020 =
fine[1](
fi , fj+2, fk , nf);
238 const Real v100 =
fine[1](
fi+1, fj , fk , nf);
239 const Real v120 =
fine[1](
fi+1, fj+2, fk , nf);
240 const Real v001 =
fine[1](
fi , fj , fk+1, nf);
241 const Real v021 =
fine[1](
fi , fj+2, fk+1, nf);
242 const Real v101 =
fine[1](
fi+1, fj , fk+1, nf);
243 const Real v121 =
fine[1](
fi+1, fj+2, fk+1, nf);
245 const Real w000 =
fine[2](
fi , fj , fk , nf);
246 const Real w002 =
fine[2](
fi , fj , fk+2, nf);
247 const Real w100 =
fine[2](
fi+1, fj , fk , nf);
248 const Real w102 =
fine[2](
fi+1, fj , fk+2, nf);
249 const Real w010 =
fine[2](
fi , fj+1, fk , nf);
250 const Real w012 =
fine[2](
fi , fj+1, fk+2, nf);
251 const Real w110 =
fine[2](
fi+1, fj+1, fk , nf);
252 const Real w112 =
fine[2](
fi+1, fj+1, fk+2, nf);
254 const Real dx = cellSize[0];
255 const Real dy = cellSize[1];
256 const Real dz = cellSize[2];
258 const Real dx3 = dx*dx*dx;
259 const Real dy3 = dy*dy*dy;
260 const Real dz3 = dz*dz*dz;
263 const Real xspys = dx*dx + dy*dy;
264 const Real yspzs = dy*dy + dz*dz;
265 const Real zspxs = dz*dz + dx*dx;
267 fine[0](
fi+1, fj , fk , nf) = Real(0.5)*(u000+u200)
268 + dx*(2*dz*dz+dx*dx)/(8*dy*zspxs)*(v000+v120-v020-v100)
269 + dx3/(8*dy*zspxs)*(v001+v121-v021-v101)
270 + dx*(2*dy*dy+dx*dx)/(8*dz*xspys)*(w000+w102-w002-w100)
271 + dx3/(8*dz*xspys)*(w010+w112-w012-w110);
273 fine[0](
fi+1, fj+1, fk , nf) = Real(0.5)*(u010+u210)
274 + dx*(2*dz*dz+dx*dx)/(8*dy*zspxs)*(v000+v120-v020-v100)
275 + dx3/(8*dy*zspxs)*(v001+v121-v021-v101)
276 + dx*(2*dy*dy+dx*dx)/(8*dz*xspys)*(w010+w112-w012-w110)
277 + dx3/(8*dz*xspys)*(w000+w102-w100-w002);
279 fine[0](
fi+1, fj , fk+1, nf) = Real(0.5)*(u001+u201)
280 + dx*(2*dz*dz+dx*dx)/(8*dy*zspxs)*(v001+v121-v021-v101)
281 + dx3/(8*dy*zspxs)*(v000+v120-v020-v100)
282 + dx*(2*dy*dy+dx*dx)/(8*dz*xspys)*(w000+w102-w002-w100)
283 + dx3/(8*dz*xspys)*(w010+w112-w012-w110);
285 fine[0](
fi+1, fj+1, fk+1, nf) = Real(0.5)*(u011+u211)
286 + dx*(2*dz*dz+dx*dx)/(8*dy*zspxs)*(v001+v121-v021-v101)
287 + dx3/(8*dy*zspxs)*(v000+v120-v020-v100)
288 + dx*(2*dy*dy+dx*dx)/(8*dz*xspys)*(w010+w112-w012-w110)
289 + dx3/(8*dz*xspys)*(w000+w102-w002-w100);
291 fine[1](
fi , fj+1, fk , nf) = Real(0.5)*(v000+v020)
292 + dy*(2*dz*dz+dy*dy)/(8*dx*yspzs)*(u000+u210-u010-u200)
293 + dy3/(8*dx*yspzs)*(u001+u211-u011-u201)
294 + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w000+w012-w002-w010)
295 + dy3/(8*dz*xspys)*(w100+w112-w102-w110);
297 fine[1](
fi+1, fj+1, fk , nf) = Real(0.5)*(v100+v120)
298 + dy*(2*dz*dz+dy*dy)/(8*dx*yspzs)*(u000+u210-u010-u200)
299 + dy3/(8*dx*yspzs)*(u001+u211-u011-u201)
300 + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w100+w112-w102-w110)
301 + dy3/(8*dz*xspys)*(w000+w012-w002-w010);
303 fine[1](
fi , fj+1, fk+1, nf) = Real(0.5)*(v001+v021)
304 + dy*(2*dz*dz+dy*dy)/(8*dx*yspzs)*(u001+u211-u011-u201)
305 + dy3/(8*dx*yspzs)*(u000+u210-u010-u200)
306 + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w000+w012-w002-w010)
307 + dy3/(8*dz*xspys)*(w100+w112-w102-w110);
309 fine[1](
fi+1, fj+1, fk+1, nf) = Real(0.5)*(v101+v121)
310 + dy*(2*dz*dz+dy*dy)/(8*dx*yspzs)*(u001+u211-u011-u201)
311 + dy3/(8*dx*yspzs)*(u000+u210-u010-u200)
312 + dy*(2*dx*dx+dy*dy)/(8*dz*xspys)*(w100+w112-w102-w110)
313 + dy3/(8*dz*xspys)*(w000+w012-w002-w010);
315 fine[2](
fi , fj , fk+1, nf) = Real(0.5)*(w000+w002)
316 + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u000+u201-u001-u200)
317 + dz3/(8*dx*yspzs)*(u010+u211-u011-u210)
318 + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v000+v021-v001-v020)
319 + dz3/(8*dy*zspxs)*(v100+v121-v101-v120);
321 fine[2](
fi , fj+1, fk+1, nf) = Real(0.5)*(w010+w012)
322 + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u010+u211-u011-u210)
323 + dz3/(8*dx*yspzs)*(u000+u201-u001-u200)
324 + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v000+v021-v001-v020)
325 + dz3/(8*dy*zspxs)*(v100+v121-v101-v120);
327 fine[2](
fi+1, fj , fk+1, nf) = Real(0.5)*(w100+w102)
328 + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u000+u201-u001-u200)
329 + dz3/(8*dx*yspzs)*(u010+u211-u011-u210)
330 + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v100+v121-v101-v120)
331 + dz3/(8*dy*zspxs)*(v000+v021-v001-v020);
333 fine[2](
fi+1, fj+1, fk+1, nf) = Real(0.5)*(w110+w112)
334 + dz*(2*dy*dy+dz*dz)/(8*dx*yspzs)*(u010+u211-u011-u210)
335 + dz3/(8*dx*yspzs)*(u000+u201-u001-u200)
336 + dz*(2*dx*dx+dz*dz)/(8*dy*zspxs)*(v100+v121-v101-v120)
337 + dz3/(8*dy*zspxs)*(v000+v021-v001-v020);
343 Array4<T const>
const&
crse,
IntVect const& ratio) noexcept
348 if (i-ii*ratio[0] == 0) {
351 Real
const w =
static_cast<Real
>(i-ii*ratio[0]) * (Real(1.)/Real(ratio[0]));
352 fine(i,j,k,n) = (Real(1.)-w) *
crse(ii,jj,kk,n) + w *
crse(ii+1,jj,kk,n);
359 Array4<T const>
const&
crse,
IntVect const& ratio) noexcept
364 if (j-jj*ratio[1] == 0) {
367 Real
const w =
static_cast<Real
>(j-jj*ratio[1]) * (Real(1.)/Real(ratio[1]));
368 fine(i,j,k,n) = (Real(1.)-w) *
crse(ii,jj,kk,n) + w *
crse(ii,jj+1,kk,n);
380 if (k-kk*ratio[2] == 0) {
383 Real
const w =
static_cast<Real
>(k-kk*ratio[2]) * (Real(1.)/Real(ratio[2]));
384 fine(i,j,k,n) = (Real(1.)-w) *
crse(ii,jj,kk,n) + w *
crse(ii,jj,kk+1,n);
388 template <
typename T>
400 int ihi =
amrex::min(ratio[0]*ic+(ratio[0]-1), fnbxhi.
x);
402 int jhi =
amrex::min(ratio[1]*jc+(ratio[1]-1), fnbxhi.
y);
404 int khi =
amrex::min(ratio[2]*kc+(ratio[2]-1), fnbxhi.
z);
409 for (
int n = 1; n < nvar-1; ++n) {
411 bool redo_me =
false;
412 for (
int k = klo; k <= khi; ++k) {
413 for (
int j = jlo; j <= jhi; ++j) {
414 for (
int i = ilo; i <= ihi; ++i) {
415 if ((fine_state(i,j,k,n) +
fine(i,j,k,n)) < 0.0) {
432 int numFineCells = (ihi-ilo+1) * (jhi-jlo+1) * (khi-klo+1);
448 for (
int k = klo; k <= khi; ++k) {
449 for (
int j = jlo; j <= jhi; ++j) {
450 for (
int i = ilo; i <= ihi; ++i) {
451 crseTot +=
fine(i,j,k,n);
452 if (fine_state(i,j,k,n) <= 0.0) {
453 SumN += fine_state(i,j,k,n);
455 SumP += fine_state(i,j,k,n);
461 if ( (crseTot > 0) && (crseTot >
std::abs(SumN)) ) {
473 for (
int k = klo; k <= khi; ++k) {
474 for (
int j = jlo; j <= jhi; ++j) {
475 for (
int i = ilo; i <= ihi; ++i) {
478 if (fine_state(i,j,k,n) < 0.0) {
479 fine(i,j,k,n) = -fine_state(i,j,k,n);
484 if (fine_state(i,j,k,n) > 0.0) {
485 Real alpha = (crseTot -
std::abs(SumN)) / SumP;
486 fine(i,j,k,n) = alpha * fine_state(i,j,k,n);
489 Real posVal = (crseTot -
std::abs(SumN)) / (Real)numFineCells;
490 fine(i,j,k,n) += posVal;
497 }
else if ( (crseTot > 0) && (crseTot <
std::abs(SumN)) ) {
509 for (
int k = klo; k <= khi; ++k) {
510 for (
int j = jlo; j <= jhi; ++j) {
511 for (
int i = ilo; i <= ihi; ++i) {
512 Real alpha = crseTot /
std::abs(SumN);
513 if (fine_state(i,j,k,n) < 0.0) {
525 }
else if ( (crseTot < 0) && (
std::abs(crseTot) > SumP) ) {
537 for (
int k = klo; k <= khi; ++k) {
538 for (
int j = jlo; j <= jhi; ++j) {
539 for (
int i = ilo; i <= ihi; ++i) {
542 Real negVal = (SumP + SumN + crseTot) / (Real)numFineCells;
543 fine(i,j,k,n) = negVal - fine_state(i,j,k,n);
548 }
else if ( (crseTot < 0) && (
std::abs(crseTot) < SumP) &&
549 ((SumP+SumN+crseTot) > 0.0) ) {
559 for (
int k = klo; k <= khi; ++k) {
560 for (
int j = jlo; j <= jhi; ++j) {
561 for (
int i = ilo; i <= ihi; ++i) {
563 if (fine_state(i,j,k,n) < 0.0) {
565 fine(i,j,k,n) = -fine_state(i,j,k,n);
568 Real alpha = (crseTot + SumN) / SumP;
569 fine(i,j,k,n) = alpha * fine_state(i,j,k,n);
576 }
else if ( (crseTot < 0) && (
std::abs(crseTot) < SumP) &&
577 ((SumP+SumN+crseTot) < 0.0) ) {
589 for (
int k = klo; k <= khi; ++k) {
590 for (
int j = jlo; j <= jhi; ++j) {
591 for (
int i = ilo; i <= ihi; ++i) {
593 if (fine_state(i,j,k,n) > 0.0) {
595 fine(i,j,k,n) = -fine_state(i,j,k,n);
598 Real alpha = (crseTot + SumP) / SumN;
599 fine(i,j,k,n) = alpha * fine_state(i,j,k,n);
611 for (
int k = klo; k <= khi; ++k) {
612 for (
int j = jlo; j <= jhi; ++j) {
613 for (
int i = ilo; i <= ihi; ++i) {
615 for (
int n = 1; n < nvar-1; ++n) {
626 Array4<Real const>
const&
crse,
627 Array4<Real>
const&
fine) noexcept
632 constexpr Array1D<Real, -2, 2> cL = { -0.01171875_rt, 0.0859375_rt, 0.5_rt, -0.0859375_rt, 0.01171875_rt };
641 Array2D<Real, -2, 2, -2, 2> ctmp2;
642 for (
int jj = -2; jj <= 2; ++jj) {
643 for (
int ii = -2; ii <= 2; ++ii) {
644 ctmp2(ii,jj) = 2.0_rt * ( cL(-2)*
crse(ic+ii,jc+jj,kc-2,n)
645 + cL(-1)*
crse(ic+ii,jc+jj,kc-1,n)
646 + cL( 0)*
crse(ic+ii,jc+jj,kc ,n)
647 + cL( 1)*
crse(ic+ii,jc+jj,kc+1,n)
648 + cL( 2)*
crse(ic+ii,jc+jj,kc+2,n) );
650 ctmp2(ii,jj) = 2.0_rt *
crse(ic+ii,jc+jj,kc,n) - ctmp2(ii,jj);
655 Array1D<Real, -2, 2> ctmp;
656 for (
int ii = -2; ii <= 2; ++ii) {
657 ctmp(ii) = 2.0_rt * ( cL(-2)*ctmp2(ii,-2)
658 + cL(-1)*ctmp2(ii,-1)
659 + cL( 0)*ctmp2(ii, 0)
660 + cL( 1)*ctmp2(ii, 1)
661 + cL( 2)*ctmp2(ii, 2) );
663 ctmp(ii) = 2.0_rt * ctmp2(ii, 0) - ctmp(ii);
667 Real ftmp = 2.0_rt * ( cL(-2)*ctmp(-2)
673 ftmp = 2.0_rt * ctmp(0) - ftmp;
676 fine(i,j,k,n) = ftmp;
#define AMREX_PRAGMA_SIMD
Definition: AMReX_Extension.H:80
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
int idir
Definition: AMReX_HypreMLABecLap.cpp:1093
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Array4< int const > mask
Definition: AMReX_InterpFaceRegister.cpp:93
Array4< Real > slope
Definition: AMReX_InterpFaceRegister.cpp:91
Array4< Real const > crse
Definition: AMReX_InterpFaceRegister.cpp:92
static int fi(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:49
constexpr int iz
Definition: AMReX_Interp_3D_C.H:37
constexpr int iy
Definition: AMReX_Interp_2D_C.H:33
constexpr int ix
Definition: AMReX_Interp_2D_C.H:32
constexpr int iyz
Definition: AMReX_Interp_3D_C.H:40
constexpr int ixz
Definition: AMReX_Interp_3D_C.H:39
constexpr int ixy
Definition: AMReX_Interp_2D_C.H:34
constexpr int ixyz
Definition: AMReX_Interp_3D_C.H:41
Definition: AMReX_Amr.cpp:49
BoxND< AMREX_SPACEDIM > Box
Definition: AMReX_BaseFwd.H:27
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const T & max(const T &a, const T &b) noexcept
Definition: AMReX_Algorithm.H:35
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void nodebilin_interp(Box const &bx, Array4< T > const &fine, const int fcomp, const int ncomp, Array4< T const > const &slope, Array4< T const > const &crse, const int ccomp, IntVect const &ratio) noexcept
Definition: AMReX_Interp_1D_C.H:52
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const T & min(const T &a, const T &b) noexcept
Definition: AMReX_Algorithm.H:21
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T abs(const GpuComplex< T > &a_z) noexcept
Return the absolute value of a complex number.
Definition: AMReX_GpuComplex.H:356
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 ubound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:315
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 lbound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:308
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void facediv_face_interp(int, int, int, int, int, int, Array4< T const > const &, Array4< T > const &, Array4< const int > const &, IntVect const &) noexcept
Definition: AMReX_Interp_1D_C.H:75
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void facediv_int(int, int, int, int, GpuArray< Array4< T >, AMREX_SPACEDIM > const &, IntVect const &, GpuArray< Real, AMREX_SPACEDIM > const &) noexcept
Definition: AMReX_Interp_1D_C.H:87
IntVectND< AMREX_SPACEDIM > IntVect
Definition: AMReX_BaseFwd.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ccquartic_interp(int i, int, int, int n, Array4< Real const > const &crse, Array4< Real > const &fine) noexcept
Definition: AMReX_Interp_1D_C.H:110
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void face_linear_interp_x(int i, int, int, int n, Array4< T > const &fine, Array4< T const > const &crse, IntVect const &ratio) noexcept
Definition: AMReX_Interp_1D_C.H:97
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ccprotect_3d(int ic, int jc, int kc, int nvar, Box const &fine_bx, IntVect const &ratio, Array4< T > const &fine, Array4< T const > const &fine_state) noexcept
Definition: AMReX_Interp_3D_C.H:390
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void pcinterp_interp(Box const &bx, Array4< Real > const &fine, const int fcomp, const int ncomp, Array4< Real const > const &crse, const int ccomp, IntVect const &ratio) noexcept
Definition: AMReX_Interp_1D_C.H:14
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void face_linear_interp_y(int i, int j, int, int n, Array4< T > const &fine, Array4< T const > const &crse, IntVect const &ratio) noexcept
Definition: AMReX_Interp_2D_C.H:189
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void nodebilin_slopes(Box const &bx, Array4< T > const &slope, Array4< T const > const &u, const int icomp, const int ncomp, IntVect const &ratio) noexcept
Definition: AMReX_Interp_1D_C.H:33
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
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void face_linear_interp_z(int i, int j, int k, int n, Array4< T > const &fine, Array4< T const > const &crse, IntVect const &ratio) noexcept
Definition: AMReX_Interp_3D_C.H:374
Definition: AMReX_Array4.H:61
Definition: AMReX_Dim3.H:12
int x
Definition: AMReX_Dim3.H:12
int z
Definition: AMReX_Dim3.H:12
int y
Definition: AMReX_Dim3.H:12