preCICE v3.1.1
Loading...
Searching...
No Matches
WriteDataContext.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
5#include "DataContext.hpp"
6#include "logging/Logger.hpp"
7#include "time/Sample.hpp"
8
9namespace precice {
10namespace impl {
11
18public:
26 mesh::PtrData data,
27 mesh::PtrMesh mesh);
28
30 void resetBuffer();
31
37 void trimAfter(double time);
38
46
54
55 void resizeBufferTo(int size);
56
62 void storeBufferedData(double currentTime);
63
72 void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext) override;
73
75 WriteDataContext(const WriteDataContext &copy) = delete;
76
79
83
84private:
86
89};
90
91} // namespace impl
92} // namespace precice
Stores one Data object with related mesh.
Stores one Data object with related mesh. Context stores data to be written to and potentially provid...
void trimAfter(double time)
Removes stample before time and (if mapping exists) fromData or toData.
time::Sample _writeDataBuffer
Buffer to store written data until it is copied to _providedData->timeStepsStorage()
void writeGradientsIntoDataBuffer(::precice::span< const VertexID > vertices, ::precice::span< const double > gradients)
Store gradients in _writeDataBuffer.
WriteDataContext(const WriteDataContext &copy)=delete
Disable copy construction.
WriteDataContext(WriteDataContext &&)=default
Move constructor, use the implicitly declared.
void storeBufferedData(double currentTime)
Store data from _writeDataBuffer in persistent storage.
void resetBuffer()
Resets writeDataBuffer.
WriteDataContext & operator=(WriteDataContext &&)=default
WriteDataContext & operator=(const WriteDataContext &assign)=delete
Disable assignment construction.
WriteDataContext(mesh::PtrData data, mesh::PtrMesh mesh)
Construct a new WriteDataContext object without a mapping.
void writeValuesIntoDataBuffer(::precice::span< const VertexID > vertices, ::precice::span< const double > values)
Store values in _writeDataBuffer.
void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext) override
Adds a MappingContext and the MeshContext required by the write mapping to the corresponding WriteDat...
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.