Multi Resolution Molecular Dynamics 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
GhostExchange.hpp
Go to the documentation of this file.
1// Copyright 2024 Sebastian Eibl
2// Copyright 2026 Julian Friedrich Hille
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// https://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include "data/Atoms.hpp"
19#include "data/Subdomain.hpp"
20#include "datatypes.hpp"
21#include "util/Kokkos_grow.hpp"
22
23namespace mrmd
24{
25namespace communication
26{
27namespace impl
28{
32class GhostExchange
33{
34private:
38 Kokkos::View<idx_t* [2]> atomsToCommunicateAll_;
39
41 Kokkos::View<idx_t[2]> numberOfAtomsToCommunicate_;
42
44 IndexView correspondingRealAtom_;
45
46public:
47 IndexView createGhostAtoms(data::Atoms& atoms,
48 const data::Subdomain& subdomain,
49 const AXIS& axis);
50
51 IndexView createGhostAtomsXYZ(data::Atoms& atoms, const data::Subdomain& subdomain);
52
53 void resetCorrespondingRealAtoms(data::Atoms& atoms);
54
55 GhostExchange(const idx_t& initialSize = 100);
56};
57
58} // namespace impl
59} // namespace communication
60} // namespace mrmd
Everything related to ghost particles and periodic boundary conditions.
DeviceAtoms Atoms
Definition Atoms.hpp:177
Top-level namespace of MRMD.
Kokkos::View< idx_t * > IndexView
Definition datatypes.hpp:153
int64_t idx_t
Definition datatypes.hpp:91
AXIS
Definition datatypes.hpp:141