MRMD 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
interpolation.hpp
Go to the documentation of this file.
1// Copyright 2024 Sebastian Eibl
2// Copyright 2026 Julian Friedrich Hille
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// https://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <limits>
19
22
23namespace mrmd
24{
25namespace util
26{
34KOKKOS_INLINE_FUNCTION
35real_t lerp(const real_t& left, const real_t& right, const real_t& factor)
36{
37 return left + (right - left) * factor;
38}
39
48void updateInterpolate(const data::MultiHistogram& target, const data::MultiHistogram& input);
49
50} // namespace util
51} // namespace mrmd
KOKKOS_INLINE_FUNCTION real_t lerp(const real_t &left, const real_t &right, const real_t &factor)
Linear interpolation between two values.
Definition interpolation.hpp:35
void updateInterpolate(const data::MultiHistogram &target, const data::MultiHistogram &input)
Linear interpolation of data contained in input MultiHistogram onto grid of target histogram,...
Definition interpolation.cpp:22
Definition BerendsenBarostat.cpp:18
double real_t
Definition datatypes.hpp:99
Definition MultiHistogram.hpp:30