1 #ifndef AMREX_HYDRO_EB_SLOPES_2D_K_H_
2 #define AMREX_HYDRO_EB_SLOPES_2D_K_H_
4 #include <AMReX_Config.H>
21 amrex::Real A[9][AMREX_SPACEDIM],
25 constexpr
int dim_a = 9;
26 amrex::Real du[dim_a];
29 for(
int jj(-1); jj<=1; jj++){
30 for(
int ii(-1); ii<=1; ii++){
31 if( flag(i,j,0).isConnected(ii,jj,0) &&
33 du[ll] = state(i+ii,j+jj,0,n) - state(i,j,0,n);
35 du[ll] = amrex::Real(0.0);
41 amrex::Real AtA[AMREX_SPACEDIM][AMREX_SPACEDIM];
42 amrex::Real Atb[AMREX_SPACEDIM];
44 for(
int jj(0); jj<AMREX_SPACEDIM; ++jj)
46 for(
int ii(0); ii<AMREX_SPACEDIM; ++ii){
47 AtA[jj][ii] = amrex::Real(0.0);
49 Atb[jj] = amrex::Real(0.0);
52 for(
int lc(0); lc<dim_a; ++lc)
54 AtA[0][0] += A[lc][0]* A[lc][0];
55 AtA[0][1] += A[lc][0]* A[lc][1];
56 AtA[1][1] += A[lc][1]* A[lc][1];
58 Atb[0] += A[lc][0]*du[lc];
59 Atb[1] += A[lc][1]*du[lc];
63 AtA[1][0] = AtA[0][1];
66 (AtA[0][0]*AtA[1][1])-
67 (AtA[0][1]*AtA[1][0]);
69 amrex::Real detAtA_x =
74 amrex::Real xs = detAtA_x / detAtA;
76 amrex::Real detAtA_y =
81 amrex::Real ys = detAtA_y / detAtA;
97 amrex::Real A[25][AMREX_SPACEDIM],
104 constexpr
int dim_a = 25;
106 amrex::Real AtA[AMREX_SPACEDIM][AMREX_SPACEDIM];
107 amrex::Real Atb[AMREX_SPACEDIM];
109 for(
int jj(0); jj<AMREX_SPACEDIM; ++jj)
111 for(
int ii(0); ii<AMREX_SPACEDIM; ++ii){
112 AtA[jj][ii] = amrex::Real(0.0);
114 Atb[jj] = amrex::Real(0.0);
118 for(
int jj(-ny); jj<=ny; jj++){
119 for(
int ii(-nx); ii<=nx; ii++){
120 int lc = (jj+ny)*(2*nx+1) + ii+nx;
121 if(!flag(i+ii,j+jj,0).isCovered() && !(ii==0 && jj==0)) {
122 du = state(i+ii,j+jj,0,n) - state(i,j,0,n);
123 Atb[0] += A[lc][0]*du;
124 Atb[1] += A[lc][1]*du;
130 for(
int lc(0); lc<dim_a; ++lc)
132 AtA[0][0] += A[lc][0]* A[lc][0];
133 AtA[0][1] += A[lc][0]* A[lc][1];
134 AtA[1][1] += A[lc][1]* A[lc][1];
138 AtA[1][0] = AtA[0][1];
141 (AtA[0][0]*AtA[1][1])-
142 (AtA[0][1]*AtA[1][0]);
144 amrex::Real detAtA_x =
145 (Atb[0] *AtA[1][1]) -
149 amrex::Real xs = detAtA_x / detAtA;
151 amrex::Real detAtA_y =
153 (Atb[0] * AtA[1][0]);
156 amrex::Real ys = detAtA_y / detAtA;
168 amrex::Real& xslope, amrex::Real& yslope,
171 int max_order) noexcept
180 if (max_order == 4 &&
181 vfrac(i,j,k) == 1. && vfrac(i-1,j,k) == 1. && vfrac(i-2,j,k) == 1. &&
182 vfrac(i+1,j,k) == 1. && vfrac(i+2,j,k) == 1.)
189 else if (max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i-1,j,k) == 1. && vfrac(i+1,j,k) == 1.)
193 }
else if (max_order == 0) {
199 if (max_order == 4 &&
200 vfrac(i,j,k) == 1. && vfrac(i,j-1,k) == 1. && vfrac(i,j-2,k) == 1. &&
201 vfrac(i,j+1,k) == 1. && vfrac(i,j+2,k) == 1.)
208 else if (max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i,j-1,k) == 1. && vfrac(i,j+1,k) == 1.)
212 }
else if (max_order == 0) {
235 int max_order) noexcept
237 constexpr
int dim_a = 9;
238 amrex::Real A[dim_a][AMREX_SPACEDIM];
243 for(
int jj(-1); jj<=1; jj++){
244 for(
int ii(-1); ii<=1; ii++){
246 if( flag(i,j,k).isConnected(ii,jj,kk) &&
247 ! (ii==0 && jj==0 && kk==0)) {
253 A[lc][0] = amrex::Real(ii) + ccent(i+ii,j+jj,k+kk,0) - ccent(i,j,k,0);
254 A[lc][1] = amrex::Real(jj) + ccent(i+ii,j+jj,k+kk,1) - ccent(i,j,k,1);
258 A[lc][0] = amrex::Real(0.0);
259 A[lc][1] = amrex::Real(0.0);
268 amrex::Real xslope = eb_slopes[0];
269 amrex::Real yslope = eb_slopes[1];
274 return {xslope,yslope};
295 int max_order) noexcept
300 constexpr
int dim_a = 25;
301 amrex::Real A[dim_a][AMREX_SPACEDIM];
307 for(
int jj(-2); jj<=2; jj++){
308 for(
int ii(-2); ii<=2; ii++){
309 A[lc][0] = amrex::Real(0.0);
310 A[lc][1] = amrex::Real(0.0);
316 for(
int jj(-ny); jj<=ny; jj++){
317 for(
int ii(-nx); ii<=nx; ii++){
319 if(!flag(i+ii,j+jj,k+kk).isCovered() && !(ii==0 && jj==0 && kk==0))
321 A[lc][0] = amrex::Real(ii) + ccent(i+ii,j+jj,k+kk,0) - ccent(i,j,k,0);
322 A[lc][1] = amrex::Real(jj) + ccent(i+ii,j+jj,k+kk,1) - ccent(i,j,k,1);
331 amrex::Real xslope = eb_slopes[0];
332 amrex::Real yslope = eb_slopes[1];
337 return {xslope,yslope};
347 amrex::Real& xslope, amrex::Real& yslope,
350 bool edlo_x,
bool edlo_y,
bool edhi_x,
bool edhi_y,
351 int domlo_x,
int domlo_y,
int domhi_x,
int domhi_y,
352 int max_order) noexcept
361 if (max_order == 4 &&
362 vfrac(i,j,k) == 1. && vfrac(i-1,j,k) == 1. && vfrac(i-2,j,k) == 1. &&
363 vfrac(i+1,j,k) == 1. && vfrac(i+2,j,k) == 1.)
370 else if (max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i-1,j,k) == 1. && vfrac(i+1,j,k) == 1.)
374 }
else if (max_order == 0) {
380 if (max_order == 4 &&
381 vfrac(i,j,k) == 1. && vfrac(i,j-1,k) == 1. && vfrac(i,j-2,k) == 1. &&
382 vfrac(i,j+1,k) == 1. && vfrac(i,j+2,k) == 1.)
389 else if (max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i,j-1,k) == 1. && vfrac(i,j+1,k) == 1.)
393 }
else if (max_order == 0) {
415 bool edlo_x,
bool edlo_y,
bool edhi_x,
bool edhi_y,
416 int domlo_x,
int domlo_y,
int domhi_x,
int domhi_y,
417 int max_order) noexcept
419 constexpr
int dim_a = 9;
421 auto xslope = amrex::Real(0.0);
422 auto yslope = amrex::Real(0.0);
425 bool needs_bdry_stencil = (edlo_x && i <= domlo_x) || (edhi_x && i >= domhi_x) ||
426 (edlo_y && j <= domlo_y) || (edhi_y && j >= domhi_y);
431 if (!needs_bdry_stencil)
441 amrex::Real A[dim_a][AMREX_SPACEDIM];
446 for(
int jj(-1); jj<=1; jj++) {
447 for(
int ii(-1); ii<=1; ii++)
449 if( flag(i,j,k).isConnected(ii,jj,kk) &&
450 ! (ii==0 && jj==0 && kk==0))
452 bool ilo_test = ( edlo_x && (i == domlo_x) && ii == -1);
453 bool ihi_test = ( edhi_x && (i == domhi_x) && ii == 1);
455 bool jlo_test = ( edlo_y && (j == domlo_y) && jj == -1);
456 bool jhi_test = ( edhi_y && (j == domhi_y) && jj == 1);
458 bool klo_test =
false;
459 bool khi_test =
false;
462 A[lc][0] = amrex::Real(ii) + ccent(i+ii,j+jj,k+kk,0);
463 A[lc][1] = amrex::Real(jj) + ccent(i+ii,j+jj,k+kk,1);
467 if (!jlo_test && !jhi_test && !klo_test && !khi_test)
469 A[lc][1] = amrex::Real(jj) + fcx(i ,j+jj,k+kk,0);
471 A[lc][0] = amrex::Real(-0.5) ;
472 }
else if (ihi_test) {
474 if (!jlo_test && !jhi_test && !klo_test && !khi_test)
476 A[lc][1] = amrex::Real(jj) + fcx(i+ii,j+jj,k+kk,0);
478 A[lc][0] = amrex::Real(0.5) ;
484 if (!ilo_test && !ihi_test && !klo_test && !khi_test)
486 A[lc][0] = amrex::Real(ii) + fcy(i+ii,j ,k+kk,0);
488 A[lc][1] = amrex::Real(-0.5) ;
490 }
else if (jhi_test) {
492 if (!ilo_test && !ihi_test && !klo_test && !khi_test)
494 A[lc][0] = amrex::Real(ii) + fcy(i+ii,j+jj,k+kk,0);
496 A[lc][1] = amrex::Real(0.5) ;
499 A[lc][0] -= ccent(i,j,k,0);
500 A[lc][1] -= ccent(i,j,k,1);
503 A[lc][0] = amrex::Real(0.0);
504 A[lc][1] = amrex::Real(0.0);
515 edlo_x,edlo_y,edhi_x,edhi_y,
516 domlo_x,domlo_y,domhi_x,domhi_y,max_order);
520 if ( (edlo_x && i < domlo_x) || (edhi_x && i > domhi_x) ||
521 (edlo_y && j < domlo_y) || (edhi_y && j > domhi_y) )
526 return {xslope,yslope};
547 bool edlo_x,
bool edlo_y,
bool edhi_x,
bool edhi_y,
548 int domlo_x,
int domlo_y,
int domhi_x,
int domhi_y,
549 int max_order) noexcept
551 constexpr
int dim_a = 25;
553 auto xslope = amrex::Real(0.0);
554 auto yslope = amrex::Real(0.0);
557 bool needs_bdry_stencil = (edlo_x && i <= domlo_x) || (edhi_x && i >= domhi_x) ||
558 (edlo_y && j <= domlo_y) || (edhi_y && j >= domhi_y);
563 if (!needs_bdry_stencil)
568 const auto& slopes =
amrex_calc_slopes_eb_grown (i,j,k,n,nx,ny,state,ccent,vfrac,flag,max_order);
573 amrex::Real A[dim_a][AMREX_SPACEDIM];
578 for(
int jj(-ny); jj<=ny; jj++) {
579 for(
int ii(-nx); ii<=nx; ii++)
581 if ( !flag(i+ii,j+jj,k).isCovered() && !(ii==0 && jj==0 && kk==0) )
583 bool ilo_test = ( edlo_x && (i == domlo_x) && ii == -1);
584 bool ihi_test = ( edhi_x && (i == domhi_x) && ii == 1);
586 bool jlo_test = ( edlo_y && (j == domlo_y) && jj == -1);
587 bool jhi_test = ( edhi_y && (j == domhi_y) && jj == 1);
589 bool klo_test =
false;
590 bool khi_test =
false;
593 A[lc][0] = amrex::Real(ii) + ccent(i+ii,j+jj,k+kk,0);
594 A[lc][1] = amrex::Real(jj) + ccent(i+ii,j+jj,k+kk,1);
598 if (!jlo_test && !jhi_test && !klo_test && !khi_test)
600 A[lc][1] = amrex::Real(jj) + fcx(i ,j+jj,k+kk,0);
602 A[lc][0] = amrex::Real(-0.5) ;
603 }
else if (ihi_test) {
605 if (!jlo_test && !jhi_test && !klo_test && !khi_test)
607 A[lc][1] = amrex::Real(jj) + fcx(i+ii,j+jj,k+kk,0);
609 A[lc][0] = amrex::Real(0.5) ;
615 if (!ilo_test && !ihi_test && !klo_test && !khi_test)
617 A[lc][0] = amrex::Real(ii) + fcy(i+ii,j ,k+kk,0);
619 A[lc][1] = amrex::Real(-0.5) ;
621 }
else if (jhi_test) {
623 if (!ilo_test && !ihi_test && !klo_test && !khi_test)
625 A[lc][0] = amrex::Real(ii) + fcy(i+ii,j+jj,k+kk,0);
627 A[lc][1] = amrex::Real(0.5) ;
630 A[lc][0] -= ccent(i,j,k,0);
631 A[lc][1] -= ccent(i,j,k,1);
634 A[lc][0] = amrex::Real(0.0);
635 A[lc][1] = amrex::Real(0.0);
646 edlo_x,edlo_y,edhi_x,edhi_y,
647 domlo_x,domlo_y,domhi_x,domhi_y,max_order);
651 if ( (edlo_x && i < domlo_x) || (edhi_x && i > domhi_x) ||
652 (edlo_y && j < domlo_y) || (edhi_y && j > domhi_y) )
657 return {xslope,yslope};
664 amrex::Real q_min, amrex::Real state, amrex::Real alpha) noexcept
666 using namespace amrex::literals;
668 auto alpha_temp = 0.0_rt;
669 auto small = 1.0e-13_rt;
671 if ((q_hat-state) > small) {
672 alpha_temp =
amrex::min(1.0_rt,(q_max-state)/(q_hat-state));
673 }
else if ((q_hat-state) < -small) {
674 alpha_temp =
amrex::min(1.0_rt,(q_min-state)/(q_hat-state));
691 amrex::Real alpha = 2.0;
698 for(
int jj(-1); jj<=1; jj++){
699 for(
int ii(-1); ii<=1; ii++){
700 if( flag(i,j,k).isConnected(ii,jj,kk) && !(ii==0 && jj==0))
702 if ((ii==-1 || ii==1) && jj==0) { cuts_x++; }
703 if ((jj==-1 || jj==1) && ii==0) { cuts_y++; }
708 amrex::Real xc = ccent(i,j,k,0);
709 amrex::Real yc = ccent(i,j,k,1);
712 if(flag(i,j,k).isConnected(0,1,0)) {
713 amrex::Real xf = fcy(i,j+1,k,0);
715 amrex::Real delta_x = xf - xc;
716 amrex::Real delta_y = amrex::Real(0.5) - yc;
718 amrex::Real q_hat = state(i,j,k,n) + delta_x * slopes[0] + delta_y * slopes[1];
720 amrex::Real q_min = state(i,j,k,n);
721 amrex::Real q_max = state(i,j,k,n);
724 for(
int jj(0); jj<=1; jj++){
725 for(
int ii(-1); ii<=1; ii++){
726 if ( flag(i,j,k).isConnected(ii,jj,kk) && !(ii==0 && jj==0) ) {
727 if (state(i+ii,j+jj,k+kk,n) > q_max) { q_max = state(i+ii,j+jj,k+kk,n); }
728 if (state(i+ii,j+jj,k+kk,n) < q_min) { q_min = state(i+ii,j+jj,k+kk,n); }
735 if (flag(i,j,k).isConnected(0,-1,0)){
736 amrex::Real xf = fcy(i,j,k,0);
738 amrex::Real delta_x = xf - xc;
739 amrex::Real delta_y = amrex::Real(0.5) + yc;
741 amrex::Real q_hat = state(i,j,k,n) + delta_x * slopes[0] - delta_y * slopes[1];
743 amrex::Real q_min = state(i,j,k,n);
744 amrex::Real q_max = state(i,j,k,n);
747 for(
int jj(-1); jj<=0; jj++){
748 for(
int ii(-1); ii<=1; ii++){
749 if ( flag(i,j,k).isConnected(ii,jj,kk) && !(ii==0 && jj==0) ) {
750 if (state(i+ii,j+jj,k+kk,n) > q_max) { q_max = state(i+ii,j+jj,k+kk,n); }
751 if (state(i+ii,j+jj,k+kk,n) < q_min) { q_min = state(i+ii,j+jj,k+kk,n); }
758 if(flag(i,j,k).isConnected(1,0,0)) {
759 amrex::Real yf = fcx(i+1,j,k,0);
761 amrex::Real delta_x = amrex::Real(0.5) - xc;
762 amrex::Real delta_y = yf - yc;
764 amrex::Real q_hat = state(i,j,k,n) + delta_x * slopes[0] + delta_y * slopes[1];
766 amrex::Real q_min = state(i,j,k,n);
767 amrex::Real q_max = state(i,j,k,n);
769 for(
int jj(-1); jj<=1; jj++){
770 for(
int ii(0); ii<=1; ii++){
771 if ( flag(i,j,k).isConnected(ii,jj,kk) && !(ii==0 && jj==0) ) {
772 if (state(i+ii,j+jj,k+kk,n) > q_max) { q_max = state(i+ii,j+jj,k+kk,n); }
773 if (state(i+ii,j+jj,k+kk,n) < q_min) { q_min = state(i+ii,j+jj,k+kk,n); }
780 if(flag(i,j,k).isConnected(-1,0,0)) {
781 amrex::Real yf = fcx(i,j,k,0);
783 amrex::Real delta_x = amrex::Real(0.5) + xc;
784 amrex::Real delta_y = yf - yc;
786 amrex::Real q_hat = state(i,j,k,n) - delta_x * slopes[0] + delta_y * slopes[1];
788 amrex::Real q_min = state(i,j,k,n);
789 amrex::Real q_max = state(i,j,k,n);
791 for(
int jj(-1); jj<=1; jj++){
792 for(
int ii(-1); ii<=0; ii++){
793 if( flag(i,j,k).isConnected(ii,jj,kk) && !(ii==0 && jj==0)) {
794 if (state(i+ii,j+jj,k+kk,n) > q_max) { q_max = state(i+ii,j+jj,k+kk,n); }
795 if (state(i+ii,j+jj,k+kk,n) < q_min) { q_min = state(i+ii,j+jj,k+kk,n); }
802 amrex::Real xalpha = alpha;
803 amrex::Real yalpha = alpha;
806 if (cuts_x<2) { xalpha = 0; }
807 if (cuts_y<2) { yalpha = 0; }
809 return {xalpha,yalpha};
823 int max_order) noexcept
835 if ( max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i-1,j,k) == 1. && vfrac(i+1,j,k) == 1.) {
839 if ( max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i,j-1,k) == 1. && vfrac(i,j+1,k) == 1.) {
843 return {alpha_lim[0]*slopes[0],alpha_lim[1]*slopes[1]};
857 bool edlo_x,
bool edlo_y,
bool edhi_x,
bool edhi_y,
858 int domlo_x,
int domlo_y,
int domhi_x,
int domhi_y,
859 int max_order) noexcept
865 slopes =
amrex_calc_slopes_extdir_eb(i,j,k,n,state,ccent,vfrac,fcx,fcy,flag,
866 edlo_x,edlo_y,edhi_x,edhi_y,
867 domlo_x,domlo_y,domhi_x,domhi_y,max_order);
872 if ( max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i-1,j,k) == 1. && vfrac(i+1,j,k) == 1.) {
876 if ( max_order > 0 && vfrac(i,j,k) == 1. && vfrac(i,j-1,k) == 1. && vfrac(i,j+1,k) == 1.) {
880 return {alpha_lim[0]*slopes[0],alpha_lim[1]*slopes[1]};
#define AMREX_ASSERT(EX)
Definition: AMReX_BLassert.H:38
#define AMREX_ALWAYS_ASSERT(EX)
Definition: AMReX_BLassert.H:50
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_slopes_eb_given_A_grown(int i, int j, int, int n, int nx, int ny, amrex::Real A[25][AMREX_SPACEDIM], amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::EBCellFlag const > const &flag) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:96
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_lim_slopes_eb(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &ccent, amrex::Array4< amrex::Real const > const &vfrac, amrex::Array4< amrex::Real const > const &fcx, amrex::Array4< amrex::Real const > const &fcy, amrex::Array4< amrex::EBCellFlag const > const &flag, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:816
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real amrex_calc_alpha_stencil(amrex::Real q_hat, amrex::Real q_max, amrex::Real q_min, amrex::Real state, amrex::Real alpha) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:663
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_alpha_limiter(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::EBCellFlag const > const &flag, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &slopes, amrex::Array4< amrex::Real const > const &fcx, amrex::Array4< amrex::Real const > const &fcy, amrex::Array4< amrex::Real const > const &ccent) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:683
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_slopes_extdir_eb(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &ccent, amrex::Array4< amrex::Real const > const &vfrac, amrex::Array4< amrex::Real const > const &fcx, amrex::Array4< amrex::Real const > const &fcy, amrex::Array4< amrex::EBCellFlag const > const &flag, bool edlo_x, bool edlo_y, bool edhi_x, bool edhi_y, int domlo_x, int domlo_y, int domhi_x, int domhi_y, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:408
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_slopes_eb_given_A(int i, int j, int, int n, amrex::Real A[9][AMREX_SPACEDIM], amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::EBCellFlag const > const &flag) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:20
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void amrex_overwrite_with_regular_slopes(int i, int j, int k, int n, amrex::Real &xslope, amrex::Real &yslope, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &vfrac, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:167
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_lim_slopes_extdir_eb(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &ccent, amrex::Array4< amrex::Real const > const &vfrac, amrex::Array4< amrex::Real const > const &fcx, amrex::Array4< amrex::Real const > const &fcy, amrex::Array4< amrex::EBCellFlag const > const &flag, bool edlo_x, bool edlo_y, bool edhi_x, bool edhi_y, int domlo_x, int domlo_y, int domhi_x, int domhi_y, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:850
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_slopes_extdir_eb_grown(int i, int j, int k, int n, int nx, int ny, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &ccent, amrex::Array4< amrex::Real const > const &vfrac, amrex::Array4< amrex::Real const > const &fcx, amrex::Array4< amrex::Real const > const &fcy, amrex::Array4< amrex::EBCellFlag const > const &flag, bool edlo_x, bool edlo_y, bool edhi_x, bool edhi_y, int domlo_x, int domlo_y, int domhi_x, int domhi_y, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:540
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_slopes_eb_grown(int i, int j, int k, int n, int nx, int ny, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &ccent, amrex::Array4< amrex::Real const > const &vfrac, amrex::Array4< amrex::EBCellFlag const > const &flag, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:290
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > amrex_calc_slopes_eb(int i, int j, int k, int n, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &ccent, amrex::Array4< amrex::Real const > const &vfrac, amrex::Array4< amrex::EBCellFlag const > const &flag, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:230
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void amrex_overwrite_with_regular_slopes_extdir(int i, int j, int k, int n, amrex::Real &xslope, amrex::Real &yslope, amrex::Array4< amrex::Real const > const &state, amrex::Array4< amrex::Real const > const &vfrac, bool edlo_x, bool edlo_y, bool edhi_x, bool edhi_y, int domlo_x, int domlo_y, int domhi_x, int domhi_y, int max_order) noexcept
Definition: AMReX_EB_Slopes_2D_K.H:346
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_DEVICE
Definition: AMReX_GpuQualifiers.H:18
AMREX_GPU_DEVICE AMREX_FORCE_INLINE Real amrex_calc_yslope_extdir(int i, int j, int k, int n, int order, amrex::Array4< Real const > const &q, bool edlo, bool edhi, int domlo, int domhi) noexcept
Definition: AMReX_Slopes_K.H:200
AMREX_GPU_DEVICE AMREX_FORCE_INLINE Real amrex_calc_yslope(int i, int j, int k, int n, int order, amrex::Array4< Real const > const &q) noexcept
Definition: AMReX_Slopes_K.H:151
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_DEVICE AMREX_FORCE_INLINE Real amrex_calc_xslope_extdir(int i, int j, int k, int n, int order, amrex::Array4< Real const > const &q, bool edlo, bool edhi, int domlo, int domhi) noexcept
Definition: AMReX_Slopes_K.H:60
AMREX_GPU_DEVICE AMREX_FORCE_INLINE Real amrex_calc_xslope(int i, int j, int k, int n, int order, amrex::Array4< Real const > const &q) noexcept
Definition: AMReX_Slopes_K.H:10
Definition: AMReX_Array4.H:61
Definition: AMReX_Array.H:34