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

Function ca_derabar

Source/driver/Derive.cpp:925–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923 }
924
925 void ca_derabar(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
926 const FArrayBox& datfab, const Geometry& /*geom*/,
927 Real /*time*/, const int* /*bcrec*/, int /*level*/)
928 {
929
930 auto const dat = datfab.array();
931 auto const der = derfab.array();
932
933 amrex::ParallelFor(bx,
934 [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
935 {
936
937 Real sum = 0.0_rt;
938 Real xn;
939 for (int n = 0; n < NumSpec; n++) {
940 xn = dat(i,j,k,1+n)/dat(i,j,k,0);
941 sum += xn/aion[n];
942 }
943 der(i,j,k,0) = 1.0_rt / sum;
944 });
945 }
946
947 void ca_dermagvort(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
948 const FArrayBox& datfab, const Geometry& geom,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected