1 #ifndef AMREX_MLTENSOR_3D_K_H_
2 #define AMREX_MLTENSOR_3D_K_H_
3 #include <AMReX_Config.H>
18 0,AMREX_SPACEDIM>
const& bct,
21 0,AMREX_SPACEDIM>
const& bcl,
22 int inhomog,
int maxorder,
24 bool xlo_domain,
bool ylo_domain) noexcept
31 if ((x_interior && y_interior) || (x_exterior && y_exterior)) {
32 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
36 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
37 Real tmp = vel(i,j,k,icomp);
41 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
42 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
44 }
else if (x_interior || xlo_domain) {
45 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
49 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
51 }
else if (y_interior || ylo_domain) {
52 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
56 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
71 0,AMREX_SPACEDIM>
const& bct,
74 0,AMREX_SPACEDIM>
const& bcl,
75 int inhomog,
int maxorder,
77 bool xhi_domain,
bool ylo_domain) noexcept
84 if ((x_interior && y_interior) || (x_exterior && y_exterior)) {
85 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
89 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
90 Real tmp = vel(i,j,k,icomp);
94 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
95 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
97 }
else if (x_interior || xhi_domain) {
98 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
102 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
104 }
else if (y_interior || ylo_domain) {
105 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
109 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
124 0,AMREX_SPACEDIM>
const& bct,
127 0,AMREX_SPACEDIM>
const& bcl,
128 int inhomog,
int maxorder,
130 bool xlo_domain,
bool yhi_domain) noexcept
137 if ((x_interior && y_interior) || (x_exterior && y_exterior)) {
138 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
142 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
143 Real tmp = vel(i,j,k,icomp);
147 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
148 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
150 }
else if (x_interior || xlo_domain) {
151 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
155 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
157 }
else if (y_interior || yhi_domain) {
158 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
162 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
177 0,AMREX_SPACEDIM>
const& bct,
180 0,AMREX_SPACEDIM>
const& bcl,
181 int inhomog,
int maxorder,
183 bool xhi_domain,
bool yhi_domain) noexcept
190 if ((x_interior && y_interior) || (x_exterior && y_exterior)) {
191 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
195 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
196 Real tmp = vel(i,j,k,icomp);
200 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
201 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
203 }
else if (x_interior || xhi_domain) {
204 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
208 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
210 }
else if (y_interior || yhi_domain) {
211 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
215 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
230 0,AMREX_SPACEDIM>
const& bct,
233 0,AMREX_SPACEDIM>
const& bcl,
234 int inhomog,
int maxorder,
236 bool xlo_domain,
bool zlo_domain) noexcept
243 if ((x_interior && z_interior) || (x_exterior && z_exterior)) {
244 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
248 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
249 Real tmp = vel(i,j,k,icomp);
253 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
254 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
256 }
else if (x_interior || xlo_domain) {
257 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
261 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
263 }
else if (z_interior || zlo_domain) {
264 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
268 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
283 0,AMREX_SPACEDIM>
const& bct,
286 0,AMREX_SPACEDIM>
const& bcl,
287 int inhomog,
int maxorder,
289 bool xhi_domain,
bool zlo_domain) noexcept
296 if ((x_interior && z_interior) || (x_exterior && z_exterior)) {
297 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
301 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
302 Real tmp = vel(i,j,k,icomp);
306 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
307 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
309 }
else if (x_interior || xhi_domain) {
310 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
314 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
316 }
else if (z_interior || zlo_domain) {
317 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
321 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
336 0,AMREX_SPACEDIM>
const& bct,
339 0,AMREX_SPACEDIM>
const& bcl,
340 int inhomog,
int maxorder,
342 bool xlo_domain,
bool zhi_domain) noexcept
349 if ((x_interior && z_interior) || (x_exterior && z_exterior)) {
350 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
354 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
355 Real tmp = vel(i,j,k,icomp);
359 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
360 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
362 }
else if (x_interior || xlo_domain) {
363 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
367 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
369 }
else if (z_interior || zhi_domain) {
370 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
374 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
389 0,AMREX_SPACEDIM>
const& bct,
392 0,AMREX_SPACEDIM>
const& bcl,
393 int inhomog,
int maxorder,
395 bool xhi_domain,
bool zhi_domain) noexcept
402 if ((x_interior && z_interior) || (x_exterior && z_exterior)) {
403 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
407 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
408 Real tmp = vel(i,j,k,icomp);
412 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
413 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
415 }
else if (x_interior || xhi_domain) {
416 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
420 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
422 }
else if (z_interior || zhi_domain) {
423 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
427 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
442 0,AMREX_SPACEDIM>
const& bct,
445 0,AMREX_SPACEDIM>
const& bcl,
446 int inhomog,
int maxorder,
448 bool ylo_domain,
bool zlo_domain) noexcept
455 if ((y_interior && z_interior) || (y_exterior && z_exterior)) {
456 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
460 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
461 Real tmp = vel(i,j,k,icomp);
465 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
466 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
468 }
else if (y_interior || ylo_domain) {
469 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
473 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
475 }
else if (z_interior || zlo_domain) {
476 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
480 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
495 0,AMREX_SPACEDIM>
const& bct,
498 0,AMREX_SPACEDIM>
const& bcl,
499 int inhomog,
int maxorder,
501 bool yhi_domain,
bool zlo_domain) noexcept
508 if ((y_interior && z_interior) || (y_exterior && z_exterior)) {
509 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
513 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
514 Real tmp = vel(i,j,k,icomp);
518 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
519 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
521 }
else if (y_interior || yhi_domain) {
522 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
526 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
528 }
else if (z_interior || zlo_domain) {
529 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
533 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
548 0,AMREX_SPACEDIM>
const& bct,
551 0,AMREX_SPACEDIM>
const& bcl,
552 int inhomog,
int maxorder,
554 bool ylo_domain,
bool zhi_domain) noexcept
561 if ((y_interior && z_interior) || (y_exterior && z_exterior)) {
562 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
566 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
567 Real tmp = vel(i,j,k,icomp);
571 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
572 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
574 }
else if (y_interior || ylo_domain) {
575 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
579 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
581 }
else if (z_interior || zhi_domain) {
582 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
586 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
601 0,AMREX_SPACEDIM>
const& bct,
604 0,AMREX_SPACEDIM>
const& bcl,
605 int inhomog,
int maxorder,
607 bool yhi_domain,
bool zhi_domain) noexcept
614 if ((y_interior && z_interior) || (y_exterior && z_exterior)) {
615 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
619 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
620 Real tmp = vel(i,j,k,icomp);
624 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
625 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
627 }
else if (y_interior || yhi_domain) {
628 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
632 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
634 }
else if (z_interior || zhi_domain) {
635 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
639 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
648 Array4<Real>
const& vel,
649 Array4<int const>
const& mxlo,
650 Array4<int const>
const& mylo,
651 Array4<int const>
const& mzlo,
652 Array4<int const>
const& mxhi,
653 Array4<int const>
const& myhi,
654 Array4<int const>
const& mzhi,
655 Array4<Real const>
const& bcvalxlo,
656 Array4<Real const>
const& bcvalylo,
657 Array4<Real const>
const& bcvalzlo,
658 Array4<Real const>
const& bcvalxhi,
659 Array4<Real const>
const& bcvalyhi,
660 Array4<Real const>
const& bcvalzhi,
663 0,AMREX_SPACEDIM>
const& bct,
666 0,AMREX_SPACEDIM>
const& bcl,
667 int inhomog,
int maxorder,
668 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv,
669 Dim3
const& dlo, Dim3
const& dhi) noexcept
674 bool xlo_domain = (vlo.x == dlo.x);
675 bool ylo_domain = (vlo.y == dlo.y);
676 bool zlo_domain = (vlo.z == dlo.z);
677 bool xhi_domain = (vhi.x == dhi.x);
678 bool yhi_domain = (vhi.y == dhi.y);
679 bool zhi_domain = (vhi.z == dhi.z);
681 for (
int icomp = 0; icomp < AMREX_SPACEDIM; ++icomp) {
689 (!xlo_domain || !ylo_domain || !zlo_domain)) {
696 if ((x_interior && y_interior && z_interior) ||
697 (x_exterior && y_exterior && z_exterior)) {
701 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
702 Real tmp = vel(i,j,k,icomp);
706 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
707 tmp += vel(i,j,k,icomp);
711 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
712 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
713 }
else if (x_interior && y_interior) {
717 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
718 Real tmp = vel(i,j,k,icomp);
722 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
723 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
724 }
else if (x_interior && z_interior) {
728 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
729 Real tmp = vel(i,j,k,icomp);
733 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
734 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
735 }
else if (y_interior && z_interior) {
739 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
740 Real tmp = vel(i,j,k,icomp);
744 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
745 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
746 }
else if (x_interior) {
750 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
751 }
else if (y_interior) {
755 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
756 }
else if (z_interior) {
760 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
777 (!xhi_domain || !ylo_domain || !zlo_domain)) {
778 if ((x_interior && y_interior && z_interior) ||
779 (x_exterior && y_exterior && z_exterior)) {
783 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
784 Real tmp = vel(i,j,k,icomp);
788 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
789 tmp += vel(i,j,k,icomp);
793 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
794 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
795 }
else if (x_interior && y_interior) {
799 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
800 Real tmp = vel(i,j,k,icomp);
804 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
805 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
806 }
else if (x_interior && z_interior) {
810 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
811 Real tmp = vel(i,j,k,icomp);
815 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
816 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
817 }
else if (y_interior && z_interior) {
821 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
822 Real tmp = vel(i,j,k,icomp);
826 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
827 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
828 }
else if (x_interior) {
832 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
833 }
else if (y_interior) {
837 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
838 }
else if (z_interior) {
842 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
859 (!xlo_domain || !yhi_domain || !zlo_domain)) {
860 if ((x_interior && y_interior && z_interior) ||
861 (x_exterior && y_exterior && z_exterior)) {
865 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
866 Real tmp = vel(i,j,k,icomp);
870 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
871 tmp += vel(i,j,k,icomp);
875 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
876 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
877 }
else if (x_interior && y_interior) {
881 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
882 Real tmp = vel(i,j,k,icomp);
886 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
887 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
888 }
else if (x_interior && z_interior) {
892 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
893 Real tmp = vel(i,j,k,icomp);
897 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
898 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
899 }
else if (y_interior && z_interior) {
903 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
904 Real tmp = vel(i,j,k,icomp);
908 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
909 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
910 }
else if (x_interior) {
914 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
915 }
else if (y_interior) {
919 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
920 }
else if (z_interior) {
924 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
941 (!xhi_domain || !yhi_domain || !zlo_domain)) {
942 if ((x_interior && y_interior && z_interior) ||
943 (x_exterior && y_exterior && z_exterior)) {
947 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
948 Real tmp = vel(i,j,k,icomp);
952 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
953 tmp += vel(i,j,k,icomp);
957 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
958 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
959 }
else if (x_interior && y_interior) {
963 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
964 Real tmp = vel(i,j,k,icomp);
968 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
969 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
970 }
else if (x_interior && z_interior) {
974 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
975 Real tmp = vel(i,j,k,icomp);
979 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
980 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
981 }
else if (y_interior && z_interior) {
985 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
986 Real tmp = vel(i,j,k,icomp);
990 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
991 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
992 }
else if (x_interior) {
996 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
997 }
else if (y_interior) {
1001 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1002 }
else if (z_interior) {
1006 bcvalzlo, maxorder, dxinv[2], inhomog, icomp);
1023 (!xlo_domain || !ylo_domain || !zhi_domain)) {
1024 if ((x_interior && y_interior && z_interior) ||
1025 (x_exterior && y_exterior && z_exterior)) {
1029 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1030 Real tmp = vel(i,j,k,icomp);
1034 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1035 tmp += vel(i,j,k,icomp);
1039 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1040 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
1041 }
else if (x_interior && y_interior) {
1045 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1046 Real tmp = vel(i,j,k,icomp);
1050 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1051 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1052 }
else if (x_interior && z_interior) {
1056 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1057 Real tmp = vel(i,j,k,icomp);
1061 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1062 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1063 }
else if (y_interior && z_interior) {
1067 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1068 Real tmp = vel(i,j,k,icomp);
1072 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1073 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1074 }
else if (x_interior) {
1078 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1079 }
else if (y_interior) {
1083 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1084 }
else if (z_interior) {
1088 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1105 (!xhi_domain || !ylo_domain || !zhi_domain)) {
1106 if ((x_interior && y_interior && z_interior) ||
1107 (x_exterior && y_exterior && z_exterior)) {
1111 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1112 Real tmp = vel(i,j,k,icomp);
1116 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1117 tmp += vel(i,j,k,icomp);
1121 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1122 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
1123 }
else if (x_interior && y_interior) {
1127 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1128 Real tmp = vel(i,j,k,icomp);
1132 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1133 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1134 }
else if (x_interior && z_interior) {
1138 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1139 Real tmp = vel(i,j,k,icomp);
1143 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1144 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1145 }
else if (y_interior && z_interior) {
1149 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1150 Real tmp = vel(i,j,k,icomp);
1154 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1155 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1156 }
else if (x_interior) {
1160 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1161 }
else if (y_interior) {
1165 bcvalylo, maxorder, dxinv[1], inhomog, icomp);
1166 }
else if (z_interior) {
1170 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1187 (!xlo_domain || !yhi_domain || !zhi_domain)) {
1188 if ((x_interior && y_interior && z_interior) ||
1189 (x_exterior && y_exterior && z_exterior)) {
1193 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1194 Real tmp = vel(i,j,k,icomp);
1198 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1199 tmp += vel(i,j,k,icomp);
1203 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1204 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
1205 }
else if (x_interior && y_interior) {
1209 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1210 Real tmp = vel(i,j,k,icomp);
1214 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1215 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1216 }
else if (x_interior && z_interior) {
1220 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1221 Real tmp = vel(i,j,k,icomp);
1225 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1226 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1227 }
else if (y_interior && z_interior) {
1231 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1232 Real tmp = vel(i,j,k,icomp);
1236 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1237 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1238 }
else if (x_interior) {
1242 bcvalxlo, maxorder, dxinv[0], inhomog, icomp);
1243 }
else if (y_interior) {
1247 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1248 }
else if (z_interior) {
1252 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1269 (!xhi_domain || !yhi_domain || !zhi_domain)) {
1270 if ((x_interior && y_interior && z_interior) ||
1271 (x_exterior && y_exterior && z_exterior)) {
1275 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1276 Real tmp = vel(i,j,k,icomp);
1280 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1281 tmp += vel(i,j,k,icomp);
1285 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1286 vel(i,j,k,icomp) = Real(1./3.)*(tmp+vel(i,j,k,icomp));
1287 }
else if (x_interior && y_interior) {
1291 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1292 Real tmp = vel(i,j,k,icomp);
1296 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1297 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1298 }
else if (x_interior && z_interior) {
1302 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1303 Real tmp = vel(i,j,k,icomp);
1307 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1308 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1309 }
else if (y_interior && z_interior) {
1313 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1314 Real tmp = vel(i,j,k,icomp);
1318 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1319 vel(i,j,k,icomp) = 0.5_rt*(tmp+vel(i,j,k,icomp));
1320 }
else if (x_interior) {
1324 bcvalxhi, maxorder, dxinv[0], inhomog, icomp);
1325 }
else if (y_interior) {
1329 bcvalyhi, maxorder, dxinv[1], inhomog, icomp);
1330 }
else if (z_interior) {
1334 bcvalzhi, maxorder, dxinv[2], inhomog, icomp);
1362 0,AMREX_SPACEDIM>
const& bct,
1365 0,AMREX_SPACEDIM>
const& bcl,
1366 int inhomog,
int maxorder,
1368 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1374 bool xlo_domain = (vlo.x == dlo.x);
1375 bool ylo_domain = (vlo.y == dlo.y);
1376 bool zlo_domain = (vlo.z == dlo.z);
1377 bool xhi_domain = (vhi.x == dhi.x);
1378 bool yhi_domain = (vhi.y == dhi.y);
1379 bool zhi_domain = (vhi.z == dhi.z);
1381 for (
int k = vlo.z; k <= vhi.z; ++k) {
1383 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, ylo_domain);
1385 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, ylo_domain);
1387 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, yhi_domain);
1389 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, yhi_domain);
1392 for (
int j = vlo.y; j <= vhi.y; ++j) {
1394 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, zlo_domain);
1396 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, zlo_domain);
1398 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, zhi_domain);
1400 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, zhi_domain);
1403 for (
int i = vlo.x; i <= vhi.x; ++i) {
1405 bct, bcl, inhomog, maxorder, dxinv, ylo_domain, zlo_domain);
1407 bct, bcl, inhomog, maxorder, dxinv, yhi_domain, zlo_domain);
1409 bct, bcl, inhomog, maxorder, dxinv, ylo_domain, zhi_domain);
1411 bct, bcl, inhomog, maxorder, dxinv, yhi_domain, zhi_domain);
1415 #ifdef AMREX_USE_GPU
1434 0,AMREX_SPACEDIM>
const& bct,
1437 0,AMREX_SPACEDIM>
const& bcl,
1438 int inhomog,
int maxorder,
1440 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1445 bool xlo_domain = (vlo.x == dlo.x);
1446 bool ylo_domain = (vlo.y == dlo.y);
1447 bool zlo_domain = (vlo.z == dlo.z);
1448 bool xhi_domain = (vhi.x == dhi.x);
1449 bool yhi_domain = (vhi.y == dhi.y);
1450 bool zhi_domain = (vhi.z == dhi.z);
1452 for (
int k = vlo.z + tid; k <= vhi.z; k += bdim) {
1454 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, ylo_domain);
1456 }
else if (bid == 1) {
1457 for (
int k = vlo.z + tid; k <= vhi.z; k += bdim) {
1459 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, ylo_domain);
1461 }
else if (bid == 2) {
1462 for (
int k = vlo.z + tid; k <= vhi.z; k += bdim) {
1464 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, yhi_domain);
1466 }
else if (bid == 3) {
1467 for (
int k = vlo.z + tid; k <= vhi.z; k += bdim) {
1469 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, yhi_domain);
1471 }
else if (bid == 4) {
1472 for (
int j = vlo.y + tid; j <= vhi.y; j += bdim) {
1474 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, zlo_domain);
1476 }
else if (bid == 5) {
1477 for (
int j = vlo.y + tid; j <= vhi.y; j += bdim) {
1479 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, zlo_domain);
1481 }
else if (bid == 6) {
1482 for (
int j = vlo.y + tid; j <= vhi.y; j += bdim) {
1484 bct, bcl, inhomog, maxorder, dxinv, xlo_domain, zhi_domain);
1486 }
else if (bid == 7) {
1487 for (
int j = vlo.y + tid; j <= vhi.y; j += bdim) {
1489 bct, bcl, inhomog, maxorder, dxinv, xhi_domain, zhi_domain);
1491 }
else if (bid == 8) {
1492 for (
int i = vlo.x + tid; i <= vhi.x; i += bdim) {
1494 bct, bcl, inhomog, maxorder, dxinv, ylo_domain, zlo_domain);
1496 }
else if (bid == 9) {
1497 for (
int i = vlo.x + tid; i <= vhi.x; i += bdim) {
1499 bct, bcl, inhomog, maxorder, dxinv, yhi_domain, zlo_domain);
1501 }
else if (bid == 10) {
1502 for (
int i = vlo.x + tid; i <= vhi.x; i += bdim) {
1504 bct, bcl, inhomog, maxorder, dxinv, ylo_domain, zhi_domain);
1506 }
else if (bid == 11) {
1507 for (
int i = vlo.x + tid; i <= vhi.x; i += bdim) {
1509 bct, bcl, inhomog, maxorder, dxinv, yhi_domain, zhi_domain);
1518 return (vel(i,j,k+1,n)+vel(i-1,j,k+1,n)-vel(i,j,k-1,n)-vel(i-1,j,k-1,n))*(Real(0.25)*dzi);
1524 return (vel(i,j,k+1,n)+vel(i,j-1,k+1,n)-vel(i,j,k-1,n)-vel(i,j-1,k-1,n))*(Real(0.25)*dzi);
1530 return (vel(i+1,j,k,n)+vel(i+1,j,k-1,n)-vel(i-1,j,k,n)-vel(i-1,j,k-1,n))*(Real(0.25)*dxi);
1536 return (vel(i,j+1,k,n)+vel(i,j+1,k-1,n)-vel(i,j-1,k,n)-vel(i,j-1,k-1,n))*(Real(0.25)*dyi);
1541 Array4<Real const>
const& vel,
1542 Array4<Real const>
const& etax,
1543 Array4<Real const>
const& kapx,
1544 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv) noexcept
1546 const Real dyi = dxinv[1];
1547 const Real dzi = dxinv[2];
1550 constexpr Real twoThirds = Real(2./3.);
1552 for (
int k = lo.z; k <= hi.z; ++k) {
1553 for (
int j = lo.y; j <= hi.y; ++j) {
1555 for (
int i = lo.x; i <= hi.x; ++i) {
1560 Real divu = dvdy + dwdz;
1561 Real xif = kapx(i,j,k);
1562 Real mun = Real(0.75)*(etax(i,j,k,0)-xif);
1563 Real mut = etax(i,j,k,1);
1564 fx(i,j,k,0) = -mun*(-twoThirds*divu) - xif*divu;
1565 fx(i,j,k,1) = -mut*(dudy);
1566 fx(i,j,k,2) = -mut*(dudz);
1574 Array4<Real const>
const& vel,
1575 Array4<Real const>
const& etay,
1576 Array4<Real const>
const& kapy,
1577 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv) noexcept
1579 const Real dxi = dxinv[0];
1580 const Real dzi = dxinv[2];
1583 constexpr Real twoThirds = Real(2./3.);
1585 for (
int k = lo.z; k <= hi.z; ++k) {
1586 for (
int j = lo.y; j <= hi.y; ++j) {
1588 for (
int i = lo.x; i <= hi.x; ++i) {
1593 Real divu = dudx + dwdz;
1594 Real xif = kapy(i,j,k);
1595 Real mun = Real(0.75)*(etay(i,j,k,1)-xif);
1596 Real mut = etay(i,j,k,0);
1597 fy(i,j,k,0) = -mut*(dvdx);
1598 fy(i,j,k,1) = -mun*(-twoThirds*divu) - xif*divu;
1599 fy(i,j,k,2) = -mut*(dvdz);
1612 const Real dxi = dxinv[0];
1613 const Real dyi = dxinv[1];
1616 constexpr Real twoThirds = Real(2./3.);
1618 for (
int k = lo.z; k <= hi.z; ++k) {
1619 for (
int j = lo.y; j <= hi.y; ++j) {
1621 for (
int i = lo.x; i <= hi.x; ++i) {
1626 Real divu = dudx + dvdy;
1627 Real xif = kapz(i,j,k);
1628 Real mun = Real(0.75)*(etaz(i,j,k,2)-xif);
1629 Real mut = etaz(i,j,k,0);
1630 fz(i,j,k,0) = -mut*(dwdx);
1631 fz(i,j,k,1) = -mut*(dwdy);
1632 fz(i,j,k,2) = -mun*(-twoThirds*divu) - xif*divu;
1643 0,AMREX_SPACEDIM>
const& bct,
1644 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1650 ddz = (bvxlo(i-1,j,k ,n) * Real(-1.5) +
1651 bvxlo(i-1,j,k+1,n) * Real(2.) +
1652 bvxlo(i-1,j,k+2,n) * Real(-0.5)) * dzi;
1653 }
else if (k == dhi.z) {
1654 ddz = -(bvxlo(i-1,j,k ,n) * Real(-1.5) +
1655 bvxlo(i-1,j,k-1,n) * Real(2.) +
1656 bvxlo(i-1,j,k-2,n) * Real(-0.5)) * dzi;
1658 ddz = (bvxlo(i-1,j,k+1,n)-bvxlo(i-1,j,k-1,n))*(Real(0.5)*dzi);
1661 ddz = (vel(i,j,k+1,n)-vel(i,j,k-1,n))*(Real(0.5)*dzi);
1665 }
else if (i == dhi.x+1) {
1668 ddz = (bvxhi(i,j,k ,n) * Real(-1.5) +
1669 bvxhi(i,j,k+1,n) * Real(2.) +
1670 bvxhi(i,j,k+2,n) * Real(-0.5)) * dzi;
1671 }
else if (k == dhi.z) {
1672 ddz = -(bvxhi(i,j,k ,n) * Real(-1.5) +
1673 bvxhi(i,j,k-1,n) * Real(2.) +
1674 bvxhi(i,j,k-2,n) * Real(-0.5)) * dzi;
1676 ddz = (bvxhi(i,j,k+1,n)-bvxhi(i,j,k-1,n))*(Real(0.5)*dzi);
1679 ddz = (vel(i-1,j,k+1,n)-vel(i-1,j,k-1,n))*(Real(0.5)*dzi);
1694 0,AMREX_SPACEDIM>
const& bct,
1695 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1701 ddz = (bvylo(i,j-1,k ,n) * Real(-1.5) +
1702 bvylo(i,j-1,k+1,n) * Real(2.) +
1703 bvylo(i,j-1,k+2,n) * Real(-0.5)) * dzi;
1704 }
else if (k == dhi.z) {
1705 ddz = -(bvylo(i,j-1,k ,n) * Real(-1.5) +
1706 bvylo(i,j-1,k-1,n) * Real(2.) +
1707 bvylo(i,j-1,k-2,n) * Real(-0.5)) * dzi;
1709 ddz = (bvylo(i,j-1,k+1,n)-bvylo(i,j-1,k-1,n))*(Real(0.5)*dzi);
1712 ddz = (vel(i,j,k+1,n)-vel(i,j,k-1,n))*(Real(0.5)*dzi);
1716 }
else if (j == dhi.y+1) {
1719 ddz = (bvyhi(i,j,k ,n) * Real(-1.5) +
1720 bvyhi(i,j,k+1,n) * Real(2.) +
1721 bvyhi(i,j,k+2,n) * Real(-0.5)) * dzi;
1722 }
else if (k == dhi.z) {
1723 ddz = -(bvyhi(i,j,k ,n) * Real(-1.5) +
1724 bvyhi(i,j,k-1,n) * Real(2.) +
1725 bvyhi(i,j,k-2,n) * Real(-0.5)) * dzi;
1727 ddz = (bvyhi(i,j,k+1,n)-bvyhi(i,j,k-1,n))*(Real(0.5)*dzi);
1730 ddz = (vel(i,j-1,k+1,n)-vel(i,j-1,k-1,n))*(Real(0.5)*dzi);
1745 0,AMREX_SPACEDIM>
const& bct,
1746 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1752 ddx = (bvzlo(i ,j,k-1,n) * Real(-1.5) +
1753 bvzlo(i+1,j,k-1,n) * Real(2.) +
1754 bvzlo(i+2,j,k-1,n) * Real(-0.5)) * dxi;
1755 }
else if (i == dhi.x) {
1756 ddx = -(bvzlo(i ,j,k-1,n) * Real(-1.5) +
1757 bvzlo(i-1,j,k-1,n) * Real(2.) +
1758 bvzlo(i-2,j,k-1,n) * Real(-0.5)) * dxi;
1760 ddx = (bvzlo(i+1,j,k-1,n)-bvzlo(i-1,j,k-1,n))*(Real(0.5)*dxi);
1763 ddx = (vel(i+1,j,k,n)-vel(i-1,j,k,n))*(Real(0.5)*dxi);
1767 }
else if (k == dhi.z+1) {
1770 ddx = (bvzhi(i ,j,k,n) * Real(-1.5) +
1771 bvzhi(i+1,j,k,n) * Real(2.) +
1772 bvzhi(i+2,j,k,n) * Real(-0.5)) * dxi;
1773 }
else if (i == dhi.x) {
1774 ddx = -(bvzhi(i ,j,k,n) * Real(-1.5) +
1775 bvzhi(i-1,j,k,n) * Real(2.) +
1776 bvzhi(i-2,j,k,n) * Real(-0.5)) * dxi;
1778 ddx = (bvzhi(i+1,j,k,n)-bvzhi(i-1,j,k,n))*(Real(0.5)*dxi);
1781 ddx = (vel(i+1,j,k-1,n)-vel(i-1,j,k-1,n))*(Real(0.5)*dxi);
1796 0,AMREX_SPACEDIM>
const& bct,
1797 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1803 ddy = (bvzlo(i,j ,k-1,n) * Real(-1.5) +
1804 bvzlo(i,j+1,k-1,n) * Real(2.) +
1805 bvzlo(i,j+2,k-1,n) * Real(-0.5)) * dyi;
1806 }
else if (j == dhi.y) {
1807 ddy = -(bvzlo(i,j ,k-1,n) * Real(-1.5) +
1808 bvzlo(i,j-1,k-1,n) * Real(2.) +
1809 bvzlo(i,j-2,k-1,n) * Real(-0.5)) * dyi;
1811 ddy = (bvzlo(i,j+1,k-1,n)-bvzlo(i,j-1,k-1,n))*(Real(0.5)*dyi);
1814 ddy = (vel(i,j+1,k,n)-vel(i,j-1,k,n))*(Real(0.5)*dyi);
1818 }
else if (k == dhi.z+1) {
1821 ddy = (bvzhi(i,j ,k,n) * Real(-1.5) +
1822 bvzhi(i,j+1,k,n) * Real(2.) +
1823 bvzhi(i,j+2,k,n) * Real(-0.5)) * dyi;
1824 }
else if (j == dhi.y) {
1825 ddy = -(bvzhi(i,j ,k,n) * Real(-1.5) +
1826 bvzhi(i,j-1,k,n) * Real(2.) +
1827 bvzhi(i,j-2,k,n) * Real(-0.5)) * dyi;
1829 ddy = (bvzhi(i,j+1,k,n)-bvzhi(i,j-1,k,n))*(Real(0.5)*dyi);
1832 ddy = (vel(i,j+1,k-1,n)-vel(i,j-1,k-1,n))*(Real(0.5)*dyi);
1844 Array4<Real const>
const& vel,
1845 Array4<Real const>
const& etax,
1846 Array4<Real const>
const& kapx,
1847 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv,
1848 Array4<Real const>
const& bvxlo,
1849 Array4<Real const>
const& bvxhi,
1852 0,AMREX_SPACEDIM>
const& bct,
1853 Dim3
const& dlo, Dim3
const& dhi) noexcept
1855 const Real dyi = dxinv[1];
1856 const Real dzi = dxinv[2];
1859 constexpr Real twoThirds = Real(2./3.);
1861 for (
int k = lo.z; k <= hi.z; ++k) {
1862 for (
int j = lo.y; j <= hi.y; ++j) {
1863 for (
int i = lo.x; i <= hi.x; ++i) {
1864 Real dudy =
mltensor_dy_on_xface(i,j,k,0,vel,dyi,bvxlo,bvxhi,bct,dlo,dhi);
1865 Real dvdy =
mltensor_dy_on_xface(i,j,k,1,vel,dyi,bvxlo,bvxhi,bct,dlo,dhi);
1866 Real dudz =
mltensor_dz_on_xface(i,j,k,0,vel,dzi,bvxlo,bvxhi,bct,dlo,dhi);
1867 Real dwdz =
mltensor_dz_on_xface(i,j,k,2,vel,dzi,bvxlo,bvxhi,bct,dlo,dhi);
1868 Real divu = dvdy + dwdz;
1869 Real xif = kapx(i,j,k);
1870 Real mun = Real(0.75)*(etax(i,j,k,0)-xif);
1871 Real mut = etax(i,j,k,1);
1872 fx(i,j,k,0) = -mun*(-twoThirds*divu) - xif*divu;
1873 fx(i,j,k,1) = -mut*(dudy);
1874 fx(i,j,k,2) = -mut*(dudz);
1882 Array4<Real const>
const& vel,
1883 Array4<Real const>
const& etay,
1884 Array4<Real const>
const& kapy,
1885 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv,
1886 Array4<Real const>
const& bvylo,
1887 Array4<Real const>
const& bvyhi,
1890 0,AMREX_SPACEDIM>
const& bct,
1891 Dim3
const& dlo, Dim3
const& dhi) noexcept
1893 const Real dxi = dxinv[0];
1894 const Real dzi = dxinv[2];
1897 constexpr Real twoThirds = Real(2./3.);
1899 for (
int k = lo.z; k <= hi.z; ++k) {
1900 for (
int j = lo.y; j <= hi.y; ++j) {
1901 for (
int i = lo.x; i <= hi.x; ++i) {
1902 Real dudx =
mltensor_dx_on_yface(i,j,k,0,vel,dxi,bvylo,bvyhi,bct,dlo,dhi);
1903 Real dvdx =
mltensor_dx_on_yface(i,j,k,1,vel,dxi,bvylo,bvyhi,bct,dlo,dhi);
1904 Real dvdz =
mltensor_dz_on_yface(i,j,k,1,vel,dzi,bvylo,bvyhi,bct,dlo,dhi);
1905 Real dwdz =
mltensor_dz_on_yface(i,j,k,2,vel,dzi,bvylo,bvyhi,bct,dlo,dhi);
1906 Real divu = dudx + dwdz;
1907 Real xif = kapy(i,j,k);
1908 Real mun = Real(0.75)*(etay(i,j,k,1)-xif);
1909 Real mut = etay(i,j,k,0);
1910 fy(i,j,k,0) = -mut*(dvdx);
1911 fy(i,j,k,1) = -mun*(-twoThirds*divu) - xif*divu;
1912 fy(i,j,k,2) = -mut*(dvdz);
1928 0,AMREX_SPACEDIM>
const& bct,
1929 Dim3 const& dlo,
Dim3 const& dhi) noexcept
1931 const Real dxi = dxinv[0];
1932 const Real dyi = dxinv[1];
1935 constexpr Real twoThirds = Real(2./3.);
1937 for (
int k = lo.z; k <= hi.z; ++k) {
1938 for (
int j = lo.y; j <= hi.y; ++j) {
1939 for (
int i = lo.x; i <= hi.x; ++i) {
1940 Real dudx =
mltensor_dx_on_zface(i,j,k,0,vel,dxi,bvzlo,bvzhi,bct,dlo,dhi);
1941 Real dwdx =
mltensor_dx_on_zface(i,j,k,2,vel,dxi,bvzlo,bvzhi,bct,dlo,dhi);
1942 Real dvdy =
mltensor_dy_on_zface(i,j,k,1,vel,dyi,bvzlo,bvzhi,bct,dlo,dhi);
1943 Real dwdy =
mltensor_dy_on_zface(i,j,k,2,vel,dyi,bvzlo,bvzhi,bct,dlo,dhi);
1944 Real divu = dudx + dvdy;
1945 Real xif = kapz(i,j,k);
1946 Real mun = Real(0.75)*(etaz(i,j,k,2)-xif);
1947 Real mut = etaz(i,j,k,0);
1948 fz(i,j,k,0) = -mut*(dwdx);
1949 fz(i,j,k,1) = -mut*(dwdy);
1950 fz(i,j,k,2) = -mun*(-twoThirds*divu) - xif*divu;
1962 Real bscalar) noexcept
1964 const Real dxi = bscalar * dxinv[0];
1965 const Real dyi = bscalar * dxinv[1];
1966 const Real dzi = bscalar * dxinv[2];
1970 for (
int k = lo.z; k <= hi.z; ++k) {
1971 for (
int j = lo.y; j <= hi.y; ++j) {
1973 for (
int i = lo.x; i <= hi.x; ++i) {
1974 Ax(i,j,k,0) += dxi*(fx(i+1,j ,k ,0) - fx(i,j,k,0))
1975 + dyi*(fy(i ,j+1,k ,0) - fy(i,j,k,0))
1976 + dzi*(fz(i ,j ,k+1,0) - fz(i,j,k,0));
1977 Ax(i,j,k,1) += dxi*(fx(i+1,j ,k ,1) - fx(i,j,k,1))
1978 + dyi*(fy(i ,j+1,k ,1) - fy(i,j,k,1))
1979 + dzi*(fz(i ,j ,k+1,1) - fz(i,j,k,1));
1980 Ax(i,j,k,2) += dxi*(fx(i+1,j ,k ,2) - fx(i,j,k,2))
1981 + dyi*(fy(i ,j+1,k ,2) - fy(i,j,k,2))
1982 + dzi*(fz(i ,j ,k+1,2) - fz(i,j,k,2));
1995 Real bscalar) noexcept
1997 const Real dxi = bscalar * dxinv[0];
1998 const Real dyi = bscalar * dxinv[1];
1999 const Real dzi = bscalar * dxinv[2];
2003 for (
int k = lo.z; k <= hi.z; ++k) {
2004 for (
int j = lo.y; j <= hi.y; ++j) {
2006 for (
int i = lo.x; i <= hi.x; ++i) {
2007 if (osm(i,j,k) == 0) {
2012 Ax(i,j,k,0) += dxi*(fx(i+1,j ,k ,0) - fx(i,j,k,0))
2013 + dyi*(fy(i ,j+1,k ,0) - fy(i,j,k,0))
2014 + dzi*(fz(i ,j ,k+1,0) - fz(i,j,k,0));
2015 Ax(i,j,k,1) += dxi*(fx(i+1,j ,k ,1) - fx(i,j,k,1))
2016 + dyi*(fy(i ,j+1,k ,1) - fy(i,j,k,1))
2017 + dzi*(fz(i ,j ,k+1,1) - fz(i,j,k,1));
2018 Ax(i,j,k,2) += dxi*(fx(i+1,j ,k ,2) - fx(i,j,k,2))
2019 + dyi*(fy(i ,j+1,k ,2) - fy(i,j,k,2))
2020 + dzi*(fz(i ,j ,k+1,2) - fz(i,j,k,2));
2029 Array4<Real const>
const& vel,
2030 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv) noexcept
2032 const Real dxi = dxinv[0];
2033 const Real dyi = dxinv[1];
2034 const Real dzi = dxinv[2];
2038 for (
int k = lo.z; k <= hi.z; ++k) {
2039 for (
int j = lo.y; j <= hi.y; ++j) {
2041 for (
int i = lo.x; i <= hi.x; ++i) {
2043 Real dudx = (vel(i,j,k,0) - vel(i-1,j,k,0))*dxi;
2044 Real dvdx = (vel(i,j,k,1) - vel(i-1,j,k,1))*dxi;
2045 Real dwdx = (vel(i,j,k,2) - vel(i-1,j,k,2))*dxi;
2072 Array4<Real const>
const& vel,
2073 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv) noexcept
2075 const Real dxi = dxinv[0];
2076 const Real dyi = dxinv[1];
2077 const Real dzi = dxinv[2];
2081 for (
int k = lo.z; k <= hi.z; ++k) {
2082 for (
int j = lo.y; j <= hi.y; ++j) {
2084 for (
int i = lo.x; i <= hi.x; ++i) {
2090 Real dudy = (vel(i,j,k,0) - vel(i,j-1,k,0))*dyi;
2091 Real dvdy = (vel(i,j,k,1) - vel(i,j-1,k,1))*dyi;
2092 Real dwdy = (vel(i,j,k,2) - vel(i,j-1,k,2))*dyi;
2118 const Real dxi = dxinv[0];
2119 const Real dyi = dxinv[1];
2120 const Real dzi = dxinv[2];
2124 for (
int k = lo.z; k <= hi.z; ++k) {
2125 for (
int j = lo.y; j <= hi.y; ++j) {
2127 for (
int i = lo.x; i <= hi.x; ++i) {
2137 Real dudz = (vel(i,j,k,0) - vel(i,j,k-1,0))*dzi;
2138 Real dvdz = (vel(i,j,k,1) - vel(i,j,k-1,1))*dzi;
2139 Real dwdz = (vel(i,j,k,2) - vel(i,j,k-1,2))*dzi;
2158 Array4<Real const>
const& vel,
2159 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv,
2160 Array4<Real const>
const& bvxlo,
2161 Array4<Real const>
const& bvxhi,
2164 0,AMREX_SPACEDIM>
const& bct,
2165 Dim3
const& dlo, Dim3
const& dhi) noexcept
2167 const Real dxi = dxinv[0];
2168 const Real dyi = dxinv[1];
2169 const Real dzi = dxinv[2];
2173 for (
int k = lo.z; k <= hi.z; ++k) {
2174 for (
int j = lo.y; j <= hi.y; ++j) {
2175 for (
int i = lo.x; i <= hi.x; ++i) {
2176 Real dudx = (vel(i,j,k,0) - vel(i-1,j,k,0))*dxi;
2177 Real dvdx = (vel(i,j,k,1) - vel(i-1,j,k,1))*dxi;
2178 Real dwdx = (vel(i,j,k,2) - vel(i-1,j,k,2))*dxi;
2179 Real dudy =
mltensor_dy_on_xface(i,j,k,0,vel,dyi,bvxlo,bvxhi,bct,dlo,dhi);
2180 Real dvdy =
mltensor_dy_on_xface(i,j,k,1,vel,dyi,bvxlo,bvxhi,bct,dlo,dhi);
2181 Real dwdy =
mltensor_dy_on_xface(i,j,k,2,vel,dyi,bvxlo,bvxhi,bct,dlo,dhi);
2182 Real dudz =
mltensor_dz_on_xface(i,j,k,0,vel,dzi,bvxlo,bvxhi,bct,dlo,dhi);
2183 Real dvdz =
mltensor_dz_on_xface(i,j,k,1,vel,dzi,bvxlo,bvxhi,bct,dlo,dhi);
2184 Real dwdz =
mltensor_dz_on_xface(i,j,k,2,vel,dzi,bvxlo,bvxhi,bct,dlo,dhi);
2202 Array4<Real const>
const& vel,
2203 GpuArray<Real,AMREX_SPACEDIM>
const& dxinv,
2204 Array4<Real const>
const& bvylo,
2205 Array4<Real const>
const& bvyhi,
2208 0,AMREX_SPACEDIM>
const& bct,
2209 Dim3
const& dlo, Dim3
const& dhi) noexcept
2211 const Real dxi = dxinv[0];
2212 const Real dyi = dxinv[1];
2213 const Real dzi = dxinv[2];
2217 for (
int k = lo.z; k <= hi.z; ++k) {
2218 for (
int j = lo.y; j <= hi.y; ++j) {
2219 for (
int i = lo.x; i <= hi.x; ++i) {
2220 Real dudx =
mltensor_dx_on_yface(i,j,k,0,vel,dxi,bvylo,bvyhi,bct,dlo,dhi);
2221 Real dvdx =
mltensor_dx_on_yface(i,j,k,1,vel,dxi,bvylo,bvyhi,bct,dlo,dhi);
2222 Real dwdx =
mltensor_dx_on_yface(i,j,k,2,vel,dxi,bvylo,bvyhi,bct,dlo,dhi);
2223 Real dudy = (vel(i,j,k,0) - vel(i,j-1,k,0))*dyi;
2224 Real dvdy = (vel(i,j,k,1) - vel(i,j-1,k,1))*dyi;
2225 Real dwdy = (vel(i,j,k,2) - vel(i,j-1,k,2))*dyi;
2226 Real dudz =
mltensor_dz_on_yface(i,j,k,0,vel,dzi,bvylo,bvyhi,bct,dlo,dhi);
2227 Real dvdz =
mltensor_dz_on_yface(i,j,k,1,vel,dzi,bvylo,bvyhi,bct,dlo,dhi);
2228 Real dwdz =
mltensor_dz_on_yface(i,j,k,2,vel,dzi,bvylo,bvyhi,bct,dlo,dhi);
2252 0,AMREX_SPACEDIM>
const& bct,
2253 Dim3 const& dlo,
Dim3 const& dhi) noexcept
2255 const Real dxi = dxinv[0];
2256 const Real dyi = dxinv[1];
2257 const Real dzi = dxinv[2];
2261 for (
int k = lo.z; k <= hi.z; ++k) {
2262 for (
int j = lo.y; j <= hi.y; ++j) {
2263 for (
int i = lo.x; i <= hi.x; ++i) {
2264 Real dudx =
mltensor_dx_on_zface(i,j,k,0,vel,dxi,bvzlo,bvzhi,bct,dlo,dhi);
2265 Real dvdx =
mltensor_dx_on_zface(i,j,k,1,vel,dxi,bvzlo,bvzhi,bct,dlo,dhi);
2266 Real dwdx =
mltensor_dx_on_zface(i,j,k,2,vel,dxi,bvzlo,bvzhi,bct,dlo,dhi);
2267 Real dudy =
mltensor_dy_on_zface(i,j,k,0,vel,dyi,bvzlo,bvzhi,bct,dlo,dhi);
2268 Real dvdy =
mltensor_dy_on_zface(i,j,k,1,vel,dyi,bvzlo,bvzhi,bct,dlo,dhi);
2269 Real dwdy =
mltensor_dy_on_zface(i,j,k,2,vel,dyi,bvzlo,bvzhi,bct,dlo,dhi);
2270 Real dudz = (vel(i,j,k,0) - vel(i,j,k-1,0))*dzi;
2271 Real dvdz = (vel(i,j,k,1) - vel(i,j,k-1,1))*dzi;
2272 Real dwdz = (vel(i,j,k,2) - vel(i,j,k-1,2))*dzi;
#define AMREX_PRAGMA_SIMD
Definition: AMReX_Extension.H:80
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_DEVICE
Definition: AMReX_GpuQualifiers.H:18
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
#define AMREX_LO_NEUMANN
Definition: AMReX_LO_BCTYPES.H:6
#define AMREX_LO_DIRICHLET
Definition: AMReX_LO_BCTYPES.H:5
@ not_covered
Definition: AMReX_BndryData.H:44
@ covered
Definition: AMReX_BndryData.H:44
Maintain an identifier for boundary condition types.
Definition: AMReX_BoundCond.H:20
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int zhi() noexcept
Int value of the z-hi-face.
Definition: AMReX_Orientation.H:118
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int yhi() noexcept
Int value of the y-hi-face.
Definition: AMReX_Orientation.H:110
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int ylo() noexcept
Int value of the y-lo-face.
Definition: AMReX_Orientation.H:106
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int xlo() noexcept
Int value of the x-lo-face.
Definition: AMReX_Orientation.H:98
@ low
Definition: AMReX_Orientation.H:34
@ high
Definition: AMReX_Orientation.H:34
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int xhi() noexcept
Int value of the x-hi-face.
Definition: AMReX_Orientation.H:102
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int zlo() noexcept
Int value of the z-lo-face.
Definition: AMReX_Orientation.H:114
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_cross_terms_fz(Box const &box, Array4< Real > const &fz, Array4< Real const > const &vel, Array4< Real const > const &etaz, Array4< Real const > const &kapz, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition: AMReX_MLTensor_3D_K.H:1606
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dx_on_yface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dxi) noexcept
Definition: AMReX_MLTensor_K.H:17
BoxND< AMREX_SPACEDIM > Box
Definition: AMReX_BaseFwd.H:27
void mltensor_fill_edges(Box const &vbox, Array4< Real > const &vel, Array4< int const > const &mxlo, Array4< int const > const &mylo, Array4< int const > const &mzlo, Array4< int const > const &mxhi, Array4< int const > const &myhi, Array4< int const > const &mzhi, Array4< Real const > const &bcvalxlo, Array4< Real const > const &bcvalylo, Array4< Real const > const &bcvalzlo, Array4< Real const > const &bcvalxhi, Array4< Real const > const &bcvalyhi, Array4< Real const > const &bcvalzhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, Dim3 const &dlo, Dim3 const &dhi) noexcept
Definition: AMReX_MLTensor_3D_K.H:1346
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xhi_ylo(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxhi, Array4< int const > const &mylo, Array4< Real const > const &bcvalxhi, Array4< Real const > const &bcvalylo, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xhi_domain, bool ylo_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:63
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_vel_grads_fy(Box const &box, Array4< Real > const &fy, Array4< Real const > const &vel, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition: AMReX_MLTensor_2D_K.H:389
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dx_on_zface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dxi) noexcept
Definition: AMReX_MLTensor_3D_K.H:1528
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xhi_yhi(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxhi, Array4< int const > const &myhi, Array4< Real const > const &bcvalxhi, Array4< Real const > const &bcvalyhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xhi_domain, bool yhi_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:169
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_cross_terms_os(Box const &box, Array4< Real > const &Ax, Array4< Real const > const &fx, Array4< Real const > const &fy, Array4< int const > const &osm, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, Real bscalar) noexcept
Definition: AMReX_MLTensor_2D_K.H:334
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xlo_yhi(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxlo, Array4< int const > const &myhi, Array4< Real const > const &bcvalxlo, Array4< Real const > const &bcvalyhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xlo_domain, bool yhi_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:116
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_ylo_zhi(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mylo, Array4< int const > const &mzhi, Array4< Real const > const &bcvalylo, Array4< Real const > const &bcvalzhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool ylo_domain, bool zhi_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:540
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xlo_ylo(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxlo, Array4< int const > const &mylo, Array4< Real const > const &bcvalxlo, Array4< Real const > const &bcvalylo, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xlo_domain, bool ylo_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:10
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xhi_zlo(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxhi, Array4< int const > const &mzlo, Array4< Real const > const &bcvalxhi, Array4< Real const > const &bcvalzlo, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xhi_domain, bool zlo_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:275
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 void mltensor_fill_edges_yhi_zlo(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &myhi, Array4< int const > const &mzlo, Array4< Real const > const &bcvalyhi, Array4< Real const > const &bcvalzlo, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool yhi_domain, bool zlo_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:487
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xlo_zlo(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxlo, Array4< int const > const &mzlo, Array4< Real const > const &bcvalxlo, Array4< Real const > const &bcvalzlo, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xlo_domain, bool zlo_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:222
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_cross_terms_fx(Box const &box, Array4< Real > const &fx, Array4< Real const > const &vel, Array4< Real const > const &etax, Array4< Real const > const &kapx, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition: AMReX_MLTensor_2D_K.H:187
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 mltensor_vel_grads_fx(Box const &box, Array4< Real > const &fx, Array4< Real const > const &vel, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition: AMReX_MLTensor_2D_K.H:363
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dz_on_xface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dzi) noexcept
Definition: AMReX_MLTensor_3D_K.H:1516
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_ylo_zlo(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mylo, Array4< int const > const &mzlo, Array4< Real const > const &bcvalylo, Array4< Real const > const &bcvalzlo, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool ylo_domain, bool zlo_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:434
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dy_on_zface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dyi) noexcept
Definition: AMReX_MLTensor_3D_K.H:1534
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_cross_terms(Box const &box, Array4< Real > const &Ax, Array4< Real const > const &fx, Array4< Real const > const &fy, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, Real bscalar) noexcept
Definition: AMReX_MLTensor_2D_K.H:311
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xlo_zhi(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxlo, Array4< int const > const &mzhi, Array4< Real const > const &bcvalxlo, Array4< Real const > const &bcvalzhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xlo_domain, bool zhi_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:328
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dz_on_yface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dzi) noexcept
Definition: AMReX_MLTensor_3D_K.H:1522
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 length(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:322
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mllinop_apply_bc_x(int side, Box const &box, int blen, Array4< T > const &phi, Array4< int const > const &mask, BoundCond bct, T bcl, Array4< T const > const &bcval, int maxorder, T dxinv, int inhomog, int icomp) noexcept
Definition: AMReX_MLLinOp_K.H:14
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_corners(int icorner, Box const &vbox, Array4< Real > const &vel, Array4< int const > const &mxlo, Array4< int const > const &mylo, Array4< int const > const &mxhi, Array4< int const > const &myhi, Array4< Real const > const &bcvalxlo, Array4< Real const > const &bcvalylo, Array4< Real const > const &bcvalxhi, Array4< Real const > const &bcvalyhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, Dim3 const &dlo, Dim3 const &dhi) noexcept
Definition: AMReX_MLTensor_2D_K.H:10
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_xhi_zhi(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &mxhi, Array4< int const > const &mzhi, Array4< Real const > const &bcvalxhi, Array4< Real const > const &bcvalzhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool xhi_domain, bool zhi_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:381
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mllinop_apply_bc_z(int side, Box const &box, int blen, Array4< T > const &phi, Array4< int const > const &mask, BoundCond bct, T bcl, Array4< T const > const &bcval, int maxorder, T dzinv, int inhomog, int icomp) noexcept
Definition: AMReX_MLLinOp_K.H:224
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_vel_grads_fz(Box const &box, Array4< Real > const &fz, Array4< Real const > const &vel, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition: AMReX_MLTensor_3D_K.H:2114
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dy_on_xface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dyi) noexcept
Definition: AMReX_MLTensor_K.H:11
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mllinop_apply_bc_y(int side, Box const &box, int blen, Array4< T > const &phi, Array4< int const > const &mask, BoundCond bct, T bcl, Array4< T const > const &bcval, int maxorder, T dyinv, int inhomog, int icomp) noexcept
Definition: AMReX_MLLinOp_K.H:119
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_fill_edges_yhi_zhi(int const i, int const j, int const k, Dim3 const &blen, Array4< Real > const &vel, Array4< int const > const &myhi, Array4< int const > const &mzhi, Array4< Real const > const &bcvalyhi, Array4< Real const > const &bcvalzhi, Array2D< BoundCond, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bct, Array2D< Real, 0, 2 *AMREX_SPACEDIM, 0, AMREX_SPACEDIM > const &bcl, int inhomog, int maxorder, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, bool yhi_domain, bool zhi_domain) noexcept
Definition: AMReX_MLTensor_3D_K.H:593
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mltensor_cross_terms_fy(Box const &box, Array4< Real > const &fy, Array4< Real const > const &vel, Array4< Real const > const &etay, Array4< Real const > const &kapy, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition: AMReX_MLTensor_2D_K.H:215
Definition: AMReX_Array.H:282
Definition: AMReX_Array4.H:61
Definition: AMReX_Dim3.H:12