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

Function ca_derkineng

Source/driver/Derive.cpp:856–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854 }
855
856 void ca_derkineng (const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
857 const FArrayBox& datfab, const Geometry& /*geom*/,
858 Real /*time*/, const int* /*bcrec*/, int /*level*/)
859 {
860
861 auto const dat = datfab.array();
862 auto const kineng = derfab.array();
863
864 amrex::ParallelFor(bx,
865 [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
866 {
867 kineng(i,j,k,0) = 0.5_rt / dat(i,j,k,0) * ( dat(i,j,k,1)*dat(i,j,k,1) +
868 dat(i,j,k,2)*dat(i,j,k,2) +
869 dat(i,j,k,3)*dat(i,j,k,3) );
870 });
871
872 }
873
874 void ca_dernull(Real* /*der*/, const int* /*der_lo*/, const int* /*der_hi*/, const int* /*nvar*/,
875 const Real* /*data*/, const int* /*data_lo*/, const int* /*data_hi*/, const int* /*ncomp*/,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected