ls1-MarDyn
ls1-MarDyn molecular dynamics code
HalfShell.h
1/*
2 * CommunicationScheme.h
3 *
4 * Created on: 14.07.2017
5 * Author: sauermann
6 */
7
8#pragma once
9
10#include "ZonalMethod.h"
11
21class HalfShell: public ZonalMethod {
22public:
23 HalfShell() = default;
24 ~~HalfShell() override = default;
25
26 std::vector<HaloRegion> getHaloImportForceExportRegions(HaloRegion& initialRegion, double cutoffRadius,
27 bool coversWholeDomain[3], double cellLength[3]) override {
28 auto condition = [](const int d[3])->bool {
29 // Here, we cannot directly apply the stencil from the HS traversal, as for multiple cells also the
30 // other directions are needed. Visualize: Apply the stencil in the z-direction for the lowest cell.
31 return d[2] >= 0;
32 };
33 return getHaloRegionsConditional(initialRegion, cutoffRadius, coversWholeDomain, condition);
34 }
35
36 std::vector<HaloRegion> getHaloExportForceImportRegions(HaloRegion& initialRegion, double cutoffRadius,
37 bool coversWholeDomain[3], double cellLength[3]) override {
38 auto condition = [](const int d[3])->bool {
39 // Here, we cannot directly apply the stencil from the HS traversal, as for multiple cells also the
40 // other directions are needed. Visualize: Apply the stencil in the z-direction for the lowest cell.
41 return d[2] <= 0;
42 };
43 return getHaloRegionsConditionalInside(initialRegion, cutoffRadius, coversWholeDomain, condition);
44 }
45};
46
Definition: HalfShell.h:21
std::vector< HaloRegion > getHaloImportForceExportRegions(HaloRegion &initialRegion, double cutoffRadius, bool coversWholeDomain[3], double cellLength[3]) override
Definition: HalfShell.h:26
std::vector< HaloRegion > getHaloExportForceImportRegions(HaloRegion &initialRegion, double cutoffRadius, bool coversWholeDomain[3], double cellLength[3]) override
Definition: HalfShell.h:36
Definition: ZonalMethod.h:14
std::vector< HaloRegion > getHaloRegionsConditionalInside(HaloRegion &initialRegion, double cutoffRadius, bool coversWholeDomain[3], const std::function< bool(const int[3])> &condition)
Definition: ZonalMethod.cpp:132
std::vector< HaloRegion > getHaloRegionsConditional(HaloRegion &initialRegion, double cutoffRadius, bool coversWholeDomain[3], const std::function< bool(const int[3])> &condition)
Definition: ZonalMethod.cpp:76
Definition: HaloRegion.h:10