1#include <boost/test/unit_test_log.hpp>
29 Eigen::MatrixXd &result_local,
30 Eigen::MatrixXd &reference_global,
32 bool partitionedRowWise)
34 for (
int i = 0; i < result_local.rows(); i++) {
35 for (
int j = 0; j < result_local.cols(); j++) {
36 if (partitionedRowWise) {
37 BOOST_TEST(
testing::equals(result_local(i, j), reference_global(i + offset, j)),
38 "Failed: (" << i + offset <<
", " << j <<
") result, reference:" << result_local(i, j) <<
", " << reference_global(i + offset, j));
40 BOOST_TEST(
testing::equals(result_local(i, j), reference_global(i, j + offset)),
41 "Failed: (" << i <<
", " << j + offset <<
") result, reference:" << result_local(i, j) <<
", " << reference_global(i, j + offset));
57 Eigen::VectorXd vec1(n_global);
58 Eigen::VectorXd vec2(n_global);
61 vec1 << 0.422885689100085,
73 vec2 << 2.104516338543882,
86 if (context.isPrimary()) {
89 }
else if (context.isRank(1)) {
92 }
else if (context.isRank(2)) {
96 BOOST_REQUIRE(context.isRank(3));
108 int ires1 = 0, ires2 = 0;
118 BOOST_TEST(ires2 == 10);
125 BOOST_TEST(ires1 == 10);
129 Eigen::VectorXd vec1_local(n_local);
130 Eigen::VectorXd vec2_local(n_local);
133 int off = vertexOffsets.at(context.rank);
134 for (
int i = 0; i < n_local; i++) {
135 vec1_local(i) = vec1(i + off);
136 vec2_local(i) = vec2(i + off);
158 int n_global = 10, m_global = 5;
163 Eigen::MatrixXd W_global(n_global, m_global);
164 Eigen::MatrixXd J_global(n_global, n_global);
165 Eigen::MatrixXd Z_global(m_global, n_global);
166 Eigen::MatrixXd WZ_global(n_global, n_global);
167 Eigen::MatrixXd JW_global(n_global, m_global);
168 Eigen::MatrixXd res_global(n_global, 1);
169 Eigen::MatrixXd Jres_global(n_global, 1);
171 J_global << 0.162182308193243, 0.450541598502498, 0.106652770180584, 0.431413827463545, 0.853031117721894, 0.417267069084370, 0.780252068321138, 0.234779913372406, 0.547008892286345, 0.929385970968730,
172 0.794284540683907, 0.083821377996933, 0.961898080855054, 0.910647594429523, 0.622055131485066, 0.049654430325742, 0.389738836961253, 0.353158571222071, 0.296320805607773, 0.775712678608402,
173 0.311215042044805, 0.228976968716819, 0.004634224134067, 0.181847028302852, 0.350952380892271, 0.902716109915281, 0.241691285913833, 0.821194040197959, 0.744692807074156, 0.486791632403172,
174 0.528533135506213, 0.913337361501670, 0.774910464711502, 0.263802916521990, 0.513249539867053, 0.944787189721646, 0.403912145588115, 0.015403437651555, 0.188955015032545, 0.435858588580919,
175 0.165648729499781, 0.152378018969223, 0.817303220653433, 0.145538980384717, 0.401808033751942, 0.490864092468080, 0.096454525168389, 0.043023801657808, 0.686775433365315, 0.446783749429806,
176 0.601981941401637, 0.825816977489547, 0.868694705363510, 0.136068558708664, 0.075966691690842, 0.489252638400019, 0.131973292606335, 0.168990029462704, 0.183511155737270, 0.306349472016557,
177 0.262971284540144, 0.538342435260057, 0.084435845510910, 0.869292207640089, 0.239916153553658, 0.337719409821377, 0.942050590775485, 0.649115474956452, 0.368484596490336, 0.508508655381127,
178 0.654079098476782, 0.996134716626885, 0.399782649098896, 0.579704587365570, 0.123318934835166, 0.900053846417662, 0.956134540229802, 0.731722385658670, 0.625618560729690, 0.510771564172110,
179 0.689214503140008, 0.078175528753184, 0.259870402850654, 0.549860201836332, 0.183907788282417, 0.369246781120215, 0.575208595078466, 0.647745963136307, 0.780227435151377, 0.817627708322262,
180 0.748151592823709, 0.442678269775446, 0.800068480224308, 0.144954798223727, 0.239952525664903, 0.111202755293787, 0.059779542947156, 0.450923706430945, 0.081125768865785, 0.794831416883453;
182 Z_global << 0.644318130193692, 0.939001561999887, 0.207742292733028, 0.194764289567049, 0.311102286650413, 0.979748378356085, 0.594896074008614, 0.117417650855806, 0.085515797090044, 0.730330862855453,
183 0.378609382660268, 0.875942811492984, 0.301246330279491, 0.225921780972399, 0.923379642103244, 0.438869973126103, 0.262211747780845, 0.296675873218327, 0.262482234698333, 0.488608973803579,
184 0.811580458282477, 0.550156342898422, 0.470923348517591, 0.170708047147859, 0.430207391329584, 0.111119223440599, 0.602843089382083, 0.318778301925882, 0.801014622769739, 0.578525061023439,
185 0.532825588799455, 0.622475086001227, 0.230488160211558, 0.227664297816554, 0.184816320124136, 0.258064695912067, 0.711215780433683, 0.424166759713807, 0.029220277562146, 0.237283579771521,
186 0.350727103576883, 0.587044704531417, 0.844308792695389, 0.435698684103899, 0.904880968679893, 0.408719846112552, 0.221746734017240, 0.507858284661118, 0.928854139478045, 0.458848828179931;
188 W_global << 0.963088539286913, 0.037738866239552, 0.106761861607241, 0.030540946304637, 0.182922469414914,
189 0.546805718738968, 0.885168008202475, 0.653757348668560, 0.744074260367462, 0.239932010568717,
190 0.521135830804001, 0.913286827639239, 0.494173936639270, 0.500022435590201, 0.886511933076101,
191 0.231594386708524, 0.796183873585212, 0.779051723231275, 0.479922141146060, 0.028674152464106,
192 0.488897743920167, 0.098712278655574, 0.715037078400694, 0.904722238067363, 0.489901388512224,
193 0.624060088173690, 0.261871183870716, 0.903720560556316, 0.609866648422558, 0.167927145682257,
194 0.679135540865748, 0.335356839962797, 0.890922504330789, 0.617666389588455, 0.978680649641159,
195 0.395515215668593, 0.679727951377338, 0.334163052737496, 0.859442305646212, 0.712694471678914,
196 0.367436648544477, 0.136553137355370, 0.698745832334794, 0.805489424529686, 0.500471624154843,
197 0.987982003161633, 0.721227498581740, 0.197809826685929, 0.576721515614685, 0.471088374541939;
199 WZ_global << 0.801898401838153, 1.122529091861272, 0.423201945415435, 0.300978558234156, 0.551563616222783, 1.054655768517680, 0.709477478632269, 0.264166315674375, 0.348583586200086, 0.874757870918319,
200 1.698638905064191, 2.252495235306823, 1.062194901100270, 0.692015805803183, 1.623336848442643, 1.286934957259726, 1.533908621128989, 0.972679319556613, 1.047374497419335, 1.496714260553646,
201 1.659966647284183, 2.392880960790855, 1.479843373796984, 0.892278843543251, 2.112634376079842, 1.457681533373469, 1.399610510316321, 1.151987966448499, 1.518178535932093, 1.638155802609954,
202 1.348697901510644, 1.659051863989714, 0.789659275602735, 0.479726420963902, 1.257027472012560, 0.798463699122210, 1.163875903906441, 0.729876025630416, 0.893478486537412, 1.135898804351492,
203 1.586570049108119, 1.789685309000292, 1.090184919236369, 0.659006002219424, 1.161370228579310, 1.035482281126420, 1.499868794445182, 0.947182660718915, 1.121957022950641, 1.258422095146877,
204 1.618531220549951, 1.790772713269325, 0.916463926569826, 0.546989894699598, 1.089407693306137, 1.052790194022541, 1.455702372306257, 0.783021389674577, 1.019797210461514, 1.328312461070188,
205 1.959962169636355, 2.380620645499870, 1.630339868211612, 0.927153862633654, 1.903968068499247, 1.470962702535233, 1.685349366051057, 1.222266173248617, 1.786843939598552, 1.770901564449963,
206 1.491283328084721, 2.103999079781337, 1.244121457180890, 0.793826284013736, 1.698194683860993, 1.236033609893653, 1.384257591822518, 1.081117931366570, 1.167011155147404, 1.345250416067541,
207 1.460249196277507, 1.644252093240875, 1.054732358743229, 0.623131414603751, 1.142741229794316, 0.909989695162785, 1.359481290557063, 0.902231079036841, 1.115371804173721, 1.160083620581694,
208 1.542692246994852, 2.303841728541361, 1.046337587563584, 0.725683826909555, 1.591295952328042, 1.647853963194485, 1.410744976161187, 0.876907034839234, 0.886670387283173, 1.541394813254221;
210 JW_global << 2.977456624461038, 2.205533591974792, 3.027360939693343, 3.287118956132616, 2.375186418688407,
211 3.137723846199826, 2.752792907538314, 2.639787055824843, 2.828009251522860, 2.504187495011176,
212 2.447896971257707, 1.726501702097287, 2.500010777571874, 2.873160045582897, 1.868530866136191,
213 3.094354526680215, 2.530311421424636, 3.046051246285873, 2.916644286334997, 2.126621716340908,
214 1.981542330537719, 1.649251376583201, 2.034057335063531, 2.167256602621555, 1.754106473495030,
215 2.384569365251443, 2.196160002079869, 1.998784819449047, 2.050878308167098, 1.687398579448636,
216 2.655317993318163, 2.542013168246354, 2.989992698710950, 3.020860435534452, 2.259852349870721,
217 3.812464252001572, 3.252800808239158, 3.906358255932346, 3.917717391998067, 2.952210341980682,
218 3.030961610967875, 2.214613005088035, 2.582511677568232, 2.876621280799403, 2.343324946211924,
219 2.633853068910827, 2.229873948587862, 1.567502413943023, 2.054972261427936, 1.887633072097274;
221 res_global << 0.422885689100085,
232 Jres_global << 2.104516338543882,
243 if (context.isPrimary()) {
245 }
else if (context.isRank(1)) {
247 }
else if (context.isRank(2)) {
250 BOOST_REQUIRE(context.isRank(3));
254 Eigen::MatrixXd W_local(n_local, m_global);
255 Eigen::MatrixXd J_local(n_global, n_local);
256 Eigen::MatrixXd Z_local(m_global, n_local);
257 Eigen::MatrixXd WZ_local(n_global, n_local);
258 Eigen::MatrixXd JW_local(n_local, m_global);
259 Eigen::MatrixXd res_local(n_local, 1);
260 Eigen::VectorXd res_local_vec(n_local);
261 Eigen::MatrixXd Jres_local(n_local, 1);
265 int off = vertexOffsets.at(context.rank);
266 for (
int i = 0; i < n_global; i++)
267 for (
int j = 0; j < n_local; j++) {
268 J_local(i, j) = J_global(i, j + off);
269 WZ_local(i, j) = WZ_global(i, j + off);
272 for (
int i = 0; i < n_local; i++)
273 for (
int j = 0; j < m_global; j++) {
274 W_local(i, j) = W_global(i + off, j);
275 JW_local(i, j) = JW_global(i + off, j);
278 for (
int i = 0; i < m_global; i++)
279 for (
int j = 0; j < n_local; j++) {
280 Z_local(i, j) = Z_global(i, j + off);
283 for (
int i = 0; i < n_local; i++) {
284 res_local(i) = res_global(i + off);
285 res_local_vec(i) = res_global(i + off);
286 Jres_local(i) = Jres_global(i + off);
296 BOOST_TEST_MESSAGE(
"Test 1");
298 Eigen::MatrixXd resJW_local(n_local, m_global);
299 parMatrixOps.multiply(J_local, W_local, resJW_local, vertexOffsets, n_global, n_global, m_global,
false);
302 BOOST_TEST_MESSAGE(
"Test 2");
304 Eigen::MatrixXd resWZ_local(n_global, n_local);
305 parMatrixOps.multiply(W_local, Z_local, resWZ_local, vertexOffsets, n_global, m_global, n_global);
308 BOOST_TEST_MESSAGE(
"Test 3");
310 Eigen::MatrixXd resJres_local(n_local, 1);
311 parMatrixOps.multiply(J_local, res_local, resJres_local, vertexOffsets, n_global, n_global, 1,
false);
314 BOOST_TEST_MESSAGE(
"Test 4");
316 Eigen::MatrixXd resJW_local2(n_local, m_global);
317 parMatrixOps.multiply(J_local, W_local, resJW_local2, vertexOffsets, n_global, n_global, m_global,
false,
false);
320 BOOST_TEST_MESSAGE(
"Test 5");
322 Eigen::VectorXd resJres_local2(n_local);
323 parMatrixOps.multiply(J_local, res_local_vec, resJres_local2, vertexOffsets, n_global, n_global, 1,
false,
false);
324 Eigen::MatrixXd matrix_cast = resJres_local2;
334 int n_global = 10, n_global_primary = 8, m_global = 5;
335 int n_local, n_local_primary;
340 Eigen::MatrixXd W_global(n_global, m_global);
341 Eigen::MatrixXd V_global(n_global_primary, m_global);
342 Eigen::MatrixXd J_global(n_global, n_global_primary);
343 Eigen::MatrixXd Z_global(m_global, n_global_primary);
344 Eigen::MatrixXd WZ_global(n_global, n_global_primary);
345 Eigen::MatrixXd JV_global(n_global, m_global);
346 Eigen::MatrixXd res_global(n_global_primary, 1);
347 Eigen::MatrixXd Jres_global(n_global, 1);
349 J_global << 0.162182308193243, 0.450541598502498, 0.106652770180584, 0.431413827463545, 0.853031117721894, 0.417267069084370, 0.780252068321138, 0.234779913372406,
350 0.794284540683907, 0.083821377996933, 0.961898080855054, 0.910647594429523, 0.622055131485066, 0.049654430325742, 0.389738836961253, 0.353158571222071,
351 0.311215042044805, 0.228976968716819, 0.004634224134067, 0.181847028302852, 0.350952380892271, 0.902716109915281, 0.241691285913833, 0.821194040197959,
352 0.528533135506213, 0.913337361501670, 0.774910464711502, 0.263802916521990, 0.513249539867053, 0.944787189721646, 0.403912145588115, 0.015403437651555,
353 0.165648729499781, 0.152378018969223, 0.817303220653433, 0.145538980384717, 0.401808033751942, 0.490864092468080, 0.096454525168389, 0.043023801657808,
354 0.601981941401637, 0.825816977489547, 0.868694705363510, 0.136068558708664, 0.075966691690842, 0.489252638400019, 0.131973292606335, 0.168990029462704,
355 0.262971284540144, 0.538342435260057, 0.084435845510910, 0.869292207640089, 0.239916153553658, 0.337719409821377, 0.942050590775485, 0.649115474956452,
356 0.654079098476782, 0.996134716626885, 0.399782649098896, 0.579704587365570, 0.123318934835166, 0.900053846417662, 0.956134540229802, 0.731722385658670,
357 0.689214503140008, 0.078175528753184, 0.259870402850654, 0.549860201836332, 0.183907788282417, 0.369246781120215, 0.575208595078466, 0.647745963136307,
358 0.748151592823709, 0.442678269775446, 0.800068480224308, 0.144954798223727, 0.239952525664903, 0.111202755293787, 0.059779542947156, 0.450923706430945;
360 Z_global << 0.644318130193692, 0.939001561999887, 0.207742292733028, 0.194764289567049, 0.311102286650413, 0.979748378356085, 0.594896074008614, 0.117417650855806,
361 0.378609382660268, 0.875942811492984, 0.301246330279491, 0.225921780972399, 0.923379642103244, 0.438869973126103, 0.262211747780845, 0.296675873218327,
362 0.811580458282477, 0.550156342898422, 0.470923348517591, 0.170708047147859, 0.430207391329584, 0.111119223440599, 0.602843089382083, 0.318778301925882,
363 0.532825588799455, 0.622475086001227, 0.230488160211558, 0.227664297816554, 0.184816320124136, 0.258064695912067, 0.711215780433683, 0.424166759713807,
364 0.350727103576883, 0.587044704531417, 0.844308792695389, 0.435698684103899, 0.904880968679893, 0.408719846112552, 0.221746734017240, 0.507858284661118;
366 W_global << 0.963088539286913, 0.037738866239552, 0.106761861607241, 0.030540946304637, 0.182922469414914,
367 0.546805718738968, 0.885168008202475, 0.653757348668560, 0.744074260367462, 0.239932010568717,
368 0.521135830804001, 0.913286827639239, 0.494173936639270, 0.500022435590201, 0.886511933076101,
369 0.231594386708524, 0.796183873585212, 0.779051723231275, 0.479922141146060, 0.028674152464106,
370 0.488897743920167, 0.098712278655574, 0.715037078400694, 0.904722238067363, 0.489901388512224,
371 0.624060088173690, 0.261871183870716, 0.903720560556316, 0.609866648422558, 0.167927145682257,
372 0.679135540865748, 0.335356839962797, 0.890922504330789, 0.617666389588455, 0.978680649641159,
373 0.395515215668593, 0.679727951377338, 0.334163052737496, 0.859442305646212, 0.712694471678914,
374 0.367436648544477, 0.136553137355370, 0.698745832334794, 0.805489424529686, 0.500471624154843,
375 0.987982003161633, 0.721227498581740, 0.197809826685929, 0.576721515614685, 0.471088374541939;
377 V_global << 0.963088539286913, 0.037738866239552, 0.106761861607241, 0.030540946304637, 0.182922469414914,
378 0.546805718738968, 0.885168008202475, 0.653757348668560, 0.744074260367462, 0.239932010568717,
379 0.521135830804001, 0.913286827639239, 0.494173936639270, 0.500022435590201, 0.886511933076101,
380 0.231594386708524, 0.796183873585212, 0.779051723231275, 0.479922141146060, 0.028674152464106,
381 0.488897743920167, 0.098712278655574, 0.715037078400694, 0.904722238067363, 0.489901388512224,
382 0.624060088173690, 0.261871183870716, 0.903720560556316, 0.609866648422558, 0.167927145682257,
383 0.679135540865748, 0.335356839962797, 0.890922504330789, 0.617666389588455, 0.978680649641159,
384 0.395515215668593, 0.679727951377338, 0.334163052737496, 0.859442305646212, 0.712694471678914;
386 WZ_global << 0.801898401838153, 1.122529091861272, 0.423201945415435, 0.300978558234156, 0.551563616222783, 1.054655768517680, 0.709477478632269, 0.264166315674375,
387 1.698638905064191, 2.252495235306823, 1.062194901100270, 0.692015805803183, 1.623336848442643, 1.286934957259726, 1.533908621128989, 0.972679319556613,
388 1.659966647284183, 2.392880960790855, 1.479843373796984, 0.892278843543251, 2.112634376079842, 1.457681533373469, 1.399610510316321, 1.151987966448499,
389 1.348697901510644, 1.659051863989714, 0.789659275602735, 0.479726420963902, 1.257027472012560, 0.798463699122210, 1.163875903906441, 0.729876025630416,
390 1.586570049108119, 1.789685309000292, 1.090184919236369, 0.659006002219424, 1.161370228579310, 1.035482281126420, 1.499868794445182, 0.947182660718915,
391 1.618531220549951, 1.790772713269325, 0.916463926569826, 0.546989894699598, 1.089407693306137, 1.052790194022541, 1.455702372306257, 0.783021389674577,
392 1.959962169636355, 2.380620645499870, 1.630339868211612, 0.927153862633654, 1.903968068499247, 1.470962702535233, 1.685349366051057, 1.222266173248617,
393 1.491283328084721, 2.103999079781337, 1.244121457180890, 0.793826284013736, 1.698194683860993, 1.236033609893653, 1.384257591822518, 1.081117931366570,
394 1.460249196277507, 1.644252093240875, 1.054732358743229, 0.623131414603751, 1.142741229794316, 0.909989695162785, 1.359481290557063, 0.902231079036841,
395 1.542692246994852, 2.303841728541361, 1.046337587563584, 0.725683826909555, 1.591295952328042, 1.647853963194485, 1.410744976161187, 0.876907034839234;
397 JV_global << 1.858248897047313, 1.460539092513067, 2.461299078116529, 2.310512192504156, 1.663601063552978,
398 2.262454556403901, 2.152864057058022, 2.279290537358716, 2.141955784649117, 1.990458115280576,
399 1.693328169927193, 1.273724051556671, 1.883367613821275, 1.992574656933234, 1.266511368633932,
400 2.594305087789609, 2.190155821725327, 2.827802605166358, 2.513073994214369, 1.826727179050639,
401 1.287781563257562, 1.233237310490343, 1.465797647208796, 1.356396452895832, 1.199920226638404,
402 2.01447287618639, 1.950153314629895, 1.809958228225767, 1.726383681128359, 1.451238778472211,
403 2.017525848175016, 2.124945015000776, 2.631927613644521, 2.430782107524808, 1.835883749485157,
404 3.077955951651073, 2.798988133409233, 3.368174259406194, 3.119215306918595, 2.398487458862795,
405 1.936475995984718, 1.518374914122997, 1.875596213706102, 1.776612841904873, 1.567668346437563,
406 1.818765352859875, 1.64554169573584, 1.353590656234852, 1.531229933146514, 1.472596086577711;
408 res_global << 0.422885689100085,
417 Jres_global << 1.769847280280699,
428 if (context.isPrimary()) {
431 }
else if (context.isRank(1)) {
434 }
else if (context.isRank(2)) {
438 BOOST_REQUIRE(context.isRank(3));
443 Eigen::MatrixXd W_local(n_local, m_global);
444 Eigen::MatrixXd V_local(n_local_primary, m_global);
445 Eigen::MatrixXd J_local(n_global, n_local_primary);
446 Eigen::MatrixXd Z_local(m_global, n_local_primary);
447 Eigen::MatrixXd WZ_local(n_global, n_local_primary);
448 Eigen::MatrixXd JV_local(n_local, m_global);
449 Eigen::MatrixXd res_local(n_local_primary, 1);
450 Eigen::VectorXd res_local_vec(n_local_primary);
451 Eigen::MatrixXd Jres_local(n_local, 1);
455 int off = vertexOffsets.at(context.rank);
456 int offPrimary = vertexOffsetsPrimary.at(context.rank);
457 for (
int i = 0; i < n_global; i++)
458 for (
int j = 0; j < n_local_primary; j++) {
459 J_local(i, j) = J_global(i, j + offPrimary);
460 WZ_local(i, j) = WZ_global(i, j + offPrimary);
463 for (
int i = 0; i < n_local_primary; i++)
464 for (
int j = 0; j < m_global; j++) {
465 V_local(i, j) = V_global(i + offPrimary, j);
468 for (
int i = 0; i < n_local; i++)
469 for (
int j = 0; j < m_global; j++) {
470 W_local(i, j) = W_global(i + off, j);
471 JV_local(i, j) = JV_global(i + off, j);
474 for (
int i = 0; i < m_global; i++)
475 for (
int j = 0; j < n_local_primary; j++) {
476 Z_local(i, j) = Z_global(i, j + offPrimary);
479 for (
int i = 0; i < n_local_primary; i++) {
480 res_local(i) = res_global(i + offPrimary);
481 res_local_vec(i) = res_global(i + offPrimary);
484 for (
int i = 0; i < n_local; i++) {
485 Jres_local(i) = Jres_global(i + off);
495 BOOST_TEST_MESSAGE(
"Test 1");
498 Eigen::MatrixXd resJV_local(n_local, m_global);
499 parMatrixOps.multiply(J_local, V_local, resJV_local, vertexOffsets, n_global, n_global, m_global,
false);
502 BOOST_TEST_MESSAGE(
"Test 2");
505 Eigen::MatrixXd resWZ_local(n_global, n_local_primary);
506 parMatrixOps.multiply(W_local, Z_local, resWZ_local, vertexOffsets, n_global, m_global, n_global);
509 BOOST_TEST_MESSAGE(
"Test 3");
512 Eigen::MatrixXd resJres_local(n_local, 1);
513 parMatrixOps.multiply(J_local, res_local, resJres_local, vertexOffsets, n_global, n_global_primary, 1,
false);
516 BOOST_TEST_MESSAGE(
"Test 4");
519 Eigen::MatrixXd resJV_local2(n_local, m_global);
520 parMatrixOps.multiply(J_local, V_local, resJV_local2, vertexOffsets, n_global, n_global, m_global,
false,
false);
523 BOOST_TEST_MESSAGE(
"Test 5");
526 Eigen::VectorXd resJres_local2(n_local);
527 parMatrixOps.multiply(J_local, res_local_vec, resJres_local2, vertexOffsets, n_global, n_global, 1,
false,
false);
528 Eigen::MatrixXd matrix_cast = resJres_local2;
BOOST_AUTO_TEST_CASE(testIQNIMVJPPWithSubsteps)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
void validate_result_equals_reference(Eigen::MatrixXd &result_local, Eigen::MatrixXd &reference_global, int offset, bool partitionedRowWise)
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
void initialize(const bool needCyclicComm)
Initializes the acceleration.
static void allreduceSum(precice::span< const double > sendData, precice::span< double > rcvData)
static double l2norm(const Eigen::VectorXd &vec)
The l2 norm of a vector is calculated on distributed data.
static double dot(const Eigen::VectorXd &vec1, const Eigen::VectorXd &vec2)
static bool isPrimary()
True if this process is running the primary rank.
static void reduceSum(precice::span< const double > sendData, precice::span< double > rcvData)
contains implementations of acceleration schemes.
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.