preCICE v3.1.2
Loading...
Searching...
No Matches
SocketCommunicationTest.cpp
Go to the documentation of this file.
1#include <vector>
5#include "math/constants.hpp"
7#include "testing/Testing.hpp"
8
9using namespace precice;
10using namespace precice::com;
11
12BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(std::vector<int>)
13
14BOOST_AUTO_TEST_SUITE(CommunicationTests)
15
17
19
20BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
21{
22 PRECICE_TEST(2_ranks, Require::Events);
24 TestSendAndReceivePrimitiveTypes<SocketCommunication>(context);
25}
26
27BOOST_AUTO_TEST_CASE(SendReceiveRanges)
28{
29 PRECICE_TEST(2_ranks, Require::Events);
31 TestSendAndReceiveRanges<SocketCommunication>(context);
32}
33
34BOOST_AUTO_TEST_CASE(SendReceiveEigen)
35{
36 PRECICE_TEST(2_ranks, Require::Events);
38 TestSendAndReceiveEigen<SocketCommunication>(context);
39}
40
41BOOST_AUTO_TEST_CASE(BroadcastPrimitives)
42{
43 PRECICE_TEST(2_ranks, Require::Events);
45 TestBroadcastPrimitiveTypes<SocketCommunication>(context);
46}
47
48BOOST_AUTO_TEST_CASE(BroadcastVectors)
49{
50 PRECICE_TEST(2_ranks, Require::Events);
52 TestBroadcastVectors<SocketCommunication>(context);
53}
54
55BOOST_AUTO_TEST_CASE(ReducePrimitives)
56{
57 PRECICE_TEST(2_ranks, Require::Events);
59 TestReducePrimitiveTypes<SocketCommunication>(context);
60}
61
63{
64 PRECICE_TEST(2_ranks, Require::Events);
66 TestReduceVectors<SocketCommunication>(context);
67}
68
70
72
73BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
74{
75 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
77 TestSendAndReceivePrimitiveTypes<SocketCommunication>(context);
78}
79
80BOOST_AUTO_TEST_CASE(SendReceiveEigen)
81{
82 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
84 TestSendAndReceiveEigen<SocketCommunication>(context);
85}
86
87BOOST_AUTO_TEST_CASE(SendReceiveRanges)
88{
89 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
91 TestSendAndReceiveRanges<SocketCommunication>(context);
92}
93
94BOOST_AUTO_TEST_CASE(BroadcastPrimitives)
95{
96 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
98 TestBroadcastPrimitiveTypes<SocketCommunication>(context);
99}
100
101BOOST_AUTO_TEST_CASE(BroadcastVectors)
102{
103 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
105 TestBroadcastVectors<SocketCommunication>(context);
106}
107
108BOOST_AUTO_TEST_CASE(ReducePrimitives)
109{
110 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
112 TestReducePrimitiveTypes<SocketCommunication>(context);
113}
114
115BOOST_AUTO_TEST_CASE(ReduceVectors)
116{
117 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
119 TestReduceVectors<SocketCommunication>(context);
120}
121
122BOOST_AUTO_TEST_CASE(SendReceiveFourProcesses)
123{
124 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
126 TestSendReceiveFourProcesses<SocketCommunication>(context);
127}
128
130
132
133BOOST_AUTO_TEST_CASE(SendReceiveTwo)
134{
135 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
137 TestSendReceiveTwoProcessesServerClient<SocketCommunication>(context);
138}
139
140BOOST_AUTO_TEST_CASE(SendReceiveFour)
141{
142 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
144 TestSendReceiveFourProcessesServerClient<SocketCommunication>(context);
145}
146
147BOOST_AUTO_TEST_CASE(SendReceiveFourV2)
148{
149 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
151 TestSendReceiveFourProcessesServerClientV2<SocketCommunication>(context);
152}
153
155
157BOOST_AUTO_TEST_SUITE_END() // Communication
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
#define PRECICE_TEST(...)
Definition Testing.hpp:27
contains the data communication abstraction layer.
Main namespace of the precice library.