MRMD 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
CheckRegion.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#include "util/math.hpp"
20
21namespace mrmd
22{
23namespace weighting_function
24{
26
27KOKKOS_INLINE_FUNCTION bool isInATRegion(const real_t& lambda)
28{
29 return lambda >= (1_r - REGION_CHECK_EPSILON);
30}
31KOKKOS_INLINE_FUNCTION bool isInCGRegion(const real_t& lambda)
32{
33 return lambda <= REGION_CHECK_EPSILON;
34}
35KOKKOS_INLINE_FUNCTION bool isInHYRegion(const real_t& lambda)
36{
37 return !isInATRegion(lambda) && !isInCGRegion(lambda);
38}
39
40} // namespace weighting_function
41} // namespace mrmd
constexpr real_t REGION_CHECK_EPSILON
Definition CheckRegion.hpp:25
KOKKOS_INLINE_FUNCTION bool isInCGRegion(const real_t &lambda)
Definition CheckRegion.hpp:31
KOKKOS_INLINE_FUNCTION bool isInHYRegion(const real_t &lambda)
Definition CheckRegion.hpp:35
KOKKOS_INLINE_FUNCTION bool isInATRegion(const real_t &lambda)
Definition CheckRegion.hpp:27
Definition BerendsenBarostat.cpp:18
double real_t
Definition datatypes.hpp:99