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

Function ca_derentropy

Source/driver/Derive.cpp:285–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 }
284
285 void ca_derentropy(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
286 const FArrayBox& datfab, const Geometry& /*geom*/,
287 Real /*time*/, const int* /*bcrec*/, int /*level*/)
288 {
289
290 auto const dat = datfab.array();
291 auto const der = derfab.array();
292
293 amrex::ParallelFor(bx,
294 [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
295 {
296
297
298 Real rhoInv = 1.0_rt / dat(i,j,k,URHO);
299
300 eos_t eos_state;
301 eos_state.rho = dat(i,j,k,URHO);
302 eos_state.T = dat(i,j,k,UTEMP);
303 eos_state.e = dat(i,j,k,UEINT) * rhoInv;
304 for (int n = 0; n < NumSpec; n++) {
305 eos_state.xn[n] = dat(i,j,k,UFS+n) * rhoInv;
306 }
307#if NAUX_NET > 0
308 for (int n = 0; n < NumAux; n++) {
309 eos_state.aux[n] = dat(i,j,k,UFX+n) * rhoInv;
310 }
311#endif
312
313 eos(eos_input_re, eos_state);
314
315 der(i,j,k,0) = eos_state.s;
316 });
317 }
318
319#ifdef DIFFUSION
320 void ca_dercond(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected