7 #include "../coordinates/coordinates.hpp"
8 #include "../radiation/radiation.hpp"
14 long_name =
"total upward radiative flux,total downward radiative flux";
24 int is = pmb->is, js = pmb->js, ks = pmb->ks;
25 int ie = pmb->ie, je = pmb->je, ke = pmb->ke;
31 while (pband != NULL) {
32 for (
int k = ks; k <= ke; ++k)
33 for (
int j = js;
j <= je; ++
j) {
34 pmb->pcoord->Face1Area(k,
j, is, ie + 1,
x1area_);
35 for (
int i = is; i <= ie + 1; ++i) {
49 int is = pmb->is, js = pmb->js, ks = pmb->ks;
50 int ie = pmb->ie, je = pmb->je, ke = pmb->ke;
52 Real *total_area =
new Real[
ncells1_ + 1];
53 std::fill(total_area, total_area +
ncells1_ + 1, 0.);
56 for (
int k = ks; k <= ke; ++k)
57 for (
int j = js;
j <= je; ++
j) {
58 pmb->pcoord->Face1Area(k,
j, is, ie + 1,
x1area_);
59 for (
int i = is; i <= ie + 1; ++i) total_area[i] +=
x1area_(i);
66 MPI_Allreduce(MPI_IN_PLACE,
data.data(),
data.GetSize(), MPI_ATHENA_REAL,
67 MPI_SUM, MPI_COMM_WORLD);
68 MPI_Allreduce(MPI_IN_PLACE, total_area,
ncells1_ + 1, MPI_ATHENA_REAL,
69 MPI_SUM, MPI_COMM_WORLD);
71 for (
int i = is; i <= ie + 1; ++i) {
AthenaArray< Real > x1area_
scratch geometric arrays
AthenaArray< Real > bflxup
band upward flux
AthenaArray< Real > bflxdn
band downward flux
void Finalize(AthenaArray< Real > const &w)
void Progress(AthenaArray< Real > const &w)
RadiativeFlux(MeshBlock *pmb)