31 ptrFromMesh->
createVertex(Eigen::Vector3d(0.0, 0.0, 0.0));
32 ptrFromMesh->
createVertex(Eigen::Vector3d(1.0, 0.0, 0.0));
33 ptrFromMesh->
createVertex(Eigen::Vector3d(0.0, 0.0, 1.0));
44 toMeshContext.
mesh = ptrToMesh;
52 BOOST_TEST(ptrToData->getID() != ptrFromData->getID());
53 BOOST_TEST(ptrToMesh->
getID() != ptrFromMesh->
getID());
63 BOOST_TEST(fixture.
getFromDataID(dataContext, 0) == ptrFromData->getID());
64 BOOST_TEST(fixture.
getToDataID(dataContext, 0) == ptrToData->getID());
88 ptrFromMesh->
createVertex(Eigen::Vector3d(0.0, 0.0, 0.0));
89 ptrFromMesh->
createVertex(Eigen::Vector3d(1.0, 0.0, 0.0));
90 ptrFromMesh->
createVertex(Eigen::Vector3d(0.0, 0.0, 1.0));
101 toMeshContext1.
mesh = ptrToMesh;
109 BOOST_TEST(ptrToData->getID() != ptrFromData->getID());
110 BOOST_TEST(ptrToMesh->
getID() != ptrFromMesh->
getID());
124 ptrToMesh2->
createVertex(Eigen::Vector3d(0.0, 1.1, 0.0));
125 ptrToMesh2->
createVertex(Eigen::Vector3d(2.0, 1.1, 0.0));
126 ptrToMesh2->
createVertex(Eigen::Vector3d(0.0, 2.1, 4.0));
129 toMeshContext2.
mesh = ptrToMesh2;
147 BOOST_TEST(fixture.
getFromDataID(dataContext, 0) == ptrFromData->getID());
148 BOOST_TEST(fixture.
getToDataID(dataContext, 0) == ptrToData->getID());
159 BOOST_TEST(fixture.
getFromDataID(dataContext, 1) == ptrFromData->getID());
160 BOOST_TEST(fixture.
getToDataID(dataContext, 1) == ptrToData2->getID());
175 int dataDimensions = 1;
186 BOOST_TEST(ids[0] == 0);
187 BOOST_TEST(ids[1] == 1);
188 BOOST_TEST(ids[2] == 2);
191 for (
int i = 0; i < nValues; i++) {
208 BOOST_TEST(ids[3] == 3);
226 ptrToMesh->
createVertex(Eigen::Vector3d(0.0, 0.0, 0.0));
227 ptrToMesh->
createVertex(Eigen::Vector3d(1.0, 0.0, 0.0));
228 ptrToMesh->
createVertex(Eigen::Vector3d(0.0, 0.0, 1.0));
234 ptrFromMesh->
createVertex(Eigen::Vector3d(0.0, 0.1, 0.0));
235 ptrFromMesh->
createVertex(Eigen::Vector3d(1.0, 0.1, 0.0));
236 ptrFromMesh->
createVertex(Eigen::Vector3d(0.0, 0.1, 1.0));
239 fromMeshContext.
mesh = ptrFromMesh;
247 BOOST_TEST(ptrToData->getID() != ptrFromData->getID());
248 BOOST_TEST(ptrToMesh->
getID() != ptrFromMesh->
getID());
260 BOOST_TEST(fixture.
getFromDataID(dataContext, 0) == ptrFromData->getID());
261 BOOST_TEST(fixture.
getToDataID(dataContext, 0) == ptrToData->getID());
PtrData & createData(const std::string &name, int dimension, DataID id, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Create only data for vertex.
Stores one Data object with related mesh. Context stores data to be read from and potentially provide...
void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext) override
Adds a MappingContext and the MeshContext required by the read mapping to the corresponding ReadDataC...
Stores one Data object with related mesh. Context stores data to be written to and potentially provid...
void resizeBufferTo(int size)
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...
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)
Holds a data mapping and related information.
mapping::PtrMapping mapping
Data mapping.
MeshID fromMeshID
id of mesh from which is mapped
MeshID toMeshID
id of mesh to which is mapped
Stores a mesh and related objects and data.
mesh::PtrMesh mesh
Mesh holding the geometry data structure.