| 1148 | } |
| 1149 | |
| 1150 | void ca_derstate(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/, |
| 1151 | const FArrayBox& datfab, const Geometry& /*geom*/, |
| 1152 | Real /*time*/, const int* /*bcrec*/, int /*level*/) |
| 1153 | { |
| 1154 | |
| 1155 | auto const dat = datfab.array(); |
| 1156 | auto const der = derfab.array(); |
| 1157 | |
| 1158 | amrex::ParallelFor(bx, |
| 1159 | [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept |
| 1160 | { |
| 1161 | |
| 1162 | // density |
| 1163 | der(i,j,k,0) = dat(i,j,k,0); |
| 1164 | |
| 1165 | // temperature |
| 1166 | der(i,j,k,1) = dat(i,j,k,1); |
| 1167 | |
| 1168 | // (rho X)_1 = X_1 |
| 1169 | der(i,j,k,2) = dat(i,j,k,2) / dat(i,j,k,0); |
| 1170 | |
| 1171 | }); |
| 1172 | |
| 1173 | } |
| 1174 | |
| 1175 | #ifdef MHD |
| 1176 | void ca_dermagcenx(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/, |
nothing calls this directly
no outgoing calls
no test coverage detected