12#include "parallel/CommunicationPartner.h"
19 friend class NeighbourCommunicationSchemeTest;
39 unsigned int stageNumber, MessageType msgType,
bool removeRecvDuplicates,
43 unsigned int stageNumber, MessageType msgType,
bool removeRecvDuplicates,
47 bool removeRecvDuplicates,
DomainDecompMPIBase* domainDecomp,
bool doHaloPositionCheck=
true) = 0;
49 void setCoverWholeDomain(
unsigned int d,
bool covers) {
53 virtual void initCommunicationPartners(
double cutoffRadius,
Domain * domain,
57 virtual std::vector<int> get3StageNeighbourRanks() = 0;
59 virtual std::vector<int> getFullShellNeighbourRanks() {
60 std::vector<int> neighbourRanks;
62 neighbourRanks.push_back(_fullShellNeighbour.getRank());
64 return neighbourRanks;
68 virtual size_t getDynamicSize() {
71 totSize +=
sizeof(*this);
75 totSize += neigh.getDynamicSize();
81 for (
auto& neigh : neighList) {
82 totSize += neigh.getDynamicSize();
90 void printCommunicationPartners(
std::string filename)
const;
92 void setSequentialFallback(
bool useSequentialFallback) {
93 _useSequentialFallback = useSequentialFallback;
102 std::vector<std::vector<CommunicationPartner>> *_haloExportForceImportNeighbours;
103 std::vector<std::vector<CommunicationPartner>> *_haloImportForceExportNeighbours;
104 std::vector<std::vector<CommunicationPartner>> *_leavingExportNeighbours;
105 std::vector<std::vector<CommunicationPartner>> *_leavingImportNeighbours;
107 void selectNeighbours(MessageType msgType,
bool import);
115 unsigned int _commDimms;
125 bool _useSequentialFallback{
true};
129 friend class NeighbourCommunicationSchemeTest;
135 void initCommunicationPartners(
double cutoffRadius,
Domain * domain,
139 std::vector<int> get3StageNeighbourRanks()
override {
140 std::vector<int> neighbourRanks;
142 if (i.isFaceCommunicator()) {
143 neighbourRanks.push_back(i.getRank());
146 return neighbourRanks;
150 unsigned int stageNumber, MessageType msgType,
bool removeRecvDuplicates,
154 unsigned int stageNumber, MessageType msgType,
bool removeRecvDuplicates,
158 bool removeRecvDuplicates,
DomainDecompMPIBase* domainDecomp,
bool doHaloPositionCheck=
true)
override;
167 void doDirectFallBackExchange(
const std::vector<HaloRegion>& haloRegions, MessageType msgType,
169 std::vector<Molecule>& invalidParticles,
bool doHaloPositionCheck);
173 friend class NeighbourCommunicationSchemeTest;
181 bool removeRecvDuplicates,
DomainDecompMPIBase* domainDecomp,
bool doHaloPositionCheck=
true)
override;
183 void initCommunicationPartners(
double cutoffRadius,
Domain * domain,
186 std::vector<int> get3StageNeighbourRanks()
override {
187 std::vector<int> neighbourRanks;
189 if (_fullShellNeighbour.isFaceCommunicator()) {
190 neighbourRanks.push_back(_fullShellNeighbour.getRank());
193 return neighbourRanks;
197 unsigned int stageNumber, MessageType msgType,
bool removeRecvDuplicates,
201 unsigned int stageNumber, MessageType msgType,
bool removeRecvDuplicates,
212 void convert1StageTo3StageNeighbours(
const std::vector<CommunicationPartner>& commPartners,
213 std::vector<std::vector<CommunicationPartner>>& neighbours,
HaloRegion& ownRegion,
double cutoffRadius);
Definition: CommunicationPartner.h:38
Definition: NeighbourCommunicationScheme.h:128
Definition: DomainDecompMPIBase.h:30
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Definition: NeighbourCommunicationScheme.h:172
Definition: NeighbourCommunicationScheme.h:18
std::vector< std::vector< CommunicationPartner > > * _neighbours
vector of neighbours. The first dimension should be of size getCommDims().
Definition: NeighbourCommunicationScheme.h:99
unsigned int getCommDims()
Definition: NeighbourCommunicationScheme.h:27
std::vector< CommunicationPartner > _fullShellNeighbours
list of all neighbours (non-squeezed)
Definition: NeighbourCommunicationScheme.h:121
ZonalMethod * _zonalMethod
zonal method (FullShell, HalfShell, ...)
Definition: NeighbourCommunicationScheme.h:118
bool _coversWholeDomain[3]
Definition: NeighbourCommunicationScheme.h:113
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Definition: ZonalMethod.h:14
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270
Definition: HaloRegion.h:10