MRMD 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
angle.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 "constants.hpp"
18#include "datatypes.hpp"
19
20namespace mrmd
21{
22namespace util
23{
27KOKKOS_INLINE_FUNCTION
28constexpr real_t degToRad(const real_t& grd) { return grd / 180_r * M_PI; }
29
33KOKKOS_INLINE_FUNCTION
34constexpr real_t radToDeg(const real_t& rad) { return rad / M_PI * 180_r; }
35
36} // namespace util
37} // namespace mrmd
KOKKOS_INLINE_FUNCTION constexpr real_t degToRad(const real_t &grd)
converts degree to radians
Definition angle.hpp:28
KOKKOS_INLINE_FUNCTION constexpr real_t radToDeg(const real_t &rad)
converts radians to degree
Definition angle.hpp:34
Definition BerendsenBarostat.cpp:18
double real_t
Definition datatypes.hpp:99