Stores one Data object with related mesh.
More...
#include <DataContext.hpp>
Stores one Data object with related mesh.
- For each mapping that is added to the data context fromData and toData will be set correspondingly. Either fromData or toData must be equal to providedData. fromData and toData must be different.
- If a DataContext is not associated with a mapping, fromData and toData will be unset.
- A DataContext can be associated with multiple mappings, fromData and toData
Definition at line 29 of file DataContext.hpp.
◆ FromToDataIDs
◆ DataContext()
◆ appendMapping()
void precice::impl::DataContext::appendMapping |
( |
MappingContext | mappingContext | ) |
|
|
protected |
Helper to append a mappingContext, fromData and toData to the corresponding data containers.
- Parameters
-
- Note
- Only unique mappings may be appended. In case the same mapping is appended twice, an error is raised.
Definition at line 69 of file DataContext.cpp.
◆ appendMappingConfiguration()
virtual void precice::impl::DataContext::appendMappingConfiguration |
( |
MappingContext & | mappingContext, |
|
|
const MeshContext & | meshContext ) |
|
pure virtual |
◆ getDataDimensions()
int precice::impl::DataContext::getDataDimensions |
( |
| ) |
const |
Get the dimensions of _providedData.
- Returns
- int Dimensions of _providedData.
Definition at line 33 of file DataContext.cpp.
◆ getDataName()
std::string precice::impl::DataContext::getDataName |
( |
| ) |
const |
◆ getMeshID()
MeshID precice::impl::DataContext::getMeshID |
( |
| ) |
const |
Get the ID of _mesh.
- Returns
- int ID of _mesh.
Definition at line 57 of file DataContext.cpp.
◆ getMeshName()
std::string precice::impl::DataContext::getMeshName |
( |
| ) |
const |
◆ getMeshVertexCount()
int precice::impl::DataContext::getMeshVertexCount |
( |
| ) |
const |
|
protected |
Get the number of vertices of mesh.
- Returns
- int number of vertices
Definition at line 51 of file DataContext.cpp.
◆ getSpatialDimensions()
int precice::impl::DataContext::getSpatialDimensions |
( |
| ) |
const |
Get the spatial dimensions of _providedData.
- Returns
- int Spatial dimensions of _providedData.
Definition at line 39 of file DataContext.cpp.
◆ hasGradient()
bool precice::impl::DataContext::hasGradient |
( |
| ) |
const |
Returns whether _providedData has gradient.
- Returns
- true, if it has gradient
-
false, if it has gradient
Definition at line 63 of file DataContext.cpp.
◆ hasMapping()
bool precice::impl::DataContext::hasMapping |
( |
| ) |
const |
◆ hasReadMapping()
bool precice::impl::DataContext::hasReadMapping |
( |
| ) |
const |
|
protected |
◆ hasWriteMapping()
bool precice::impl::DataContext::hasWriteMapping |
( |
| ) |
const |
|
protected |
◆ isValidVertexID()
bool precice::impl::DataContext::isValidVertexID |
( |
const VertexID | id | ) |
const |
|
protected |
Returns true if the given vertexID is valid.
Definition at line 163 of file DataContext.cpp.
◆ locateInvalidVertexID()
template<typename Container >
◆ mapData()
int precice::impl::DataContext::mapData |
( |
std::optional< double > | after = std::nullopt, |
|
|
bool | skipZero = false ) |
Perform the mapping for mapping contexts and the corresponding data context (from and to data)
- Parameters
-
[in] | after | only map samples after this optional time |
[in] | skipZero | set output sample to zero if the input sample is zero too |
- Returns
- the number of performed mappings
Definition at line 90 of file DataContext.cpp.
◆ resetInitialGuesses()
void precice::impl::DataContext::resetInitialGuesses |
( |
| ) |
|
Resets initial guesses of transient mappings to zero.
Definition at line 26 of file DataContext.cpp.
◆ testing::DataContextFixture
◆ _initialGuesses
◆ _log
◆ _mappingContexts
◆ _mesh
Unique mesh associated with _providedData.
Definition at line 163 of file DataContext.hpp.
◆ _providedData
Unique data this context is associated with.
Definition at line 126 of file DataContext.hpp.
The documentation for this class was generated from the following files: