preCICE v3.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TimeGrids.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include <numeric>
5#include <vector>
6
10#include "logging/Logger.hpp"
11#include "utils/assertion.hpp"
12
13namespace precice::time {
14
21class TimeGrids {
22public:
25
33 TimeGrids(const DataMap &cplData, std::vector<int> dataIDs, bool reduced);
34
35 Eigen::VectorXd getTimeGridAfter(int dataID, double time) const;
36
37 // Linearly transforms the time grid from the old time window [t_{N-1}, t_N] to the new time window [t_N, t_{N+1}]
38 // This is done to allow the QN methods to sample from the new time window while keeping the structure and vector dimensions inside the QN method
39 void moveTimeGridToNewWindow(const DataMap &cplData);
40
41private:
42 logging::Logger _log{"acceleration::WaveformTimeGrids"};
43
47};
48
49} // namespace precice::time
This class provides a lightweight logger.
Definition Logger.hpp:17
Interface for storing the time grids in the Quasi-Newton and Aitken methods. A time grid is a ordered...
Definition TimeGrids.hpp:21
Eigen::VectorXd getTimeGridAfter(int dataID, double time) const
Definition TimeGrids.cpp:23
TimeGrids(const DataMap &cplData, std::vector< int > dataIDs, bool reduced)
saves the current time grid of the couplig data
Definition TimeGrids.cpp:11
logging::Logger _log
Definition TimeGrids.hpp:42
std::map< int, Eigen::VectorXd > _timeGrids
List of the time grid to which all the data will be interpolated to Stored in a map,...
Definition TimeGrids.hpp:46
void moveTimeGridToNewWindow(const DataMap &cplData)
Definition TimeGrids.cpp:37
contains the time interpolation logic.
Definition Sample.hpp:8