72 PRECICE_TEST(
"Participant0"_on(1_rank),
"Participant1"_on(1_rank), Require::Events);
75 auto m2n = context.connectPrimaryRanks(
"Participant0",
"Participant1", options);
83 dataConfig->addData(
"Data0", mesh::Data::typeName::SCALAR);
84 dataConfig->addData(
"Data1", mesh::Data::typeName::VECTOR);
88 const auto dataID0 = mesh->createData(
"Data0", 1, 0_dataID)->getID();
89 const auto dataID1 = mesh->createData(
"Data1", 3, 1_dataID)->getID();
90 mesh->createVertex(Eigen::Vector3d::Zero());
91 mesh->allocateDataValues();
97 int maxTimeWindows = 3;
98 const double timeWindowSize = 0.1;
99 const double timeStepSize = timeWindowSize;
102 int sendDataIndex = -1;
103 int receiveDataIndex = -1;
104 bool dataRequiresInitialization =
false;
105 if (context.isNamed(nameParticipant0)) {
106 sendDataIndex = dataID0;
107 receiveDataIndex = dataID1;
108 dataRequiresInitialization =
true;
110 sendDataIndex = dataID1;
111 receiveDataIndex = dataID0;
112 dataRequiresInitialization =
true;
116 const int minIterations = 1;
117 const int maxIterations = 3;
118 ParallelCouplingScheme cplScheme(maxTime, maxTimeWindows, timeWindowSize, nameParticipant0, nameParticipant1, context.name, m2n,
constants::FIXED_TIME_WINDOW_SIZE,
BaseCouplingScheme::Implicit, minIterations, maxIterations);
121 cplScheme.
addDataToSend(mesh->data(sendDataIndex), mesh, dataRequiresInitialization,
true);
122 CouplingData *sendCouplingData = Fixture::getSendData(cplScheme, sendDataIndex);
123 cplScheme.
addDataToReceive(mesh->data(receiveDataIndex), mesh, dataRequiresInitialization,
true);
124 CouplingData *receiveCouplingData = Fixture::getReceiveData(cplScheme, receiveDataIndex);
127 if (context.isNamed(nameParticipant0)) {
129 BOOST_TEST(receiveCouplingData->
values().size() == 3);
131 BOOST_TEST(sendCouplingData->
values().size() == 1);
132 BOOST_TEST(Fixture::isImplicitCouplingScheme(cplScheme));
133 BOOST_TEST(cplScheme.
isActionRequired(CouplingScheme::Action::InitializeData));
160 BOOST_TEST(context.isNamed(nameParticipant1));
161 BOOST_TEST(cplScheme.
isActionRequired(CouplingScheme::Action::InitializeData));
162 Eigen::VectorXd v(3);
167 BOOST_TEST(receiveCouplingData->
values().size() == 1);
169 BOOST_TEST(sendCouplingData->
values().size() == 3);
Tightly coupled to the parameters of Participant()