preCICE v3.1.2
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 {
10namespace impl {
11
18public:
26 mesh::PtrData data,
27 mesh::PtrMesh mesh);
28
34 int getWaveformDegree() const;
35
46 void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext) override;
47
55 void readValues(::precice::span<const VertexID> vertices, double time, ::precice::span<double> values) const;
56
58 ReadDataContext(const ReadDataContext &copy) = delete;
59
61 ReadDataContext &operator=(const ReadDataContext &assign) = delete;
62
66
71
77 void trimToDataAfterFor(const cplscheme::ImplicitData &from, double t);
78
79private:
81};
82
83} // namespace impl
84} // namespace precice
Stores one Data object with related mesh.
Stores one Data object with related mesh. Context stores data to be read from and potentially provide...
void trimToDataAfterFor(const cplscheme::ImplicitData &from, double t)
Trims all toData of associated mappings after the given t.
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 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:16
A C++ 11 implementation of the non-owning C++20 std::span type.
Definition span.hpp:284
Main namespace of the precice library.
static std::unique_ptr< precice::Participant > impl
Definition preciceC.cpp:21
Holds a data mapping and related information.
Stores a mesh and related objects and data.