1#ifndef AMREX_ML_ABECLAPLACIAN_H_
2#define AMREX_ML_ABECLAPLACIAN_H_
3#include <AMReX_Config.H>
6#include <AMReX_MLABecLap_K.H>
25 using FAB =
typename MF::fab_type;
26 using RT =
typename MF::value_type;
98 template <
typename T1,
typename T2>
99 requires (std::is_convertible_v<T1, typename MF::value_type> && std::is_convertible_v<T2, typename MF::value_type>)
111 template <FabArrayType AMF>
112 requires (std::is_convertible_v<typename AMF::value_type, typename MF::value_type>)
124 template <
typename T>
125 requires (std::is_convertible_v<T, typename MF::value_type>)
137 template <FabArrayType AMF>
138 requires (std::is_convertible_v<typename AMF::value_type, typename MF::value_type>)
150 template <
typename T>
151 requires (std::is_convertible_v<T, typename MF::value_type>)
163 template <
typename T>
164 requires (std::is_convertible_v<T, typename MF::value_type>)
167 [[nodiscard]]
int getNComp ()
const override {
return m_ncomp; }
190 void Fapply (
int amrlev,
int mglev, MF& out,
const MF& in)
const override;
196 void Fsmooth (
int amrlev,
int mglev, MF& sol,
const MF& rhs,
int redblack)
const override;
205 int face_only=0)
const override;
208 void normalize (
int amrlev,
int mglev, MF& mf)
const override;
215 [[nodiscard]] MF
const*
getACoeffs (
int amrlev,
int mglev)
const final
222 [[nodiscard]] std::unique_ptr<MLLinOpT<MF>>
makeNLinOp (
int )
const final;
259 FAB const& sol,
int face_only,
int ncomp);
278 bool m_needs_update =
true;
285 void define_ab_coeffs ();
287 void update_singular_flags ();
292 void setSPScale (
RT a_scalar);
295template <
typename MF>
303 define(a_geom, a_grids, a_dmap, a_info, a_factory, a_ncomp);
306template <
typename MF>
315 define(a_geom, a_grids, a_dmap, a_overset_mask, a_info, a_factory, a_ncomp);
320template <
typename MF>
330 this->m_ncomp = a_ncomp;
334 this->
makeSPLinOp(a_info, [&] (
auto const& sp_info) {
335 return std::make_unique<MLABecLaplacianT<fMultiFab>>
341template <
typename MF>
351 BL_PROFILE(
"MLABecLaplacian::define(overset)");
352 this->m_ncomp = a_ncomp;
356 this->
makeSPLinOp(a_info, [&] (
auto const& sp_info) {
357 return std::make_unique<MLABecLaplacianT<fMultiFab>>
358 (this->
spGeom(a_geom), a_grids, a_dmap, a_overset_mask, sp_info,
364template <
typename MF>
366MLABecLaplacianT<MF>::define_ab_coeffs ()
368 m_a_coeffs.resize(this->m_num_amr_levels);
369 m_b_coeffs.resize(this->m_num_amr_levels);
370 m_a_metric_applied.assign(this->m_num_amr_levels, 0);
371 m_b_metric_applied.assign(this->m_num_amr_levels, 0);
372 for (
int amrlev = 0; amrlev < this->m_num_amr_levels; ++amrlev)
374 m_a_coeffs[amrlev].resize(this->m_num_mg_levels[amrlev]);
375 m_b_coeffs[amrlev].resize(this->m_num_mg_levels[amrlev]);
376 for (
int mglev = 0; mglev < this->m_num_mg_levels[amrlev]; ++mglev)
378 m_a_coeffs[amrlev][mglev].define
379 (this->m_grids[amrlev][mglev], this->m_dmap[amrlev][mglev],
380 1, 0,
MFInfo(), *(this->m_factory[amrlev][mglev]));
381 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim)
385 m_b_coeffs[amrlev][mglev][idim].define
386 (ba, this->m_dmap[amrlev][mglev], m_ncomp, 0,
MFInfo(),
387 *(this->m_factory[amrlev][mglev]));
393template <
typename MF>
394template <
typename T1,
typename T2>
395requires (std::is_convertible_v<T1, typename MF::value_type> && std::is_convertible_v<T2, typename MF::value_type>)
402 for (
int amrlev = 0; amrlev < this->m_num_amr_levels; ++amrlev) {
407 m_needs_update =
true;
412template <
typename MF>
413template <FabArrayType AMF>
414requires (std::is_convertible_v<typename AMF::value_type, typename MF::value_type>)
419 "MLABecLaplacian::setACoeffs: alpha is supposed to be single component.");
421 m_a_metric_applied[amrlev] = 0;
422 m_needs_update =
true;
427template <
typename MF>
429requires (std::is_convertible_v<T, typename MF::value_type>)
434 m_a_metric_applied[amrlev] = 0;
435 m_needs_update =
true;
441template <
typename MF>
442template <FabArrayType AMF>
443requires (std::is_convertible_v<typename AMF::value_type, typename MF::value_type>)
450 if (beta[0]->
nComp() == ncomp) {
451 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
452 for (
int icomp = 0; icomp < ncomp; ++icomp) {
457 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
458 for (
int icomp = 0; icomp < ncomp; ++icomp) {
463 m_b_metric_applied[amrlev] = 0;
464 m_needs_update =
true;
468template <
typename MF>
470requires (std::is_convertible_v<T, typename MF::value_type>)
475 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
478 m_b_metric_applied[amrlev] = 0;
479 m_needs_update =
true;
483template <
typename MF>
485requires (std::is_convertible_v<T, typename MF::value_type>)
491 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
492 for (
int icomp = 0; icomp < ncomp; ++icomp) {
493 m_b_coeffs[amrlev][0][idim].setVal(
RT(beta[icomp]), icomp, 1, 0);
496 m_b_metric_applied[amrlev] = 0;
497 m_needs_update =
true;
501template <
typename MF>
511#if (AMREX_SPACEDIM != 3)
519 update_singular_flags();
521 setSPScale(a_scalar);
523 m_needs_update =
false;
526template <
typename MF>
530 BL_PROFILE(
"MLABecLaplacian::prepareForSolve()");
536#if (AMREX_SPACEDIM != 3)
544 update_singular_flags();
546 setSPScale(a_scalar);
548 m_needs_update =
false;
551template <
typename MF>
553MLABecLaplacianT<MF>::setSPScale (RT a_scalar)
555 this->
template spForward<MLABecLaplacianT>([&] (
auto* sp) {
559 for (
int alev = 0; alev < this->m_num_amr_levels; ++alev) {
560 RT
const da = std::abs(m_a_scalar) * m_a_coeffs[alev][0].norminf(0, 1,
IntVect(0),
true);
561 for (
int n = 0; n < m_ncomp; ++n) {
563 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
564 if (idim == this->info.hidden_direction) {
continue; }
565 RT
const dxinv = RT(1.0) / this->m_geom[alev][0].CellSize(idim);
566 d += std::abs(m_b_scalar) * m_b_coeffs[alev][0][idim].norminf(n, 1,
IntVect(0),
true)
567 * RT(2.0)*dxinv*dxinv;
569 diag[n] = std::max(diag[n], d);
575 RT
const sigma = this->spScaleFor(this->spDiagForScale(diag));
576 auto const lambda =
static_cast<RT
>(this->m_sp_length_scale);
577 this->m_sp_scale = sigma *
static_cast<RT
>(std::pow(lambda, this->spMetricExponent()));
578 sp->setScalars(sigma * a_scalar, sigma * lambda*lambda * m_b_scalar);
582template <
typename MF>
586#if (AMREX_SPACEDIM != 3)
587 for (
int alev = 0; alev < this->m_num_amr_levels; ++alev)
590 if (!m_a_metric_applied[alev]) {
592 m_a_metric_applied[alev] = 1;
594 if (!m_b_metric_applied[alev]) {
595 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim)
599 m_b_metric_applied[alev] = 1;
634template <
typename LP>
635void applyRobinBCTermsCoeffs (LP& linop)
637 using RT =
typename LP::RT;
639 const int ncomp = linop.getNComp();
640 bool reset_alpha =
false;
641 if (linop.m_a_scalar == RT(0.0)) {
642 linop.m_a_scalar = RT(1.0);
645 const RT bovera = linop.m_b_scalar/linop.m_a_scalar;
649 "To reuse solver With Robin BC, one must re-call setScalars (and setACoeffs if the scalar is not zero)");
652 linop.m_scalars_set =
false;
653 linop.m_acoef_set =
false;
655 for (
int amrlev = 0; amrlev < linop.NAMRLevels(); ++amrlev) {
657 const Box& domain = linop.Geom(amrlev,mglev).Domain();
658 const RT dxi =
static_cast<RT
>(linop.Geom(amrlev,mglev).InvCellSize(0));
659 const RT dyi =
static_cast<RT
>((AMREX_SPACEDIM >= 2) ? linop.Geom(amrlev,mglev).InvCellSize(1) :
Real(1.0));
660 const RT dzi =
static_cast<RT
>((AMREX_SPACEDIM == 3) ? linop.Geom(amrlev,mglev).InvCellSize(2) :
Real(1.0));
663 linop.m_a_coeffs[amrlev][mglev].setVal(RT(0.0));
670#pragma omp parallel if (Gpu::notInLaunchRegion())
672 for (
MFIter mfi(linop.m_a_coeffs[amrlev][mglev], mfi_info); mfi.
isValid(); ++mfi)
674 const Box& vbx = mfi.validbox();
675 auto const& afab = linop.m_a_coeffs[amrlev][mglev].array(mfi);
676 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
677 auto const& bfab = linop.m_b_coeffs[amrlev][mglev][idim].const_array(mfi);
680 bool outside_domain_lo = !(domain.contains(blo));
681 bool outside_domain_hi = !(domain.contains(bhi));
682 if ((!outside_domain_lo) && (!outside_domain_hi)) {
continue; }
683 for (
int icomp = 0; icomp < ncomp; ++icomp) {
684 auto const& rbc = (*(linop.m_robin_bcval[amrlev]))[mfi].const_array(icomp*3);
688 RT fac = bovera*dxi*dxi;
691 RT B = (rbc(i,j,k,1)*dxi - rbc(i,j,k,0)*RT(0.5))
692 / (rbc(i,j,k,1)*dxi + rbc(i,j,k,0)*RT(0.5));
693 afab(i+1,j,k,icomp) += fac*bfab(i+1,j,k,icomp)*(RT(1.0)-B);
695 }
else if (idim == 1) {
696 RT fac = bovera*dyi*dyi;
699 RT B = (rbc(i,j,k,1)*dyi - rbc(i,j,k,0)*RT(0.5))
700 / (rbc(i,j,k,1)*dyi + rbc(i,j,k,0)*RT(0.5));
701 afab(i,j+1,k,icomp) += fac*bfab(i,j+1,k,icomp)*(RT(1.0)-B);
704 RT fac = bovera*dzi*dzi;
707 RT B = (rbc(i,j,k,1)*dzi - rbc(i,j,k,0)*RT(0.5))
708 / (rbc(i,j,k,1)*dzi + rbc(i,j,k,0)*RT(0.5));
709 afab(i,j,k+1,icomp) += fac*bfab(i,j,k+1,icomp)*(RT(1.0)-B);
716 RT fac = bovera*dxi*dxi;
719 RT B = (rbc(i,j,k,1)*dxi - rbc(i,j,k,0)*RT(0.5))
720 / (rbc(i,j,k,1)*dxi + rbc(i,j,k,0)*RT(0.5));
721 afab(i-1,j,k,icomp) += fac*bfab(i,j,k,icomp)*(RT(1.0)-B);
723 }
else if (idim == 1) {
724 RT fac = bovera*dyi*dyi;
727 RT B = (rbc(i,j,k,1)*dyi - rbc(i,j,k,0)*RT(0.5))
728 / (rbc(i,j,k,1)*dyi + rbc(i,j,k,0)*RT(0.5));
729 afab(i,j-1,k,icomp) += fac*bfab(i,j,k,icomp)*(RT(1.0)-B);
732 RT fac = bovera*dzi*dzi;
735 RT B = (rbc(i,j,k,1)*dzi - rbc(i,j,k,0)*RT(0.5))
736 / (rbc(i,j,k,1)*dzi + rbc(i,j,k,0)*RT(0.5));
737 afab(i,j,k-1,icomp) += fac*bfab(i,j,k,icomp)*(RT(1.0)-B);
749template <
typename MF>
754 detail::applyRobinBCTermsCoeffs(*
this);
758template <
typename MF>
762 BL_PROFILE(
"MLABecLaplacian::averageDownCoeffs()");
764 for (
int amrlev = this->m_num_amr_levels-1; amrlev > 0; --amrlev)
776template <
typename MF>
781 int nmglevs = a.
size();
782 for (
int mglev = 1; mglev < nmglevs; ++mglev)
789 a[mglev].setVal(
RT(0.0));
806 for (
int mglev = 1; mglev < nmglevs; ++mglev)
809 const RT fac =
static_cast<RT>(1 << mglev);
810 const RT osfac =
RT(2.0)*fac/(fac+
RT(1.0));
813#pragma omp parallel if (Gpu::notInLaunchRegion())
818 Box const& ybx = mfi.nodaltilebox(1);,
819 Box const& zbx = mfi.nodaltilebox(2));
821 auto const& by = b[mglev][1].array(mfi);,
822 auto const& bz = b[mglev][2].array(mfi));
823 auto const& osm = this->
m_overset_mask[amrlev][mglev]->const_array(mfi);
824#if defined(AMREX_USE_CUDA) && defined(_WIN32)
828 overset_rescale_bcoef_x(t_xbx, bx, osm, ncomp, osfac);
830#if (AMREX_SPACEDIM >= 2)
834 overset_rescale_bcoef_y(t_ybx, by, osm, ncomp, osfac);
837#if (AMREX_SPACEDIM == 3)
841 overset_rescale_bcoef_z(t_zbx, bz, osm, ncomp, osfac);
848 overset_rescale_bcoef_x(t_xbx, bx, osm, ncomp, osfac);
852 overset_rescale_bcoef_y(t_ybx, by, osm, ncomp, osfac);
856 overset_rescale_bcoef_z(t_zbx, bz, osm, ncomp, osfac);
864template <
typename MF>
868 auto& fine_a_coeffs =
m_a_coeffs[flev ].back();
869 auto& fine_b_coeffs =
m_b_coeffs[flev ].back();
870 auto& crse_a_coeffs =
m_a_coeffs[flev-1].front();
871 auto& crse_b_coeffs =
m_b_coeffs[flev-1].front();
885template <
typename MF>
887MLABecLaplacianT<MF>::update_singular_flags ()
889 m_is_singular.clear();
890 m_is_singular.resize(this->m_num_amr_levels,
false);
891 auto itlo = std::ranges::find(this->m_lobc[0], BCType::Dirichlet);
892 auto ithi = std::ranges::find(this->m_hibc[0], BCType::Dirichlet);
893 if (itlo == this->m_lobc[0].
end() && ithi == this->m_hibc[0].
end())
895 for (
int alev = 0; alev < this->m_num_amr_levels; ++alev)
898 if (this->m_domain_covered[alev] && !this->m_overset_mask[alev][0])
900 if (m_a_scalar ==
Real(0.0))
902 m_is_singular[alev] =
true;
906 RT asum = m_a_coeffs[alev].back().sum(0,
IntVect(0));
907 RT amax = m_a_coeffs[alev].back().norminf(0,1,
IntVect(0));
908 m_is_singular[alev] = (std::abs(asum) <= amax * RT(1.e-12));
914 if (!m_is_singular[0] && this->m_needs_coarse_data_for_bc &&
919 bool lev0_a_is_zero =
false;
920 if (m_a_scalar ==
Real(0.0)) {
921 lev0_a_is_zero =
true;
923 RT asum = m_a_coeffs[0].back().sum(0,
IntVect(0));
924 RT amax = m_a_coeffs[0].back().norminf(0,1,
IntVect(0));
925 bool a_is_almost_zero = std::abs(asum) <= amax * RT(1.e-12);
926 if (a_is_almost_zero) { lev0_a_is_zero =
true; }
929 if (lev0_a_is_zero) {
930 auto bbox = this->m_grids[0][0].minimalBox();
931 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
939 if (this->m_geom[0][0].Domain().contains(bbox)) {
940 m_is_singular[0] =
true;
946template <
typename MF>
954 const MF& bycoef =
m_b_coeffs[amrlev][mglev][1];,
955 const MF& bzcoef =
m_b_coeffs[amrlev][mglev][2];);
959 static_cast<RT>(this->
m_geom[amrlev][mglev].InvCellSize(1)),
960 static_cast<RT>(this->
m_geom[amrlev][mglev].InvCellSize(2)))};
969 const auto& xma = in.const_arrays();
970 const auto& yma = out.arrays();
971 const auto& ama = acoef.arrays();
973 const auto& byma = bycoef.const_arrays();,
974 const auto& bzma = bzcoef.const_arrays(););
976 const auto& osmma = this->
m_overset_mask[amrlev][mglev]->const_arrays();
980 mlabeclap_adotx_os(i,j,k,n, yma[box_no], xma[box_no], ama[box_no],
982 osmma[box_no], dxinv, ascalar, bscalar);
988 mlabeclap_adotx(i,j,k,n, yma[box_no], xma[box_no], ama[box_no],
990 dxinv, ascalar, bscalar);
1000#pragma omp parallel if (Gpu::notInLaunchRegion())
1004 const Box& bx = mfi.tilebox();
1005 const auto& xfab = in.array(mfi);
1006 const auto& yfab = out.array(mfi);
1007 const auto& afab = acoef.array(mfi);
1009 const auto& byfab = bycoef.array(mfi);,
1010 const auto& bzfab = bzcoef.array(mfi););
1012 const auto& osm = this->
m_overset_mask[amrlev][mglev]->const_array(mfi);
1015 mlabeclap_adotx_os(i,j,k,n, yfab, xfab, afab,
AMREX_D_DECL(bxfab,byfab,bzfab),
1016 osm, dxinv, ascalar, bscalar);
1021 mlabeclap_adotx(i,j,k,n, yfab, xfab, afab,
AMREX_D_DECL(bxfab,byfab,bzfab),
1022 dxinv, ascalar, bscalar);
1029template <
typename MF>
1035 bool regular_coarsening =
true;
1036 if (amrlev == 0 && mglev > 0) {
1042 Ax.define(sol.boxArray(), sol.DistributionMap(), sol.nComp(), 0,
1044 Fapply(amrlev, mglev, Ax, sol);
1050 const MF& bycoef =
m_b_coeffs[amrlev][mglev][1];,
1051 const MF& bzcoef =
m_b_coeffs[amrlev][mglev][2];);
1052 const auto& undrrelxr = this->
m_undrrelxr[amrlev][mglev];
1053 const auto& maskvals = this->
m_maskvals [amrlev][mglev];
1057 const auto& f0 = undrrelxr[oitr()]; ++oitr;
1058 const auto& f1 = undrrelxr[oitr()]; ++oitr;
1059#if (AMREX_SPACEDIM > 1)
1060 const auto& f2 = undrrelxr[oitr()]; ++oitr;
1061 const auto& f3 = undrrelxr[oitr()]; ++oitr;
1062#if (AMREX_SPACEDIM > 2)
1063 const auto& f4 = undrrelxr[oitr()]; ++oitr;
1064 const auto& f5 = undrrelxr[oitr()]; ++oitr;
1070#if (AMREX_SPACEDIM > 1)
1073#if (AMREX_SPACEDIM > 2)
1080 const Real* h = this->
m_geom[amrlev][mglev].CellSize();
1091 "MLABecLaplacian::Fsmooth: line solve is not supported on GPU");
1097#if (AMREX_SPACEDIM > 1)
1100#if (AMREX_SPACEDIM > 2)
1106 const auto& solnma = sol.arrays();
1107 const auto& rhsma = rhs.const_arrays();
1108 const auto& ama = acoef.const_arrays();
1110 AMREX_D_TERM(
const auto& bxma = bxcoef.const_arrays();,
1111 const auto& byma = bycoef.const_arrays();,
1112 const auto& bzma = bzcoef.const_arrays(););
1114 const auto& f0ma = f0.const_arrays();
1115 const auto& f1ma = f1.const_arrays();
1116#if (AMREX_SPACEDIM > 1)
1117 const auto& f2ma = f2.const_arrays();
1118 const auto& f3ma = f3.const_arrays();
1119#if (AMREX_SPACEDIM > 2)
1120 const auto& f4ma = f4.const_arrays();
1121 const auto& f5ma = f5.const_arrays();
1126 const auto& osmma = this->
m_overset_mask[amrlev][mglev]->const_arrays();
1131 Box vbx(ama[box_no]);
1132 abec_gsrb_os(i,j,k,n, solnma[box_no], rhsma[box_no], alpha, ama[box_no],
1139 osmma[box_no], vbx, redblack);
1142 const auto& axma = Ax.const_arrays();
1146 Box vbx(ama[box_no]);
1147 abec_jacobi_os(i,j,k,n, solnma[box_no], rhsma[box_no], axma[box_no],
1155 osmma[box_no], vbx);
1158 }
else if (regular_coarsening) {
1163 Box vbx(ama[box_no]);
1164 abec_gsrb(i,j,k,n, solnma[box_no], rhsma[box_no], alpha, ama[box_no],
1174 const auto& axma = Ax.const_arrays();
1178 Box vbx(ama[box_no]);
1179 abec_jacobi(i,j,k,n, solnma[box_no], rhsma[box_no], axma[box_no],
1207#pragma omp parallel if (Gpu::notInLaunchRegion())
1211 const auto& m0 = mm0.
array(mfi);
1212 const auto& m1 = mm1.
array(mfi);
1213#if (AMREX_SPACEDIM > 1)
1214 const auto& m2 = mm2.
array(mfi);
1215 const auto& m3 = mm3.
array(mfi);
1216#if (AMREX_SPACEDIM > 2)
1217 const auto& m4 = mm4.
array(mfi);
1218 const auto& m5 = mm5.
array(mfi);
1222 const Box& tbx = mfi.tilebox();
1223 const Box& vbx = mfi.validbox();
1224 const auto& solnfab = sol.array(mfi);
1225 const auto& rhsfab = rhs.const_array(mfi);
1226 const auto& afab = acoef.const_array(mfi);
1228 AMREX_D_TERM(
const auto& bxfab = bxcoef.const_array(mfi);,
1229 const auto& byfab = bycoef.const_array(mfi);,
1230 const auto& bzfab = bzcoef.const_array(mfi););
1232 const auto& f0fab = f0.const_array(mfi);
1233 const auto& f1fab = f1.const_array(mfi);
1234#if (AMREX_SPACEDIM > 1)
1235 const auto& f2fab = f2.const_array(mfi);
1236 const auto& f3fab = f3.const_array(mfi);
1237#if (AMREX_SPACEDIM > 2)
1238 const auto& f4fab = f4.const_array(mfi);
1239 const auto& f5fab = f5.const_array(mfi);
1244 const auto& osm = this->
m_overset_mask[amrlev][mglev]->const_array(mfi);
1248 abec_gsrb_os(i,j,k,n, solnfab, rhsfab, alpha, afab,
1255 osm, vbx, redblack);
1258 const auto& axfab = Ax.const_array(mfi);
1261 abec_jacobi_os(i,j,k,n, solnfab, rhsfab, axfab,
1272 }
else if (regular_coarsening) {
1276 abec_gsrb(i,j,k,n, solnfab, rhsfab, alpha, afab,
1286 const auto& axfab = Ax.const_array(mfi);
1289 abec_jacobi(i,j,k,n, solnfab, rhsfab, axfab,
1303 abec_gsrb_with_line_solve(tbx, solnfab, rhsfab, alpha, afab,
1316template <
typename MF>
1324 const int mglev = 0;
1326 const Real* dxinv = this->
m_geom[amrlev][mglev].InvCellSize();
1327 const int ncomp = this->
getNComp();
1332 flux, sol, face_only, ncomp);
1335template <
typename MF>
1340 FAB const& sol,
int face_only,
int ncomp)
1343 const auto by = bcoef[1]->const_array();,
1344 const auto bz = bcoef[2]->const_array(););
1346 const auto& fyarr = flux[1]->array();,
1347 const auto& fzarr = flux[2]->array(););
1348 const auto& solarr = sol.array();
1352 RT fac = bscalar*
static_cast<RT>(dxinv[0]);
1354 int blen = box.
length(0);
1357 mlabeclap_flux_xface(tbox, fxarr, solarr, bx, fac, blen, ncomp);
1359#if (AMREX_SPACEDIM >= 2)
1360 fac = bscalar*
static_cast<RT>(dxinv[1]);
1365 mlabeclap_flux_yface(tbox, fyarr, solarr, by, fac, blen, ncomp);
1368#if (AMREX_SPACEDIM == 3)
1369 fac = bscalar*
static_cast<RT>(dxinv[2]);
1374 mlabeclap_flux_zface(tbox, fzarr, solarr, bz, fac, blen, ncomp);
1380 RT fac = bscalar*
static_cast<RT>(dxinv[0]);
1384 mlabeclap_flux_x(tbox, fxarr, solarr, bx, fac, ncomp);
1386#if (AMREX_SPACEDIM >= 2)
1387 fac = bscalar*
static_cast<RT>(dxinv[1]);
1391 mlabeclap_flux_y(tbox, fyarr, solarr, by, fac, ncomp);
1394#if (AMREX_SPACEDIM == 3)
1395 fac = bscalar*
static_cast<RT>(dxinv[2]);
1399 mlabeclap_flux_z(tbox, fzarr, solarr, bz, fac, ncomp);
1405template <
typename MF>
1411 const auto& acoef =
m_a_coeffs[amrlev][mglev];
1413 const auto& bycoef =
m_b_coeffs[amrlev][mglev][1];,
1414 const auto& bzcoef =
m_b_coeffs[amrlev][mglev][2];);
1418 static_cast<RT>(this->
m_geom[amrlev][mglev].InvCellSize(1)),
1419 static_cast<RT>(this->
m_geom[amrlev][mglev].InvCellSize(2)))};
1428 const auto& ma = mf.arrays();
1429 const auto& ama = acoef.const_arrays();
1430 AMREX_D_TERM(
const auto& bxma = bxcoef.const_arrays();,
1431 const auto& byma = bycoef.const_arrays();,
1432 const auto& bzma = bzcoef.const_arrays(););
1436 mlabeclap_normalize(i,j,k,n, ma[box_no], ama[box_no],
1438 dxinv, ascalar, bscalar);
1447#pragma omp parallel if (Gpu::notInLaunchRegion())
1451 const Box& bx = mfi.tilebox();
1452 const auto& fab = mf.array(mfi);
1453 const auto& afab = acoef.array(mfi);
1455 const auto& byfab = bycoef.array(mfi);,
1456 const auto& bzfab = bzcoef.array(mfi););
1460 mlabeclap_normalize(i,j,k,n, fab, afab,
AMREX_D_DECL(bxfab,byfab,bzfab),
1461 dxinv, ascalar, bscalar);
1467template <
typename MF>
1471 bool support =
false;
1483template <
typename MF>
1484std::unique_ptr<MLLinOpT<MF>>
1493 std::unique_ptr<MLLinOpT<MF>> r
1501 nop->m_parent =
this;
1504 nop->setVerbose(this->
verbose);
1510 const Real* dx0 = this->
m_geom[0][0].CellSize();
1514 nop->setCoarseFineBCLocation(cbloc);
1523 MF
const& alpha_bottom =
m_a_coeffs[0].back();
1525 const int ncomp = alpha_bottom.
nComp();
1528 RT a_max = alpha_bottom.norminf(0, ncomp,
IntVect(0),
true,
true);
1529 const int ncomp_b =
m_b_coeffs[0].back()[0].nComp();
1537 RT huge_alpha =
RT(1.e30) *
1540 std::abs(
m_b_scalar)*by_max*dxinv[1]*dxinv[1],
1541 std::abs(
m_b_scalar)*bz_max*dxinv[2]*dxinv[2]));
1546 auto const& ama = alpha.arrays();
1547 auto const& abotma = alpha_bottom.const_arrays();
1552 if (mma[box_no](i,j,k)) {
1553 ama[box_no](i,j,k,n) = afac*abotma[box_no](i,j,k,n);
1555 ama[box_no](i,j,k,n) = huge_alpha;
1565#pragma omp parallel if (Gpu::notInLaunchRegion())
1568 Box const& bx = mfi.tilebox();
1569 auto const& a = alpha.array(mfi);
1570 auto const& abot = alpha_bottom.const_array(mfi);
1575 a(i,j,k,n) = afac*abot(i,j,k,n);
1577 a(i,j,k,n) = huge_alpha;
1583 nop->setACoeffs(0, alpha);
1589template <
typename MF>
1595 const int ncomp = dst.nComp();
1599 auto const& dstma = dst.arrays();
1600 auto const& srcma = src.const_arrays();
1601 auto const& mma = this->
m_overset_mask[0].back()->const_arrays();
1605 if (mma[box_no](i,j,k)) {
1606 dstma[box_no](i,j,k,n) = srcma[box_no](i,j,k,n);
1608 dstma[box_no](i,j,k,n) =
RT(0.0);
1618#pragma omp parallel if (Gpu::notInLaunchRegion())
1621 Box const& bx = mfi.tilebox();
1622 auto const& dfab = dst.array(mfi);
1623 auto const& sfab = src.const_array(mfi);
1624 auto const& m = this->
m_overset_mask[0].back()->const_array(mfi);
1628 dfab(i,j,k,n) = sfab(i,j,k,n);
1630 dfab(i,j,k,n) =
RT(0.0);
1638#ifdef AMREX_MLMG_HAS_FLOAT
#define BL_PROFILE(a)
Definition AMReX_BLProfiler.H:593
#define AMREX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
Definition AMReX_BLassert.H:49
#define AMREX_ASSERT_WITH_MESSAGE(EX, MSG)
Definition AMReX_BLassert.H:37
#define AMREX_ASSERT(EX)
Definition AMReX_BLassert.H:38
#define AMREX_ALWAYS_ASSERT(EX)
Definition AMReX_BLassert.H:50
#define AMREX_GPU_LAUNCH_HOST_DEVICE_LAMBDA_RANGE(TN, TI, block)
Definition AMReX_GpuLaunchMacrosC.nolint.H:4
#define AMREX_HOST_DEVICE_FOR_3D(...)
Definition AMReX_GpuLaunchMacrosC.nolint.H:106
#define AMREX_HOST_DEVICE_PARALLEL_FOR_4D(...)
Definition AMReX_GpuLaunchMacrosC.nolint.H:111
#define AMREX_LAUNCH_HOST_DEVICE_LAMBDA_DIM(...)
Definition AMReX_GpuLaunch.nolint.H:37
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18
#define AMREX_LOOP_4D(bx, ncomp, i, j, k, n, block)
#define AMREX_D_TERM(a, b, c)
Definition AMReX_SPACE.H:172
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
Reference-counted collection of Boxes.
Definition AMReX_BoxArray.H:681
__host__ __device__ IntVectND< dim > length() const noexcept
Return the length of the BoxND.
Definition AMReX_Box.H:167
const Real * InvCellSize() const noexcept
Returns the inverse cellsize for each coordinate direction.
Definition AMReX_CoordSys.H:91
Calculates the distribution of FABs to MPI processes.
Definition AMReX_DistributionMapping.H:55
int nComp() const noexcept
Return number of variables (aka components) associated with each point.
Definition AMReX_FabArrayBase.H:88
MultiArray4< typename FabArray< FAB >::value_type const > const_arrays() const noexcept
Read-only convenience wrapper equivalent to arrays() const.
Definition AMReX_FabArray.H:759
Array4< typename FabArray< FAB >::value_type const > const_array(const MFIter &mfi) const noexcept
Synonym for array(const MFIter&) that highlights read-only semantics.
Definition AMReX_FabArray.H:677
Abstract factory interface for creating, aliasing, and destroying FAB objects.
Definition AMReX_FabFactory.H:73
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:87
__host__ static __device__ constexpr IntVectND< dim > TheDimensionVector(int d) noexcept
Definition AMReX_IntVect.H:797
Iterator for looping ever tiles and boxes of amrex::FabArray based containers.
Definition AMReX_MFIter.H:88
Box tilebox() const noexcept
Return the tile Box at the current index.
Definition AMReX_MFIter.cpp:389
bool isValid() const noexcept
Is the iterator valid i.e. is it associated with a FAB?
Definition AMReX_MFIter.H:176
Definition AMReX_MLABecLaplacian.H:22
RT getBScalar() const final
Scalar beta applied to the b-coefficient term.
Definition AMReX_MLABecLaplacian.H:213
int getNComp() const override
Return number of components.
Definition AMReX_MLABecLaplacian.H:167
void FFlux(int amrlev, const MFIter &mfi, const Array< FAB *, 3 > &flux, const FAB &sol, Location, int face_only=0) const override
Compute fluxes on AMR level amrlev for the tilebox described by mfi using sol, writing to flux and ho...
Definition AMReX_MLABecLaplacian.H:1318
void setACoeffs(int amrlev, const AMF &alpha)
bool isSingular(int amrlev) const override
Query whether AMR level amrlev is singular (null space present).
Definition AMReX_MLABecLaplacian.H:183
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const Vector< iMultiFab const * > &a_overset_mask, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FAB > const * > &a_factory={}, int a_ncomp=1)
Define coefficients/layouts plus overset-mask information.
Definition AMReX_MLABecLaplacian.H:343
LinOpBCType BCType
Definition AMReX_MLABecLaplacian.H:28
void applyRobinBCTermsCoeffs()
Modify coefficients to honor Robin BC terms introduced at level boundaries.
Definition AMReX_MLABecLaplacian.H:751
Vector< Vector< Array< MultiFab, 3 > > > m_b_coeffs
Definition AMReX_MLABecLaplacian.H:264
typename MF::fab_type FAB
Definition AMReX_MLABecLaplacian.H:25
void setBCoeffs(int amrlev, const Array< AMF const *, 3 > &beta)
MLABecLaplacianT< MF > & operator=(const MLABecLaplacianT< MF > &)=delete
bool supportRobinBC() const noexcept override
Definition AMReX_MLABecLaplacian.H:274
RT m_b_scalar
Definition AMReX_MLABecLaplacian.H:262
typename MF::value_type RT
Definition AMReX_MLABecLaplacian.H:26
~MLABecLaplacianT() override
void prepareForSolve() override
Finalize singular flags and metric/Robin adjustments prior to calling MLMG.
Definition AMReX_MLABecLaplacian.H:528
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FAB > const * > &a_factory={}, int a_ncomp=1)
Define coefficients/layouts for a standard cell-centered solve.
Definition AMReX_MLABecLaplacian.H:322
RT m_a_scalar
Definition AMReX_MLABecLaplacian.H:261
MLABecLaplacianT(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const Vector< iMultiFab const * > &a_overset_mask, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FAB > const * > &a_factory={}, int a_ncomp=1)
Convenience constructor that includes overset-mask handling (1 = unknown, 0 = known).
Definition AMReX_MLABecLaplacian.H:307
void averageDownCoeffsToCoarseAmrLevel(int flev)
Average coefficients from fine AMR level flev to coarse AMR level flev-1.
Definition AMReX_MLABecLaplacian.H:866
void averageDownCoeffsSameAmrLevel(int amrlev, Vector< MF > &a, Vector< Array< MF, 3 > > &b)
Average coefficients down within AMR level amrlev (fine-to-coarse multigrid) updating a and b.
Definition AMReX_MLABecLaplacian.H:778
static void FFlux(Box const &box, Real const *dxinv, RT bscalar, Array< FAB const *, 3 > const &bcoef, Array< FAB *, 3 > const &flux, FAB const &sol, int face_only, int ncomp)
Helper that computes face fluxes for a single tilebox.
Definition AMReX_MLABecLaplacian.H:1337
bool m_scalars_set
Definition AMReX_MLABecLaplacian.H:266
Vector< int > m_is_singular
Definition AMReX_MLABecLaplacian.H:271
void averageDownCoeffs()
Average a and b coefficients down across all AMR and MG levels.
Definition AMReX_MLABecLaplacian.H:760
RT getAScalar() const final
Scalar alpha applied to the a-coefficient term.
Definition AMReX_MLABecLaplacian.H:211
void normalize(int amrlev, int mglev, MF &mf) const override
Divide mf by the diagonal of the operator (used by CG-family bottom solvers).
Definition AMReX_MLABecLaplacian.H:1407
void Fsmooth(int amrlev, int mglev, MF &sol, const MF &rhs, int redblack) const override
Perform one smoothing pass on (amrlev,mglev) updating sol against rhs. redblack selects the red (0) o...
Definition AMReX_MLABecLaplacian.H:1031
MLABecLaplacianT(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FAB > const * > &a_factory={}, int a_ncomp=1)
Convenience constructor for cell-based solves without overset regions.
Definition AMReX_MLABecLaplacian.H:296
std::unique_ptr< MLLinOpT< MF > > makeNLinOp(int) const final
Build the NSolve counterpart of this operator.
Definition AMReX_MLABecLaplacian.H:1485
bool m_acoef_set
Definition AMReX_MLABecLaplacian.H:267
Array< MF const *, 3 > getBCoeffs(int amrlev, int mglev) const final
Access the stored b coefficients on AMR level amrlev and MG level mglev.
Definition AMReX_MLABecLaplacian.H:218
MLABecLaplacianT(MLABecLaplacianT< MF > &&)=delete
Vector< Vector< MultiFab > > m_a_coeffs
Definition AMReX_MLABecLaplacian.H:263
void setScalars(T1 a, T2 b) noexcept
bool isBottomSingular() const override
Convenience helper for the coarsest level singularity flag.
Definition AMReX_MLABecLaplacian.H:185
void applyMetricTermsCoeffs()
Apply metric factors to the stored coefficients when solving in mapped space.
Definition AMReX_MLABecLaplacian.H:584
void copyNSolveSolution(MF &dst, MF const &src) const final
Copy an NSolve solution from src to dst.
Definition AMReX_MLABecLaplacian.H:1591
bool supportNSolve() const override
Whether this operator supports NSolve.
Definition AMReX_MLABecLaplacian.H:1469
bool supportsMixedPrecision() const override
Definition AMReX_MLABecLaplacian.H:179
MLABecLaplacianT()=default
Construct an empty operator; call define() before solving.
typename MLLinOpT< MF >::Location Location
Definition AMReX_MLABecLaplacian.H:29
MF const * getACoeffs(int amrlev, int mglev) const final
Access the stored a coefficient on AMR level amrlev and MG level mglev.
Definition AMReX_MLABecLaplacian.H:215
void update() override
Average coefficients and enforce boundary-provided adjustments when needed.
Definition AMReX_MLABecLaplacian.H:503
bool needsUpdate() const override
True if coefficients need to be averaged down before the next apply().
Definition AMReX_MLABecLaplacian.H:170
void Fapply(int amrlev, int mglev, MF &out, const MF &in) const override
Apply the operator on (amrlev,mglev), storing L(in) in out.
Definition AMReX_MLABecLaplacian.H:948
MLABecLaplacianT(const MLABecLaplacianT< MF > &)=delete
LPInfo m_lpinfo_arg
Definition AMReX_MLCellABecLap.H:153
bool needsUpdate() const override
Does it need update if it's reused?
Definition AMReX_MLCellABecLap.H:75
Vector< Vector< std::unique_ptr< iMultiFab > > > m_overset_mask
Definition AMReX_MLCellABecLap.H:151
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FAB > const * > &a_factory={})
Describe the AMR hierarchy when overset masks are not required.
Definition AMReX_MLCellABecLap.H:160
void prepareForSolve() override
Standard hook called before MLMG iterates (fixes BC data, etc.).
Definition AMReX_MLCellABecLap.H:323
void update() override
Average coefficients/metrics when marked dirty.
Definition AMReX_MLCellABecLap.H:316
void applyMetricTerm(int amrlev, int mglev, MF &rhs) const final
Multiply the RHS by metric terms appropriate for curvilinear coordinates.
Definition AMReX_MLCellLinOp.H:1836
Vector< Vector< BndryRegisterT< MF > > > m_undrrelxr
Definition AMReX_MLCellLinOp.H:509
bool m_use_gauss_seidel
Definition AMReX_MLCellLinOp.H:518
Vector< Vector< Array< MultiMask, 2 *3 > > > m_maskvals
Definition AMReX_MLCellLinOp.H:512
int mg_domain_min_width
Definition AMReX_MLLinOp.H:976
Vector< Geometry > spGeom(const Vector< Geometry > &a_geom)
Definition AMReX_MLLinOp.H:1102
int mg_box_min_width
Definition AMReX_MLLinOp.H:975
bool hasRobinBC() const noexcept
Definition AMReX_MLLinOp.H:2061
Vector< Array< BCType, 3 > > m_hibc
Definition AMReX_MLLinOp.H:966
Vector< Vector< BoxArray > > m_grids
Definition AMReX_MLLinOp.H:1008
static constexpr int mg_coarsen_ratio
Definition AMReX_MLLinOp.H:974
Vector< Vector< DistributionMapping > > m_dmap
Definition AMReX_MLLinOp.H:1009
int verbose
Definition AMReX_MLLinOp.H:983
IntVect m_coarse_data_crse_ratio
Definition AMReX_MLLinOp.H:1037
bool needsCoarseDataForBC() const noexcept
Needs coarse data for bc?
Definition AMReX_MLLinOp.H:249
bool hasHiddenDimension() const noexcept
Definition AMReX_MLLinOp.H:1293
int hiddenDirection() const noexcept
Definition AMReX_MLLinOp.H:1294
Vector< Array< BCType, 3 > > m_lobc
Definition AMReX_MLLinOp.H:965
Vector< Vector< Geometry > > m_geom
first Vector is for amr level and second is mg level
Definition AMReX_MLLinOp.H:1007
LPInfo dpInfo(LPInfo const &a_info) const
Definition AMReX_MLLinOp.H:1128
int maxorder
Definition AMReX_MLLinOp.H:986
Vector< IntVect > mg_coarsen_ratio_vec
Definition AMReX_MLLinOp.H:1004
LinOpEnumType::Location Location
Definition AMReX_MLLinOp.H:174
void makeSPLinOp(LPInfo const &a_info, F const &f)
Definition AMReX_MLLinOp.H:1145
void spForward(F const &f)
Definition AMReX_MLLinOp.H:1185
Definition AMReX_MultiMask.H:23
MultiArray4< int const > const_arrays() const noexcept
Return const multi-array views (alias of arrays()).
Definition AMReX_MultiMask.H:86
Array4< int const > array(const MFIter &mfi) const noexcept
Return an Array4 view (const) for iterator mfi.
Definition AMReX_MultiMask.H:69
An Iterator over the Orientation of Faces of a Box.
Definition AMReX_Orientation.H:135
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:29
Long size() const noexcept
Definition AMReX_Vector.H:54
A Collection of IArrayBoxes.
Definition AMReX_iMultiFab.H:34
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:80
__host__ __device__ BoxND< dim > adjCellHi(const BoxND< dim > &b, int dir, int len=1) noexcept
Return the BoxND of length len adjacent to b on the high end along coordinate direction dir.
Definition AMReX_Box.H:1850
__host__ __device__ BoxND< dim > convert(const BoxND< dim > &b, const IntVectND< dim > &typ) noexcept
Return a copy of b converted to the nodal flags typ.
Definition AMReX_Box.H:1632
__host__ __device__ BoxND< dim > adjCellLo(const BoxND< dim > &b, int dir, int len=1) noexcept
Return the BoxND of length len adjacent to b on the low end along coordinate direction dir.
Definition AMReX_Box.H:1819
__host__ __device__ BoxND< dim > surroundingNodes(const BoxND< dim > &b, int dir) noexcept
Return a BoxND with NODE based coordinates in direction dir that encloses BoxND b.
Definition AMReX_Box.H:1584
__host__ __device__ BoxND< dim > bdryLo(const BoxND< dim > &b, int dir, int len=1) noexcept
Return the BoxND of length len on the low boundary of b along coordinate direction dir.
Definition AMReX_Box.H:1717
std::array< T, N > Array
Definition AMReX_Array.H:31
Arena * The_Async_Arena()
Definition AMReX_Arena.cpp:849
void Max(KeyValuePair< K, V > &vi, MPI_Comm comm)
Definition AMReX_ParallelReduce.H:133
MLABecLaplacianT< MultiFab > MLABecLaplacian
Definition AMReX_MLABecLaplacian.H:1643
__host__ __device__ constexpr const T & max(const T &a, const T &b) noexcept
Definition AMReX_Algorithm.H:54
void streamSynchronize() noexcept
Definition AMReX_GpuDevice.H:329
bool inLaunchRegion() noexcept
Definition AMReX_GpuControl.H:88
bool notInLaunchRegion() noexcept
Definition AMReX_GpuControl.H:89
bool inNoSyncRegion() noexcept
Definition AMReX_GpuControl.H:148
MPI_Comm CommunicatorSub() noexcept
sub-communicator for current frame
Definition AMReX_ParallelContext.H:70
Definition AMReX_Amr.cpp:50
std::array< T const *, 3 > GetArrOfConstPtrs(const std::array< T, 3 > &a) noexcept
Create an array of const-qualified pointers from an array of objects.
Definition AMReX_Array.H:1079
void average_down(const MultiFab &S_fine, MultiFab &S_crse, const Geometry &fgeom, const Geometry &cgeom, int scomp, int ncomp, int rr)
Definition AMReX_MultiFabUtil.cpp:360
void ParallelForRedBlack(MF const &mf, int redblack, F &&f)
ParallelFor over the red or black points of the valid region of a MultiFab/FabArray.
Definition AMReX_MFParallelFor.H:529
void ParallelFor(TypeList< CTOs... > ctos, std::array< int, sizeof...(CTOs)> const &runtime_options, T N, F &&f)
Definition AMReX_CTOParallelForImpl.H:202
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:35
void average_down_faces(const Vector< const MF * > &fine, const Vector< MF * > &crse, const IntVect &ratio, int ngcrse=0)
Average fine face-based FabArray onto crse face-based FabArray.
Definition AMReX_MultiFabUtil.H:1062
std::array< T *, 3 > GetArrOfPtrs(std::array< T, 3 > &a) noexcept
Create an array of pointers from an array of objects.
Definition AMReX_Array.H:1033
int nComp(FabArrayBase const &fa)
Convenience wrapper that forwards to fa.nComp().
Definition AMReX_FabArrayBase.cpp:3028
LinOpBCType
Definition AMReX_LO_BCTYPES.H:27
@ Robin
Definition AMReX_LO_BCTYPES.H:36
@ Neumann
Definition AMReX_LO_BCTYPES.H:30
@ Dirichlet
Definition AMReX_LO_BCTYPES.H:29
bool TilingIfNotGPU() noexcept
Definition AMReX_MFIter.H:12
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:38
MF::value_type norminf(MF const &mf, int scomp, int ncomp, IntVect const &nghost, bool local=false)
Return the infinity norm, with an MPI maximum unless local is true.
Definition AMReX_FabArrayUtility.H:2275
RealVectND< 3 > RealVect
Definition AMReX_ParmParse.H:40
__host__ __device__ Dim3 end(BoxND< dim > const &box) noexcept
Return the iterator end coordinate of box as Dim3.
Definition AMReX_Box.H:2259
Fixed-size array that can be used on GPU.
Definition AMReX_Array.H:52
Definition AMReX_GpuDevice.H:593
Configuration knobs for multilevel linear operators (grid agglomeration, metrics, etc....
Definition AMReX_MLLinOp.H:54
FabArray memory allocation information.
Definition AMReX_FabArray.H:73
Definition AMReX_MFIter.H:20
MFItInfo & SetDynamic(bool f) noexcept
Definition AMReX_MFIter.H:43
MFItInfo & EnableTiling(const IntVect &ts=FabArrayBase::mfiter_tile_size) noexcept
Definition AMReX_MFIter.H:31