preCICE v3.1.2
Loading...
Searching...
No Matches
DataContextFixture.cpp
Go to the documentation of this file.
2
3namespace precice::testing {
4
9
11{
12 return dataContext._providedData->getID();
13}
14
16{
17 return dataContext._mappingContexts[dataVectorIndex].fromData->getID();
18}
19
20int DataContextFixture::getToDataID(precice::impl::DataContext &dataContext, int dataVectorIndex)
21{
22 return dataContext._mappingContexts[dataVectorIndex].toData->getID();
23}
24
26{
27 return dataContext.hasMapping();
28}
29
31{
32 return dataContext.hasReadMapping();
33}
34
36{
37 return dataContext.hasWriteMapping();
38}
39
40} // namespace precice::testing
Stores one Data object with related mesh.
bool hasWriteMapping() const
Informs the user whether this DataContext has any write mapping.
bool hasMapping() const
Informs the user whether this DataContext has any _mappingContext.
bool hasReadMapping() const
Informs the user whether this DataContext has any read mapping.
mesh::PtrData _providedData
Unique data this context is associated with.
std::vector< MappingContext > _mappingContexts
Defines all mappings associated to this DataContext. A DataContext may also exist without a mapping.
int getToDataID(precice::impl::DataContext &dataContext, int dataVectorIndex)
int getProvidedDataID(precice::impl::DataContext &dataContext)
bool hasReadMapping(precice::impl::DataContext &dataContext)
int getFromDataID(precice::impl::DataContext &dataContext, int dataVectorIndex)
bool hasWriteMapping(precice::impl::DataContext &dataContext)
bool hasMapping(precice::impl::DataContext &dataContext)
std::vector< impl::MappingContext > mappingContexts(precice::impl::DataContext &dataContext)
contains the testing framework.
Definition helper.hpp:9