MRMD
0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
GhostLayer.hpp
Go to the documentation of this file.
1
// Copyright 2024 Sebastian Eibl
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#pragma once
16
17
#include "
communication/AccumulateForce.hpp
"
18
#include "
communication/GhostExchange.hpp
"
19
#include "
communication/PeriodicMapping.hpp
"
20
#include "
communication/UpdateGhostAtoms.hpp
"
21
#include "
data/Atoms.hpp
"
22
#include "
data/Subdomain.hpp
"
23
24
namespace
mrmd
25
{
26
namespace
communication
27
{
28
class
GhostLayer
29
{
30
private
:
31
IndexView
correspondingRealAtom_;
32
impl::GhostExchange
ghostExchange_;
33
34
public
:
35
void
exchangeRealAtoms
(
data::Atoms
& atoms,
const
data::Subdomain
& subdomain)
36
{
37
impl::PeriodicMapping::mapIntoDomain
(atoms, subdomain);
38
}
39
40
void
createGhostAtoms
(
data::Atoms
& atoms,
const
data::Subdomain
& subdomain)
41
{
42
correspondingRealAtom_ = ghostExchange_.
createGhostAtomsXYZ
(atoms, subdomain);
43
}
44
45
void
updateGhostAtoms
(
data::Atoms
& atoms,
const
data::Subdomain
& subdomain)
46
{
47
assert(correspondingRealAtom_.extent(0) >= atoms.
size
());
48
49
impl::UpdateGhostAtoms::updateOnlyPos
(atoms, correspondingRealAtom_, subdomain);
50
}
51
52
void
contributeBackGhostToReal
(
data::Atoms
& atoms)
53
{
54
impl::AccumulateForce::ghostToReal
(atoms, correspondingRealAtom_);
55
}
56
};
57
58
}
// namespace communication
59
}
// namespace mrmd
AccumulateForce.hpp
Atoms.hpp
GhostExchange.hpp
PeriodicMapping.hpp
Subdomain.hpp
UpdateGhostAtoms.hpp
mrmd::communication::GhostLayer
Definition
GhostLayer.hpp:29
mrmd::communication::GhostLayer::createGhostAtoms
void createGhostAtoms(data::Atoms &atoms, const data::Subdomain &subdomain)
Definition
GhostLayer.hpp:40
mrmd::communication::GhostLayer::updateGhostAtoms
void updateGhostAtoms(data::Atoms &atoms, const data::Subdomain &subdomain)
Definition
GhostLayer.hpp:45
mrmd::communication::GhostLayer::exchangeRealAtoms
void exchangeRealAtoms(data::Atoms &atoms, const data::Subdomain &subdomain)
Definition
GhostLayer.hpp:35
mrmd::communication::GhostLayer::contributeBackGhostToReal
void contributeBackGhostToReal(data::Atoms &atoms)
Definition
GhostLayer.hpp:52
mrmd::communication::impl::GhostExchange
Definition
GhostExchange.hpp:29
mrmd::communication::impl::GhostExchange::createGhostAtomsXYZ
IndexView createGhostAtomsXYZ(data::Atoms &atoms, const data::Subdomain &subdomain)
Definition
GhostExchange.cpp:171
mrmd::data::impl::GeneralAtoms
Data structure for storing information about atoms on the host and the device.
Definition
Atoms.hpp:35
mrmd::data::impl::GeneralAtoms::size
KOKKOS_INLINE_FUNCTION auto size() const
Definition
Atoms.hpp:85
mrmd::communication::impl::AccumulateForce::ghostToReal
void ghostToReal(data::Atoms &atoms, const IndexView &correspondingRealAtom)
Definition
AccumulateForce.cpp:25
mrmd::communication::impl::PeriodicMapping::mapIntoDomain
void mapIntoDomain(data::Atoms &atoms, const data::Subdomain &subdomain)
Definition
PeriodicMapping.cpp:30
mrmd::communication::impl::UpdateGhostAtoms::updateOnlyPos
void updateOnlyPos(data::Atoms &atoms, const IndexView &correspondingRealAtom, const data::Subdomain &subdomain)
Definition
UpdateGhostAtoms.cpp:31
mrmd
Definition
BerendsenBarostat.cpp:18
mrmd::IndexView
Kokkos::View< idx_t * > IndexView
Definition
datatypes.hpp:153
mrmd::data::Subdomain
|X|O|OOOOOOOOOO |X|O|OOOOOOOOOO |X|O+-------— <– minInnerCorner |X|OOOOOOOOOOOO |X+---------— <– minC...
Definition
Subdomain.hpp:38
mrmd
communication
GhostLayer.hpp
Generated by
1.9.8