ls1-MarDyn
ls1-MarDyn molecular dynamics code
NeighborAcquirer.h
Go to the documentation of this file.
1
7#pragma once
8#include <vector>
9#include <array>
10#include "CommunicationPartner.h"
11
12class Domain;
13class HaloRegion;
14
16public:
31 static std::tuple<std::vector<CommunicationPartner>, std::vector<CommunicationPartner>> acquireNeighbors(
32 const std::array<double, 3>& globalDomainLength, HaloRegion* ownRegion, std::vector<HaloRegion>& desiredRegions,
33 const MPI_Comm& comm, bool excludeOwnRank=true);
34
35 static std::vector<CommunicationPartner> squeezePartners(const std::vector<CommunicationPartner>& partners);
36
37private:
38 static bool isIncluded(HaloRegion* myRegion, HaloRegion* inQuestion);
39
40 static HaloRegion overlap(const HaloRegion& myRegion, const HaloRegion& inQuestion);
41
51 static std::pair<std::vector<HaloRegion>, std::vector<std::array<double, 3>>> getPotentiallyShiftedRegions(
52 const std::array<double, 3>& domainLength, const HaloRegion& region);
53
54 friend class NeighborAcquirerTest;
55};
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Definition: NeighborAcquirer.h:15
static std::tuple< std::vector< CommunicationPartner >, std::vector< CommunicationPartner > > acquireNeighbors(const std::array< double, 3 > &globalDomainLength, HaloRegion *ownRegion, std::vector< HaloRegion > &desiredRegions, const MPI_Comm &comm, bool excludeOwnRank=true)
Definition: NeighborAcquirer.cpp:20
Definition: HaloRegion.h:10