Multi Resolution Molecular Dynamics 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
28KOKKOS_INLINE_FUNCTION bool isInATRegion(const real_t& lambda)
29{
30 return lambda >= (1_r - REGION_CHECK_EPSILON);
31}
32
33KOKKOS_INLINE_FUNCTION bool isInCGRegion(const real_t& lambda)
34{
35 return lambda <= REGION_CHECK_EPSILON;
36}
37
38KOKKOS_INLINE_FUNCTION bool isInHYRegion(const real_t& lambda)
39{
40 return !isInATRegion(lambda) && !isInCGRegion(lambda);
41}
42
43} // namespace weighting_function
44} // namespace mrmd
Weighting functions for different interfaces and region geometries.
constexpr real_t REGION_CHECK_EPSILON
Definition CheckRegion.hpp:25
KOKKOS_INLINE_FUNCTION bool isInCGRegion(const real_t &lambda)
Helper function to check if lambda belongs to the coarse grained region.
Definition CheckRegion.hpp:33
KOKKOS_INLINE_FUNCTION bool isInHYRegion(const real_t &lambda)
Helper function to check if lambda belongs to the hybrid region.
Definition CheckRegion.hpp:38
KOKKOS_INLINE_FUNCTION bool isInATRegion(const real_t &lambda)
Helper function to check if lambda belongs to the atomistic region.
Definition CheckRegion.hpp:28
Top-level namespace of MRMD.
double real_t
Definition datatypes.hpp:99