2 #include "../communicator/communicator.hpp"
3 #include "../coordinates/coordinates.hpp"
4 #include "../debugger/debugger.hpp"
5 #include "../hydro/hydro.hpp"
6 #include "../mesh/mesh.hpp"
7 #include "../thermodynamics/thermodynamics.hpp"
13 NeighborBlock
const *ptop = pmb->pcomm->findTopNeighbor();
14 if (ptop !=
nullptr)
return TaskStatus::success;
16 pmb->pdebug->Call(
"Physics::TopCooling");
26 for (
int k = ks; k <= ke; ++k)
27 for (
int j = js;
j <= je; ++
j) {
30 du(IEN, k,
j, ie) += dt *
flux_top_ * pcoord->GetFace1Area(k,
j, ie + 1) /
31 pcoord->GetCellVolume(k,
j, ie);
35 pmb->pdebug->CheckConservation(
"du", du, is, ie, js, je, ks, ke);
38 return TaskStatus::success;
44 NeighborBlock
const *pbot = pmb->pcomm->findBotNeighbor();
45 if (pbot !=
nullptr)
return TaskStatus::success;
47 pmb->pdebug->Call(
"Physics::BotHeating");
57 for (
int k = ks; k <= ke; ++k)
58 for (
int j = js;
j <= je; ++
j) {
59 du(IEN, k,
j, is) += dt *
flux_bot_ * pcoord->GetFace1Area(k,
j, is) /
60 pcoord->GetCellVolume(k,
j, is);
64 pmb->pdebug->CheckConservation(
"du", du, is, ie, js, je, ks, ke);
67 return TaskStatus::success;
TaskStatus TopCooling(AthenaArray< Real > &du, AthenaArray< Real > const &w, Real time, Real dt)
TaskStatus BotHeating(AthenaArray< Real > &du, AthenaArray< Real > const &w, Real time, Real dt)