Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mari2895 committed Jan 4, 2024
1 parent 1c3a0f8 commit 882565a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/radiation/cooling_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,24 @@ TaskStatus LightBulbCalcTau(MeshData<Real> *rc) {

static auto desc = MakePackDescriptor<p::density, iv::tau>(resolved_pkgs.get());


PackIndexMap imap;
auto v = rc->desc.GetPack(rc);

IndexRange ib = rc->GetBoundsI(IndexDomain::interior);
IndexRange jb = rc->GetBoundsJ(IndexDomain::interior);
IndexRange kb = rc->GetBoundsK(IndexDomain::interior);

const int nblocks=v.GetNBlocks();
const int nblocks = v.GetNBlocks();

auto &unit_conv =
pmesh->packages.Get("phoebus")->Param<phoebus::UnitConversions>("unit_conv");
const Real density_conversion_factor = unit_conv.GetMassDensityCodeToCGS();
parthenon::par_for(
DEFAULT_LOOP_PATTERN, "CalcTau", DevExecSpace(), 0, nblocks-1, kb.s, kb.e, jb.s, jb.e, ib.s, ib.e,
DEFAULT_LOOP_PATTERN, "CalcTau", DevExecSpace(), 0, nblocks - 1, kb.s, kb.e, jb.s,
jb.e, ib.s, ib.e,
KOKKOS_LAMBDA(const int b, const int k, const int j, const int i) {
const Real rho = v(b, p::density, k, j, i) * density_conversion_factor; // Density in CGS
const Real rho =
v(b, p::density, k, j, i) * density_conversion_factor; // Density in CGS
const Real lRho = std::log10(rho);
// Calculate tau
constexpr Real xl1 = LightBulb::HeatAndCool::XL1;
Expand Down

0 comments on commit 882565a

Please sign in to comment.