|
IPPL (Independent Parallel Particle Layer)
IPPL
|
#include <HaloCells.h>
Classes | |
| struct | assign |
| struct | lhs_plus_assign |
| struct | rhs_plus_assign |
Public Types | |
| enum | SendOrder { HALO_TO_INTERNAL , INTERNAL_TO_HALO , HALO_TO_INTERNAL_NOGHOST } |
| using | view_type = typename detail::ViewType<T, Dim, ViewArgs...>::view_type |
| using | Layout_t = FieldLayout<Dim> |
| using | bound_type = typename Layout_t::bound_type |
| using | databuffer_type = FieldBufferData<T, ViewArgs...> |
Public Member Functions | |
| HaloCells () | |
| void | accumulateHalo (view_type &view, Layout_t *layout) |
| void | accumulateHalo_noghost (view_type &view, Layout_t *layout, int nghost) |
| void | fillHalo (view_type &, Layout_t *layout) |
| void | pack (const bound_type &range, const view_type &view, databuffer_type &fd, size_type &nsends) |
| template<typename Op> | |
| void | unpack (const bound_type &range, const view_type &view, databuffer_type &fd) |
| template<typename Op> | |
| void | applyPeriodicSerialDim (view_type &view, const Layout_t *layout, const int nghost) |
Private Member Functions | |
| template<class Op> | |
| void | exchangeBoundaries (view_type &view, Layout_t *layout, SendOrder order, int nghost=1) |
| auto | makeSubview (const view_type &view, const bound_type &intersect) |
Private Attributes | |
| databuffer_type | haloData_m |
Definition at line 39 of file HaloCells.h.
| using ippl::detail::HaloCells< T, Dim, ViewArgs >::bound_type = typename Layout_t::bound_type |
Definition at line 43 of file HaloCells.h.
| using ippl::detail::HaloCells< T, Dim, ViewArgs >::databuffer_type = FieldBufferData<T, ViewArgs...> |
Definition at line 44 of file HaloCells.h.
| using ippl::detail::HaloCells< T, Dim, ViewArgs >::Layout_t = FieldLayout<Dim> |
Definition at line 42 of file HaloCells.h.
| using ippl::detail::HaloCells< T, Dim, ViewArgs >::view_type = typename detail::ViewType<T, Dim, ViewArgs...>::view_type |
Definition at line 41 of file HaloCells.h.
| enum ippl::detail::HaloCells::SendOrder |
| Enumerator | |
|---|---|
| HALO_TO_INTERNAL | |
| INTERNAL_TO_HALO | |
| HALO_TO_INTERNAL_NOGHOST | |
Definition at line 46 of file HaloCells.h.
| ippl::detail::HaloCells< T, Dim, ViewArgs >::HaloCells | ( | ) |
Definition at line 16 of file HaloCells.hpp.
| void ippl::detail::HaloCells< T, Dim, ViewArgs >::accumulateHalo | ( | view_type & | view, |
| Layout_t * | layout ) |
Send halo data to internal cells. This operation uses assign_plus functor to assign the data.
| view | the original field data |
| layout | the field layout storing the domain decomposition |
Definition at line 19 of file HaloCells.hpp.
References exchangeBoundaries(), and HALO_TO_INTERNAL.
| void ippl::detail::HaloCells< T, Dim, ViewArgs >::accumulateHalo_noghost | ( | view_type & | view, |
| Layout_t * | layout, | ||
| int | nghost ) |
Send halo data to internal cells for only the physical cells along that dimension. The halo cells on the corners are not sent. This operation uses assign_plus functor to assign the data.
| view | the original field data |
| layout | the field layout storing the domain decomposition |
| nghost | the number of ghost cells |
Definition at line 24 of file HaloCells.hpp.
References exchangeBoundaries(), and HALO_TO_INTERNAL_NOGHOST.
| void ippl::detail::HaloCells< T, Dim, ViewArgs >::applyPeriodicSerialDim | ( | view_type & | view, |
| const Layout_t * | layout, | ||
| const int | nghost ) |
Apply all periodic boundary conditions for the serial dimensions. Used in case of both fillHalo and accumulateHalo with the help of operator as template parameter.
Definition at line 234 of file HaloCells.hpp.
References ippl::apply(), ippl::FieldLayout< Dim >::comm, ippl::createRangePolicy(), Dim, ippl::FieldLayout< Dim >::getDomain(), ippl::FieldLayout< Dim >::getHostLocalDomains(), ippl::parallel_for(), and ippl::mpi::Communicator::rank().
|
private |
Exchange the data of halo cells.
| view | is the original field data |
| layout | the field layout storing the domain decomposition |
| order | the data send orientation |
| Op | the data assigment operator of the unpack function call |
Definition at line 34 of file HaloCells.hpp.
References ippl::Comm, ippl::FieldLayout< Dim >::comm, ippl::detail::countHypercubes(), Dim, ippl::FieldLayout< Dim >::getDomain(), ippl::FieldLayout< Dim >::getHostLocalDomains(), ippl::FieldLayout< Dim >::getLocalNDIndex(), ippl::FieldLayout< Dim >::getMatchingIndex(), ippl::FieldLayout< Dim >::getNeighbors(), ippl::FieldLayout< Dim >::getNeighborsRecvRange(), ippl::FieldLayout< Dim >::getNeighborsSendRange(), ippl::mpi::tag::HALO, HALO_TO_INTERNAL_NOGHOST, haloData_m, INTERNAL_TO_HALO, ippl::detail::isUpper(), ippl::max, ippl::min(), pack(), and unpack().
Referenced by accumulateHalo(), accumulateHalo_noghost(), and fillHalo().
| void ippl::detail::HaloCells< T, Dim, ViewArgs >::fillHalo | ( | view_type & | view, |
| Layout_t * | layout ) |
Send interal data to halo cells. This operation uses assign functor to assign the data.
| view | the original field data |
| layout | the field layout storing the domain decomposition |
Definition at line 28 of file HaloCells.hpp.
References exchangeBoundaries(), and INTERNAL_TO_HALO.
|
private |
Extract the subview of the original data. This does not copy. A subview points to the same memory.
| view | is the original field data |
| intersect | the bounds of the intersection |
Definition at line 223 of file HaloCells.hpp.
Referenced by pack(), and unpack().
| void ippl::detail::HaloCells< T, Dim, ViewArgs >::pack | ( | const bound_type & | range, |
| const view_type & | view, | ||
| databuffer_type & | fd, | ||
| size_type & | nsends ) |
Pack the field data to be sent into a contiguous array.
| range | the bounds of the subdomain to be sent |
| view | the original view |
| fd | the buffer to pack into |
Definition at line 158 of file HaloCells.hpp.
References ippl::apply(), ippl::detail::FieldBufferData< T, ViewArgs >::buffer, ippl::Comm, Dim, ippl::getRangePolicy(), makeSubview(), and ippl::parallel_for().
| void ippl::detail::HaloCells< T, Dim, ViewArgs >::unpack | ( | const bound_type & | range, |
| const view_type & | view, | ||
| databuffer_type & | fd ) |
Unpack the received field data and assign it.
| range | the bounds of the subdomain to be received |
| view | the original view |
| fd | the buffer to unpack from (received data) |
| Op | the data assigment operator |
Definition at line 193 of file HaloCells.hpp.
References ippl::apply(), ippl::detail::FieldBufferData< T, ViewArgs >::buffer, Dim, ippl::getRangePolicy(), makeSubview(), and ippl::parallel_for().
|
private |
Definition at line 152 of file HaloCells.h.
Referenced by exchangeBoundaries().