preCICE
v3.1.2
Loading...
Searching...
No Matches
src
time
Waveform.cpp
Go to the documentation of this file.
1
#include <
algorithm
>
2
3
#include "
cplscheme/CouplingScheme.hpp
"
4
#include "
logging/LogMacros.hpp
"
5
#include "
math/differences.hpp
"
6
#include "
mesh/Data.hpp
"
7
#include "
time/Waveform.hpp
"
8
9
namespace
precice::time
{
10
11
Waveform::Waveform
(
const
int
degree)
12
{
13
_timeStepsStorage
.
setInterpolationDegree
(degree);
14
}
15
16
time::Storage
&
Waveform::timeStepsStorage
()
17
{
18
return
_timeStepsStorage
;
19
}
20
21
const
time::Storage
&
Waveform::timeStepsStorage
()
const
22
{
23
return
_timeStepsStorage
;
24
}
25
26
Eigen::VectorXd
Waveform::sample
(
double
time)
const
27
{
28
return
_timeStepsStorage
.
sample
(time);
29
}
30
}
// namespace precice::time
CouplingScheme.hpp
Data.hpp
LogMacros.hpp
Waveform.hpp
algorithm
precice::time::Storage
Definition
Storage.hpp:12
precice::time::Storage::sample
Eigen::VectorXd sample(double time) const
Need to use interpolation for the case with changing time grids.
Definition
Storage.cpp:191
precice::time::Storage::setInterpolationDegree
void setInterpolationDegree(int interpolationDegree)
Definition
Storage.cpp:52
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
differences.hpp
precice::time
contains the time interpolation logic.
Definition
Sample.hpp:6