182 std::array<double, 3> pos{1, 2, 3};
275 std::array<double, 3> pos{1, 2, 3};
276 BOOST_CHECK_EXCEPTION(p.setMeshVertex(
"", pos),
288 std::array<double, 3> pos{1, 2, 3};
289 BOOST_CHECK_EXCEPTION(p.setMeshVertex(
"FaceCenters", pos),
301 std::array<double, 3> pos{1, 2, 3};
302 BOOST_CHECK_EXCEPTION(p.setMeshVertex(
"MeshOno", pos),
314 std::array<double, 3> pos{1, 2, 3};
315 BOOST_CHECK_EXCEPTION(p.setMeshVertex(
"MeshOn", pos),
327 std::array<double, 3> pos{1, 2, 3};
328 BOOST_CHECK_EXCEPTION(p.setMeshVertex(
"MeshOnee", pos),
340 std::array<double, 0> pos{};
353 std::array<double, 3> pos{1, 2, 3};
367 std::array<double, 2> pos{std::numeric_limits<double>::infinity(), 2};
379 std::array<double, 2> pos{std::numeric_limits<double>::quiet_NaN(), 2};
395 std::array<double, 3> pos{1, 2, 3};
396 std::array<precice::VertexID, 1> vids;
397 BOOST_CHECK_EXCEPTION(p.setMeshVertices(
"", pos, vids),
409 std::array<double, 3> pos{1, 2, 3};
410 std::array<precice::VertexID, 1> vids;
411 BOOST_CHECK_EXCEPTION(p.setMeshVertices(
"FaceCenters", pos, vids),
423 std::array<double, 3> pos{1, 2, 3};
424 std::array<precice::VertexID, 1> vids;
425 BOOST_CHECK_EXCEPTION(p.setMeshVertices(
"MeshOno", pos, vids),
437 std::array<double, 3> pos{1, 2, 3};
438 std::array<precice::VertexID, 1> vids;
439 BOOST_CHECK_EXCEPTION(p.setMeshVertices(
"MeshOn", pos, vids),
451 std::array<double, 3> pos{1, 2, 3};
452 std::array<precice::VertexID, 1> vids;
453 BOOST_CHECK_EXCEPTION(p.setMeshVertices(
"MeshOnee", pos, vids),
465 std::array<double, 0> pos{};
466 std::array<precice::VertexID, 1> vids;
467 BOOST_CHECK_EXCEPTION(p.setMeshVertices(
"MeshOne", pos, vids),
479 std::array<double, 3> pos{1, 2, 3};
480 std::array<precice::VertexID, 2> vids;
493 std::array<double, 7> pos{1, 2, 3, 4, 5, 6, 7};
494 std::array<precice::VertexID, 3> vids;
508 std::array<double, 2> pos{std::numeric_limits<double>::infinity(), 2};
509 std::array<precice::VertexID, 1> vids;
511 BOOST_CHECK_NO_THROW(p.setMeshVertices(
"MeshOne", pos, vids));
521 std::array<double, 2> pos{std::numeric_limits<double>::quiet_NaN(), 2};
522 std::array<precice::VertexID, 1> vids;
524 BOOST_CHECK_NO_THROW(p.setMeshVertices(
"MeshOne", pos, vids));
538 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
539 std::array<precice::VertexID, 3> vids;
540 p.setMeshVertices(
"MeshTwo", pos, vids);
542 std::array<double, 3>
data{1.0, 2.0, 3.0};
543 BOOST_CHECK_EXCEPTION(p.writeData(
"CellCenters",
"DataTwo", vids, data),
555 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
556 std::array<precice::VertexID, 3> vids;
557 p.setMeshVertices(
"MeshTwo", pos, vids);
559 std::array<double, 3>
data{1.0, 2.0, 3.0};
560 BOOST_CHECK_EXCEPTION(p.writeData(
"MeshToo",
"DataTwo", vids, data),
572 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
573 std::array<precice::VertexID, 3> vids;
574 p.setMeshVertices(
"MeshTwo", pos, vids);
576 std::array<double, 3>
data{1.0, 2.0, 3.0};
577 BOOST_CHECK_EXCEPTION(p.writeData(
"MeshTwo",
"Temperature", vids, data),
589 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
590 std::array<precice::VertexID, 3> vids;
591 p.setMeshVertices(
"MeshTwo", pos, vids);
593 std::array<double, 3>
data{1.0, 2.0, 3.0};
594 BOOST_CHECK_EXCEPTION(p.writeData(
"MeshTwo",
"DataTwi", vids, data),
606 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
607 std::array<precice::VertexID, 3> vids;
608 p.setMeshVertices(
"MeshTwo", pos, vids);
610 std::array<double, 3>
data{1.0, 2.0, 3.0};
611 BOOST_CHECK_EXCEPTION(p.writeData(
"CellCenters",
"Temperature", vids, data),
623 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
624 std::array<precice::VertexID, 3> vids;
625 p.setMeshVertices(
"MeshTwo", pos, vids);
627 std::array<double, 3>
data{1.0, 2.0, 3.0};
628 BOOST_CHECK_EXCEPTION(p.writeData(
"MeshUne",
"DataToo", vids, data),
640 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
641 std::array<precice::VertexID, 3> vids;
644 std::array<double, 3> data{1.0, 2.0, 3.0};
646 BOOST_CHECK_NO_THROW(p.
writeData(
"MeshTwo",
"DataTwo", vids, data));
656 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
657 std::array<precice::VertexID, 3> vids;
660 std::array<double, 1> data{1.0};
661 BOOST_CHECK_EXCEPTION(p.
writeData(
"MeshTwo",
"DataTwo", vids, data),
673 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
674 std::array<precice::VertexID, 3> vids;
677 std::array<double, 4> data{1.0, 2.0, 3.0, 4.0};
678 BOOST_CHECK_EXCEPTION(p.
writeData(
"MeshTwo",
"DataTwo", vids, data),
690 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
691 std::array<precice::VertexID, 3> vids;
693 vids.back() = vids.front();
695 std::array<double, 3> data{1.0, 2.0, 3.0};
697 BOOST_CHECK_NO_THROW(p.
writeData(
"MeshTwo",
"DataTwo", vids, data));
707 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
708 std::array<precice::VertexID, 3> vids;
712 std::array<double, 3> data{1.0, 2.0, 3.0};
714 BOOST_CHECK_EXCEPTION(p.
writeData(
"MeshTwo",
"DataTwo", vids, data),
726 std::array<double, 10> pos{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
727 std::array<precice::VertexID, 5> vids;
729 std::fill_n(&vids[1], 3, 666);
731 std::array<double, 5> data{1.0, 2.0, 3.0, 4.0, 5.0};
733 BOOST_CHECK_EXCEPTION(p.
writeData(
"MeshTwo",
"DataTwo", vids, data),
745 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
746 std::array<precice::VertexID, 3> vids;
749 std::array<double, 3> data{std::numeric_limits<double>::quiet_NaN(), 2.0, 3.0};
751 BOOST_CHECK_NO_THROW(p.
writeData(
"MeshTwo",
"DataTwo", vids, data));
753 BOOST_CHECK_EXCEPTION(p.
writeData(
"MeshTwo",
"DataTwo", vids, data),
766 std::array<double, 6> pos{1, 2, 3, 4, 5, 6};
767 std::array<precice::VertexID, 3> vids;
770 std::array<double, 3> data{std::numeric_limits<double>::infinity(), 2.0, 3.0};
772 BOOST_CHECK_NO_THROW(p.
writeData(
"MeshTwo",
"DataTwo", vids, data));
774 BOOST_CHECK_EXCEPTION(p.
writeData(
"MeshTwo",
"DataTwo", vids, data),
791 std::array<precice::VertexID, 0> vids;
792 std::array<double, 0> data;
793 BOOST_CHECK_EXCEPTION(p.
readData(
"MeshTwo",
"DataTwo", vids, 0.0, data),
849 BOOST_CHECK_EXCEPTION(p.
resetMesh(
"MeshOne"),
BOOST_AUTO_TEST_CASE(testIQNIMVJPPWithSubsteps)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Main Application Programming Interface of preCICE. Include using #include <precice/precice....
int getDataDimensions(::precice::string_view meshName, ::precice::string_view dataName) const
Returns the spatial dimensionality of the given data on the given mesh.
VertexID setMeshVertex(::precice::string_view meshName, ::precice::span< const double > position)
Creates a mesh vertex.
void writeData(::precice::string_view meshName, ::precice::string_view dataName, ::precice::span< const VertexID > ids, ::precice::span< const double > values)
Writes data to a mesh.
void setMeshVertices(::precice::string_view meshName, ::precice::span< const double > coordinates, ::precice::span< VertexID > ids)
Creates multiple mesh vertices.
double getMaxTimeStepSize() const
Get the maximum allowed time step size of the current window.
bool requiresMeshConnectivityFor(::precice::string_view meshName) const
Checks if the given mesh requires connectivity.
int getMeshDimensions(::precice::string_view meshName) const
Returns the spatial dimensionality of the given mesh.
void readData(::precice::string_view meshName, ::precice::string_view dataName, ::precice::span< const VertexID > ids, double relativeReadTime, ::precice::span< double > values) const
Reads data values from a mesh. Values correspond to a given point in time relative to the beginning o...
void resetMesh(::precice::string_view meshName)
Removes all vertices and connectivity information from the mesh.
constexpr auto data(C &c) -> decltype(c.data())
std::string getPathToSources()
Returns the base path to the sources.
ErrorPredicate errorContains(std::string_view substring)
Checks if the message of a given precice::Error contains a substring.