27 template <
unsigned Dim>
43 template <
unsigned Dim>
57 template <
unsigned Dim>
59 std::array<bool, Dim>
isParallel,
bool isAllPeriodic)
75 template <
unsigned Dim>
85 unsigned int nRanks = this->
comm.size();
93 throw std::runtime_error(
"SubFieldLayout:initialize: given subdomain is not valid, rank"
94 + std::to_string(this->
comm.rank()) +
" has an empty local domain, choose a sub-domain that has content on all ranks");
99 for (
unsigned int rank = 0; rank < nRanks; ++rank) {
100 if (!this->
gDomain_m.contains(this->hLocalDomains_m(rank))) {
119 template <
unsigned Dim>
121 bool isAllPeriodic) {
void findNeighbors(int nghost=1)
std::array< bool, Dim > isParallel() const
void initialize(const NDIndex< Dim > &domain, std::array< bool, Dim > decomp, bool isAllPeriodic=false)
view_type dLocalDomains_m
Local domains (device view).
FieldLayout(const mpi::Communicator &=MPI_COMM_WORLD)
host_mirror_type hLocalDomains_m
Local domains (host mirror view).
NDIndex_t gDomain_m
Global domain.
SubFieldLayout(const mpi::Communicator &=MPI_COMM_WORLD)
Default constructor, which should only be used if you are going to call 'initialize' soon after (befo...
NDIndex_t originDomain_m
Original global domain in which the sub-field is defined.
void initialize(const NDIndex< Dim > &domain, const NDIndex< Dim > &subDomain, std::array< bool, Dim > decomp, bool isAllPeriodic=false)
Initializes a SubFieldLayout with the sub-domain partitioned in the same way as the original FieldLay...
KOKKOS_INLINE_FUNCTION bool contains(const NDIndex< Dim > &a) const