preCICE v3.2.0
Loading...
Searching...
No Matches
Waveform.cpp
Go to the documentation of this file.
1#include <algorithm>
2
6#include "mesh/Data.hpp"
7#include "time/Waveform.hpp"
8
9namespace precice::time {
10
11Waveform::Waveform(const int degree)
12{
13 _timeStepsStorage.setInterpolationDegree(degree);
14}
15
20
25
27{
28 return _timeStepsStorage.sample(time);
29}
30} // namespace precice::time
time::Storage _timeStepsStorage
Stores time steps in the current time window.
Definition Waveform.hpp:59
Waveform(const int degree)
Waveform object which stores values of current and past time windows for performing interpolation.
Definition Waveform.cpp:11
time::Storage & timeStepsStorage()
Returns a reference to the _timeStepsStorage.
Definition Waveform.cpp:16
SampleResult sample(const double time) const
Evaluate waveform at specific point in time. Uses interpolation if necessary.
Definition Waveform.cpp:26
contains the time interpolation logic.
Definition Sample.hpp:8