5 #include <configure.hpp>
25 int nlevels =
temf_.size();
28 MPI_Comm_size(mpi_comm_, &nblocks);
32 disort_state *ds =
static_cast<disort_state *
>(arg);
34 for (
int n = 0; n < nblocks; ++n) {
35 for (
int i = 0; i <= nlayers; ++i) {
36 ds->temper[n * nlayers + i] =
recv_buffer_[0][n * nlevels + i + NGHOST];
40 std::reverse(ds->temper, ds->temper + ds->nlyr + 1);
53 for (
int i = 0; i < nlayers; ++i) {
55 *(buf++) =
tau_(
b, i1);
56 *(buf++) =
ssa_(
b, i1);
57 for (
int j = 0;
j <= npmom; ++
j) {
69 MPI_Comm_size(mpi_comm_, &nblocks);
75 disort_state *ds =
static_cast<disort_state *
>(arg);
77 for (
int n = 0; n < nblocks; ++n) {
78 for (
int i = 0; i < nlayers; ++i) {
79 ds->dtauc[n * nlayers + i] = *(buf++);
80 ds->ssalb[n * nlayers + i] = *(buf++);
81 for (
int j = 0;
j <= npmom; ++
j)
82 ds->pmom[n * nlayers * ds->nmom_nstr + i * ds->nmom_nstr +
j] =
84 for (
int j = npmom + 1;
j < ds->nmom_nstr; ++
j)
85 ds->pmom[n * nlayers * ds->nmom_nstr + i * ds->nmom_nstr +
j] = 0.;
90 std::reverse(ds->dtauc, ds->dtauc + ds->nlyr);
93 std::reverse(ds->ssalb, ds->ssalb + ds->nlyr);
96 std::reverse(ds->pmom, ds->pmom + ds->nlyr * (ds->nmom_nstr + 1));
97 for (
int i = 0; i < ds->nlyr; ++i) {
98 std::reverse(ds->pmom + i * (ds->nmom_nstr + 1),
99 ds->pmom + (i + 1) * (ds->nmom_nstr + 1));
114 MPI_Comm_size(mpi_comm_, &nblocks);
120 recv_buffer_[1].resize(nblocks * nlayers * (npmom + 3));
BufferType recv_buffer_[MessageTraits< T >::num_buffers]
BufferType send_buffer_[MessageTraits< T >::num_buffers]
bool UnpackTemperature(void *arg)
Unpack temperature at cell face from receive buffer 0.
void PackSpectralGrid(int b)
Pack data in spectral grid b into send buffer 1.
bool UnpackSpectralGrid(void *arg)
Unpack data from receive buffer 1 into spectral grid b.
std::vector< Real > temf_
temperature at cell boundary (face)
AthenaArray< Real > pmom_
spectral bin phase function moments
void Transfer(MeshBlock const *pmb, int n) override
AthenaArray< Real > ssa_
spectral bin single scattering albedo
void PackTemperature()
Pack temperature at cell face into send buffer 0.
size_t GetNumLayers() const
Get number of phase function moments.
AthenaArray< Real > tau_
spectral bin optical depth
size_t GetNumPhaseMoments() const
Get number of phase function moments.
Traits class providing Message information for class T.