src/bvals/bvals_cc.cpp
//----------------------------------------------------------------------------------------
//! \fn int BoundaryValues::LoadCellCenteredBoundaryBufferSameLevel(AthenaArray<Real> &src,
//                                  int ns, int ne, Real *buf, const NeighborBlock& nb)
//  \brief Set hydro boundary buffers for sending to a block on the same level
\fn int BoundaryValues::LoadCellCenteredBoundaryBufferSameLevel(AthenaArray &src,
int ns, int ne, Real *buf, const NeighborBlock& nb)
\brief Set hydro boundary buffers for sending to a block on the same level
\ fn int BoundaryValues :: LoadCellCenteredBoundaryBufferSameLevel ( AthenaArray &src int ns int ne Real * buf const NeighborBlock& nb ) \ brief Set hydro boundary buffers for sending to a block on the same level
int BoundaryValues::LoadCellCenteredBoundaryBufferSameLevel(AthenaArray<Real> &src,
                                    int ns, int ne, Real *buf, const NeighborBlock& nb)
{
  MeshBlock *pmb=pmy_block_;
  int si, sj, sk, ei, ej, ek;
  si=(nb.ox1>0)?(pmb->ie-NGHOST+1):pmb->is;
  ei=(nb.ox1<0)?(pmb->is+NGHOST-1):pmb->ie;
  sj=(nb.ox2>0)?(pmb->je-NGHOST+1):pmb->js;
  ej=(nb.ox2<0)?(pmb->js+NGHOST-1):pmb->je;
  sk=(nb.ox3>0)?(pmb->ke-NGHOST+1):pmb->ks;
  ek=(nb.ox3<0)?(pmb->ks+NGHOST-1):pmb->ke;
  int p=0;
  BufferUtility::Pack4DData(src, buf, ns, ne, si, ei, sj, ej, sk, ek, p);
  return p;
}
int BoundaryValues :: LoadCellCenteredBoundaryBufferSameLevel ( AthenaArray < Real > & src , int ns , int ne , Real * buf , const NeighborBlock & nb ) { MeshBlock * pmb = pmy_block_ ; int si , sj , sk , ei , ej , ek ; si = ( nb . ox1 > 0 ) ? ( pmb -> ie - NGHOST + 1 ) : pmb -> is ; ei = ( nb . ox1 < 0 ) ? ( pmb -> is + NGHOST - 1 ) : pmb -> ie ; sj = ( nb . ox2 > 0 ) ? ( pmb -> je - NGHOST + 1 ) : pmb -> js ; ej = ( nb . ox2 < 0 ) ? ( pmb -> js + NGHOST - 1 ) : pmb -> je ; sk = ( nb . ox3 > 0 ) ? ( pmb -> ke - NGHOST + 1 ) : pmb -> ks ; ek = ( nb . ox3 < 0 ) ? ( pmb -> ks + NGHOST - 1 ) : pmb -> ke ; int p = 0 ; BufferUtility :: Pack4DData ( src , buf , ns , ne , si , ei , sj , ej , sk , ek , p ) ; return p ; }
\fn int BoundaryValues::LoadCellCenteredBoundaryBufferSameLevel(AthenaArray<Real> &src,
int ns, int ne, Real *buf, const NeighborBlock& nb)
\brief Set hydro boundary buffers for sending to a block on the same level
\ fn int BoundaryValues :: LoadCellCenteredBoundaryBufferSameLevel ( AthenaArray<Real > &src int ns int ne Real * buf const NeighborBlock& nb ) \ brief Set hydro boundary buffers for sending to a block on the same level