preCICE v3.2.0
Loading...
Searching...
No Matches
ReadDataContext.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
5#include "DataContext.hpp"
7#include "logging/Logger.hpp"
8
9namespace precice::impl {
10
17public:
25 mesh::PtrData data,
27
33 int getWaveformDegree() const;
34
45 void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext) override;
46
55
67 void mapAndReadValues(::precice::span<const double> coordinates, double readTime, ::precice::span<double> values);
68
70 bool hasSamples() const;
71
73 ReadDataContext(const ReadDataContext &copy) = delete;
74
76 ReadDataContext &operator=(const ReadDataContext &assign) = delete;
77
81
86
92 void trimToDataAfterFor(const cplscheme::ImplicitData &from, double t);
93
94private:
96};
97
98} // namespace precice::impl
DataContext(mesh::PtrData data, mesh::PtrMesh mesh)
Construct a new DataContext without a mapping. Protected, because only ReadDataContext and WriteDataC...
void trimToDataAfterFor(const cplscheme::ImplicitData &from, double t)
Trims all toData of associated mappings after the given t.
bool hasSamples() const
Are there samples to read from?
ReadDataContext(const ReadDataContext &copy)=delete
Disable copy construction.
ReadDataContext & operator=(ReadDataContext &&)=default
int getWaveformDegree() const
Gets degree of waveform.
ReadDataContext(mesh::PtrData data, mesh::PtrMesh mesh)
Construct a new ReadDataContext object without a mapping.
void readValues(::precice::span< const VertexID > vertices, double time, ::precice::span< double > values) const
Samples data at a given point in time within the current time window for given indices.
void clearToDataFor(const cplscheme::ImplicitData &from)
Removes all toData samples from mappings.
ReadDataContext(ReadDataContext &&)=default
Move constructor, use the implicitly declared.
void mapAndReadValues(::precice::span< const double > coordinates, double readTime, ::precice::span< double > values)
Forwards the just-in-time mapping API call for reading data to the data context.
void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext) override
Adds a MappingContext and the MeshContext required by the read mapping to the corresponding ReadDataC...
ReadDataContext & operator=(const ReadDataContext &assign)=delete
Disable assignment construction.
This class provides a lightweight logger.
Definition Logger.hpp:17
A C++ 11 implementation of the non-owning C++20 std::span type.
Definition span.hpp:284
provides Mesh, Data and primitives.
std::shared_ptr< Data > PtrData
std::shared_ptr< Mesh > PtrMesh
contains the time interpolation logic.
Definition Sample.hpp:8
Holds a data mapping and related information.
Stores a mesh and related objects and data.