preCICE v3.2.0
|
#include <MappingDataCache.hpp>
Public Member Functions | |
MappingDataCache (int dataDim) | |
Constructor. | |
int | getDataDimensions () const |
Returns the number of data components. | |
bool | hasDataAtTimeStamp (double time) const |
Check, if the current data vector (in inData or the std::vectors) hold data of time time . | |
void | setTimeStamp (double time) |
Set the timestamp of the MappingDataCache to the specified time. | |
void | resetTimeStamp () |
Reset the time stamp associated with the data. | |
void | resetData () |
Reset all data containers to zero. | |
Public Attributes | |
time::Stample | inData |
std::vector< Eigen::MatrixXd > | polynomialContributions |
std::vector< Eigen::MatrixXd > | p |
Struct to store temporary data structures tied to a specific Mapping-Data pair. The usual implementations from 'Mapping' have no notion about the data they are operating on. One mapping might even be responsible for multiple read or write data, which are sequentially processed one after another in the ParticipantImpl.
The Cache here was added in the context of just-in-time data mappings. Fundamentally, a just-in-time mapping can also be responsible for multiple read and write data. However, the just-in-time mapping was specifically designed for particle-mesh coupling, where a particle solver provides coordinates just-in-time for the mapping. If now each particle solver calls a just-in-time read or write data call, then we would need to perform the full time interpolation and mapping evaluation for each API function call. The cache here allows to store temporary data we can reuse across multiple just-in-time API calls to preserve computational efficiency. In the most basic configuration scenarios (NN mapping), the cache simply holds the latest time interpolant to prevent repeated time interpolation for each function call. For more advanced mappings (PUM), the mapping stores intermediate basis-function coefficients of the resulting from the last time interpolant. The cache data always holds time-specific data for all data sites.
Note that the MappingDataCache mostly provides the memory and data structures. All data structures are filled within the configured mapping class. Particularly relevant are
Definition at line 44 of file MappingDataCache.hpp.
|
inlineexplicit |
Constructor.
Definition at line 84 of file MappingDataCache.hpp.
|
inline |
Returns the number of data components.
Definition at line 89 of file MappingDataCache.hpp.
|
inline |
Check, if the current data vector (in inData
or the std::vectors) hold data of time time
.
Definition at line 94 of file MappingDataCache.hpp.
|
inline |
Reset all data containers to zero.
Definition at line 110 of file MappingDataCache.hpp.
|
inline |
Reset the time stamp associated with the data.
Definition at line 104 of file MappingDataCache.hpp.
|
inline |
Set the timestamp of the MappingDataCache to the specified time.
Definition at line 99 of file MappingDataCache.hpp.
time::Stample precice::mapping::impl::MappingDataCache::inData |
Definition at line 52 of file MappingDataCache.hpp.
std::vector<Eigen::MatrixXd> precice::mapping::impl::MappingDataCache::p |
Definition at line 65 of file MappingDataCache.hpp.
std::vector<Eigen::MatrixXd> precice::mapping::impl::MappingDataCache::polynomialContributions |
Definition at line 62 of file MappingDataCache.hpp.