34 PtrData data = mesh->createData(
"test-data", 1, 0_dataID);
35 int dataID = data->getID();
36 Vertex &v0 = mesh->createVertex(Eigen::Vector2d(0.0, 0.0));
37 Vertex &v1 = mesh->createVertex(Eigen::Vector2d(1.0, 0.0));
38 Vertex &v2 = mesh->createVertex(Eigen::Vector2d(1.0, 1.0));
39 mesh->createEdge(v0, v1);
40 mesh->createEdge(v1, v2);
41 mesh->allocateDataValues();
46 const auto &values = data->values();
47 BOOST_TEST(values(0) == 2.0);
48 BOOST_TEST(values(1) == 3.0);
49 BOOST_TEST(values(2) == 4.0);
53 action::ScaleByAreaAction::WRITE_MAPPING_POST, dataID, mesh,
58 BOOST_TEST(values(0) == 4.0);
59 BOOST_TEST(values(1) == 3.0);
60 BOOST_TEST(values(2) == 8.0);
68 PtrData data = mesh->createData(
"test-data", 1, 0_dataID);
69 int dataID = data->getID();
70 Vertex &v0 = mesh->createVertex(Eigen::Vector3d(0.0, 0.0, 0.0));
71 Vertex &v1 = mesh->createVertex(Eigen::Vector3d(6.0, 2.0, 0.0));
72 Vertex &v2 = mesh->createVertex(Eigen::Vector3d(0.0, 2.0, 0.0));
73 Vertex &v3 = mesh->createVertex(Eigen::Vector3d(0.0, 0.0, 3.0));
74 Vertex &v4 = mesh->createVertex(Eigen::Vector3d(2.0, 0.0, 3.0));
75 Edge & e0 = mesh->createEdge(v0, v1);
76 Edge & e1 = mesh->createEdge(v1, v2);
77 Edge & e2 = mesh->createEdge(v0, v2);
78 Edge & e3 = mesh->createEdge(v2, v3);
79 Edge & e4 = mesh->createEdge(v0, v3);
80 Edge & e5 = mesh->createEdge(v0, v4);
81 Edge & e6 = mesh->createEdge(v3, v4);
82 mesh->createTriangle(e0, e1, e2);
83 mesh->createTriangle(e2, e3, e4);
84 mesh->createTriangle(e4, e5, e6);
85 mesh->allocateDataValues();
87 v << 2.0, 3.0, 6.0, 5.0, 6.0;
90 const auto &values = data->values();
91 BOOST_TEST(values(0) == 2.0);
92 BOOST_TEST(values(1) == 3.0);
93 BOOST_TEST(values(2) == 6.0);
94 BOOST_TEST(values(3) == 5.0);
95 BOOST_TEST(values(4) == 6.0);
99 action::ScaleByAreaAction::WRITE_MAPPING_POST, dataID, mesh,
104 BOOST_TEST(values(0) == 0.5);
105 BOOST_TEST(values(1) == 1.5);
106 BOOST_TEST(values(2) == 2.0);
107 BOOST_TEST(values(3) == 2.5);
108 BOOST_TEST(values(4) == 6.0);
void configure(XMLTag &tag, const precice::xml::ConfigurationContext &context, std::string_view configurationFilename)
Configures the given configuration from file configurationFilename.
Tightly coupled to the parameters of Participant()