MRMD 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
EnergyAndVirialReducer.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
17namespace mrmd::data
18{
36} // namespace mrmd::data
37
38namespace Kokkos
39{ // reduction identity must be defined in Kokkos namespace
40template <>
41struct reduction_identity<mrmd::data::EnergyAndVirialReducer>
42{
43 KOKKOS_FORCEINLINE_FUNCTION static mrmd::data::EnergyAndVirialReducer sum()
44 {
46 }
47};
48} // namespace Kokkos
Definition SPC.hpp:46
Definition Array.hpp:18
Definition BerendsenBarostat.cpp:18
double real_t
Definition datatypes.hpp:99
static KOKKOS_FORCEINLINE_FUNCTION mrmd::data::EnergyAndVirialReducer sum()
Definition EnergyAndVirialReducer.hpp:43
Definition Array.hpp:21
Definition EnergyAndVirialReducer.hpp:20
EnergyAndVirialReducer(const EnergyAndVirialReducer &rhs)=default
real_t virial
Definition EnergyAndVirialReducer.hpp:22
real_t energy
Definition EnergyAndVirialReducer.hpp:21
EnergyAndVirialReducer & operator=(const EnergyAndVirialReducer &rhs)=default
KOKKOS_INLINE_FUNCTION EnergyAndVirialReducer & operator+=(const EnergyAndVirialReducer &src)
Definition EnergyAndVirialReducer.hpp:29