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