preCICE v3.1.1
Loading...
Searching...
No Matches
Waveform.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include "logging/Logger.hpp"
6#include "time/Storage.hpp"
7
8namespace precice {
9
10namespace testing {
11// Forward declaration to friend the boost test struct
12class WaveformFixture;
13} // namespace testing
14
15namespace time {
16// @todo Refactor Waveform class. Move sample function inside of Storage::sample
25class Waveform {
26 friend class testing::WaveformFixture; // Make the fixture friend of this class
27public:
33 Waveform(const int degree);
34
37
39 const time::Storage &timeStepsStorage() const;
40
42 auto stamples() const
43 {
45 }
46
55 Eigen::VectorXd sample(const double time) const;
56
57private:
60
61 mutable logging::Logger _log{"time::Waveform"};
62};
63
64} // namespace time
65} // namespace precice
This class provides a lightweight logger.
Definition Logger.hpp:16
auto stamples() const
Get the stamples.
Definition Storage.hpp:75
Allows to perform interpolation on samples in storage of given data.
Definition Waveform.hpp:25
auto stamples() const
Returns a the stamples from _timeStepsStorage.
Definition Waveform.hpp:42
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
Eigen::VectorXd sample(const double time) const
Evaluate waveform at specific point in time. Uses interpolation if necessary.
Definition Waveform.cpp:26
time::Storage & timeStepsStorage()
Returns a reference to the _timeStepsStorage.
Definition Waveform.cpp:16
logging::Logger _log
Definition Waveform.hpp:61
Main namespace of the precice library.
T time(T... args)