| 2860 | |
| 2861 | #if (AMREX_SPACEDIM < 3) |
| 2862 | void |
| 2863 | Gravity::applyMetricTerms(int level, MultiFab& Rhs, const Vector<MultiFab*>& coeffs) const |
| 2864 | { |
| 2865 | BL_PROFILE("Gravity::applyMetricTerms()"); |
| 2866 | |
| 2867 | const auto dx = parent->Geom(level).CellSizeArray(); |
| 2868 | const auto problo = parent->Geom(level).ProbLoArray(); |
| 2869 | const int coord_type = parent->Geom(level).Coord(); |
| 2870 | |
| 2871 | #ifdef _OPENMP |
| 2872 | #pragma omp parallel |
| 2873 | #endif |
| 2874 | for (MFIter mfi(Rhs, TilingIfNotGPU()); mfi.isValid(); ++mfi) |
| 2875 | { |
| 2876 | const Box& bx = mfi.growntilebox(1); |
| 2877 | const Box& xbx = mfi.nodaltilebox(0); |
| 2878 | #if AMREX_SPACEDIM >= 2 |
| 2879 | const Box& ybx = mfi.nodaltilebox(1); |
| 2880 | #endif |
| 2881 | |
| 2882 | // Modify Rhs and coeffs with the appropriate metric terms. |
| 2883 | apply_metric(bx, |
| 2884 | Rhs.array(mfi), (Rhs[mfi]).box(), |
| 2885 | (*coeffs[0]).array(mfi), xbx, |
| 2886 | #if AMREX_SPACEDIM >= 2 |
| 2887 | (*coeffs[1]).array(mfi), ybx, |
| 2888 | #endif |
| 2889 | problo, dx, coord_type); |
| 2890 | } |
| 2891 | } |
| 2892 | |
| 2893 | #endif |
| 2894 |
nothing calls this directly
no test coverage detected