1#include <boost/range.hpp>
23 for (
const auto &stample : other.
stamples()) {
50 existingSample->sample =
sample;
97 PRECICE_ASSERT(
nTimes() >= 2,
"Calling Waveform::move() is only allowed, if there is a sample at the beginning and at the end. This ensures that this function is only called at the end of the window.",
getTimes());
163 auto stample = std::find_if(
_stampleStorage.begin(),
_stampleStorage.end(), [&before](
const auto &s) { return math::greaterEquals(s.timestamp, before); });
165 return stample->sample;
171 auto times = Eigen::VectorXd(
nTimes());
172 for (
int i = 0; i < times.size(); i++) {
191 auto times = Eigen::VectorXd(
nTimes());
193 for (
int i = 0; i < times.size(); i++) {
197 return std::make_pair(times, values);
205 if (usedDegree == 0) {
214 return stample.sample.values;
224 _bspline.emplace(times, values, usedDegree);
234 if (usedDegree == 0) {
238 PRECICE_WARN(
"You specified interpolation degree of {}, but only degree 0 is supported for gradient interpolation", usedDegree);
244 return std::min(requestedDegree, numberOfAvailableSamples - 1);
#define PRECICE_WARN(...)
#define PRECICE_TRACE(...)
#define PRECICE_ASSERT(...)
static const int MIN_WAVEFORM_DEGREE
The minimum required interpolation degree.
constexpr bool equals(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares two Eigen::MatrixBase for equality up to tolerance.
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type smallerEquals(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type smaller(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type greater(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
contains the time interpolation logic.
Eigen::MatrixXd gradients
The gradients of the data. Use gradients.col(d*i+k) to get the gradient of vertex i,...
Stample containing timestampled Sample.