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

Function ca_dermaggrav

Source/driver/Derive.cpp:554–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552
553
554 void ca_dermaggrav(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
555 const FArrayBox& datfab, const Geometry& /*geom*/,
556 Real /*time*/, const int* /*bcrec*/, int /*level*/)
557 {
558
559 auto const dat = datfab.array();
560 auto const der = derfab.array();
561
562 amrex::ParallelFor(bx,
563 [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
564 {
565
566 der(i,j,k,0) = std::sqrt(dat(i,j,k,0)*dat(i,j,k,0) +
567 dat(i,j,k,1)*dat(i,j,k,1) +
568 dat(i,j,k,2)*dat(i,j,k,2));
569
570 });
571 }
572
573 void ca_derradialvel(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/,
574 const FArrayBox& datfab, const Geometry& geom,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected