MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / ca_derstate

Function ca_derstate

Source/driver/Derive.cpp:1150–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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*/,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected