31 auto m2n = context.connectPrimaryRanks(
"A",
"B");
33 for (
int dim = 2; dim <= 3; dim++) {
42 auto &comm = *
m2n->getPrimaryRankCommunication();
44 if (context.isNamed(
"A")) {
49 recvMesh.
createVertex(Eigen::VectorXd::Constant(dim, 9));
53 BOOST_TEST(recvMesh.
vertex(1) == v0);
54 BOOST_TEST(recvMesh.
vertex(2) == v1);
55 BOOST_TEST(recvMesh.
vertex(3) == v2);
56 BOOST_TEST(recvMesh.
edges().
at(0) == e0);
57 BOOST_TEST(recvMesh.
edges().
at(1) == e1);
58 BOOST_TEST(recvMesh.
edges().
at(2) == e2);
67 auto m2n = context.connectPrimaryRanks(
"A",
"B");
80 auto &comm = *
m2n->getPrimaryRankCommunication();
82 if (context.isNamed(
"A")) {
87 recvMesh.createVertex(Eigen::VectorXd::Constant(dim, 9));
89 BOOST_TEST(recvMesh.nVertices() == 4);
90 BOOST_TEST(
testing::equals(recvMesh.vertex(0).getCoords(), Eigen::VectorXd::Constant(dim, 9)));
91 BOOST_TEST(recvMesh.vertex(1) == v0);
92 BOOST_TEST(recvMesh.vertex(2) == v1);
93 BOOST_TEST(recvMesh.vertex(3) == v2);
94 BOOST_TEST(recvMesh.edges().at(0) == e0);
95 BOOST_TEST(recvMesh.edges().at(1) == e1);
96 BOOST_TEST(recvMesh.edges().at(2) == e2);
98 BOOST_TEST(recvMesh.triangles().at(0) == t0);
120 if (context.isPrimary()) {
125 recvMesh.
createVertex(Eigen::VectorXd::Constant(dim, 9));
129 BOOST_TEST(recvMesh.
vertex(1) == v0);
130 BOOST_TEST(recvMesh.
vertex(2) == v1);
131 BOOST_TEST(recvMesh.
vertex(3) == v2);
132 BOOST_TEST(recvMesh.
edges().
at(0) == e0);
133 BOOST_TEST(recvMesh.
edges().
at(1) == e1);
134 BOOST_TEST(recvMesh.
edges().
at(2) == e2);
143 auto m2n = context.connectPrimaryRanks(
"A",
"B");
155 auto &comm = *
m2n->getPrimaryRankCommunication();
157 if (context.isNamed(
"A")) {
162 recvMesh.createVertex(Eigen::VectorXd::Constant(dim, 9));
164 BOOST_TEST(recvMesh.nVertices() == 5);
165 BOOST_TEST(
testing::equals(recvMesh.vertex(0).getCoords(), Eigen::VectorXd::Constant(dim, 9)));
166 BOOST_TEST(recvMesh.tetrahedra().size() == 1);
167 BOOST_TEST(
testing::equals(recvMesh.tetrahedra()[0].vertex(0).getCoords(), Eigen::Vector3d{0.0, 0.0, 0.0}));
168 BOOST_TEST(recvMesh.tetrahedra()[0] == t0);
189 if (context.isPrimary()) {
194 recvMesh.createVertex(Eigen::VectorXd::Constant(dim, 9));
196 BOOST_TEST(recvMesh.nVertices() == 5);
197 BOOST_TEST(
testing::equals(recvMesh.vertex(0).getCoords(), Eigen::VectorXd::Constant(dim, 9)));
198 BOOST_TEST(recvMesh.tetrahedra().size() == 1);
199 BOOST_TEST(
testing::equals(recvMesh.tetrahedra()[0].vertex(0).getCoords(), Eigen::Vector3d{0.0, 0.0, 0.0}));
200 BOOST_TEST(recvMesh.tetrahedra()[0] == t0);
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.
Linear edge of a mesh, defined by two Vertex objects.
Container and creator for meshes.
std::size_t nVertices() const
Returns the number of vertices.
Vertex & vertex(VertexID id)
Mutable access to a vertex by VertexID.
TriangleContainer & triangles()
Returns modifiable container holding all triangles.
Vertex & createVertex(const Eigen::Ref< const Eigen::VectorXd > &coords)
Creates and initializes a Vertex object.
EdgeContainer & edges()
Returns modifiable container holding all edges.
Tetrahedron of a mesh, defined by 4 vertices.
Triangle of a mesh, defined by three vertices.
Eigen::VectorXd getCoords() const
Returns the coordinates of the vertex.
static com::PtrCommunication & getCommunication()
Intra-participant communication.
contains the data communication abstraction layer.
void sendMesh(Communication &communication, int rankReceiver, const mesh::Mesh &mesh)
void broadcastSendMesh(Communication &communication, const mesh::Mesh &mesh)
void broadcastReceiveMesh(Communication &communication, mesh::Mesh &mesh)
void receiveMesh(Communication &communication, int rankSender, mesh::Mesh &mesh)
contains the logic of the parallel communication between participants.
provides Mesh, Data and primitives.
@ Events
Require to initialize Event.
boost::test_tools::predicate_result equals(const std::vector< float > &VectorA, const std::vector< float > &VectorB, float tolerance)
equals to be used in tests. Compares two std::vectors using a given tolerance. Prints both operands o...
Main namespace of the precice library.