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

Function ca_derye

Source/driver/Derive.cpp:903–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

901
902
903 void ca_derye(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
904 const FArrayBox& datfab, const Geometry& /*geom*/,
905 Real /*time*/, const int* /*bcrec*/, int /*level*/)
906 {
907
908 auto const dat = datfab.array();
909 auto const der = derfab.array();
910
911 amrex::ParallelFor(bx,
912 [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
913 {
914
915 Real sum = 0.0_rt;
916 Real xn;
917 for (int n = 0; n < NumSpec; n++) {
918 xn = dat(i,j,k,1+n) / dat(i,j,k,0);
919 sum += xn * zion[n] / aion[n];
920 }
921 der(i,j,k,0) = sum;
922 });
923 }
924
925 void ca_derabar(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
926 const FArrayBox& datfab, const Geometry& /*geom*/,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected