52 #include "Teuchos_oblackholestream.hpp"
53 #include "Teuchos_RCP.hpp"
54 #include "Teuchos_ScalarTraits.hpp"
57 using namespace Intrepid;
59 #define INTREPID_TEST_COMMAND( S ) \
64 catch (const std::logic_error & err) { \
65 *outStream << "Expected Error ----------------------------------------------------------------\n"; \
66 *outStream << err.what() << '\n'; \
67 *outStream << "-------------------------------------------------------------------------------" << "\n\n"; \
72 int main(
int argc,
char *argv[]) {
76 int iprint = argc - 1;
77 Teuchos::RCP<std::ostream> outStream;
78 Teuchos::oblackholestream bhs;
80 outStream = Teuchos::rcp(&std::cout,
false);
82 outStream = Teuchos::rcp(&bhs,
false);
85 Teuchos::oblackholestream oldFormatState;
86 oldFormatState.copyfmt(std::cout);
89 <<
"===============================================================================\n" \
91 <<
"| Unit Test (ArrayTools) |\n" \
93 <<
"| 1) Array operations: multiplication, contractions |\n" \
95 <<
"| Questions? Contact Pavel Bochev (pbboche@sandia.gov) or |\n" \
96 <<
"| Denis Ridzal (dridzal@sandia.gov). |\n" \
98 <<
"| Intrepid's website: http://trilinos.sandia.gov/packages/intrepid |\n" \
99 <<
"| Trilinos website: http://trilinos.sandia.gov |\n" \
101 <<
"===============================================================================\n";
105 #ifdef HAVE_INTREPID_DEBUG
106 int beginThrowNumber = Teuchos::TestForException_getThrowNumber();
107 int endThrowNumber = beginThrowNumber + 39 + 18 + 28 + 26 + 34 + 37 + 46 + 45;
114 #ifdef HAVE_INTREPID_DEBUG
124 int D1 = 1, D2 = 2, D3 = 3, D4 = 4;
202 Teuchos::Array<int> dimensions(6);
214 <<
"===============================================================================\n"\
215 <<
"| TEST 1: crossProductDataField exceptions |\n"\
216 <<
"===============================================================================\n";
222 INTREPID_TEST_COMMAND(atools.
crossProductDataField<
double>(fc_C_F_P_D3, fc_C_P_D2_D2, fc_C_F_P_D3) );
227 INTREPID_TEST_COMMAND(atools.
crossProductDataField<
double>(fc_C_F_P_D3, fc_C_P_D3, fc_C_F_P_D3_D3) );
273 <<
"===============================================================================\n"\
274 <<
"| TEST 2: crossProductDataData exceptions |\n"\
275 <<
"===============================================================================\n";
280 INTREPID_TEST_COMMAND(atools.
crossProductDataData<
double>(fc_C_P_D3, fc_C_P_D2_D2, fc_C_P_D3) );
285 INTREPID_TEST_COMMAND(atools.
crossProductDataData<
double>(fc_C_P_D3, fc_C_P_D3, fc_C_P_D2_D2) );
312 <<
"===============================================================================\n"\
313 <<
"| TEST 3: outerProductDataField exceptions |\n"\
314 <<
"===============================================================================\n";
318 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D2_D2, fc_C_F_P_D3) );
319 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D1, fc_C_F_P_D3) );
323 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C_F_P_D3_D3) );
324 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C_F_P_D1) );
329 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3_D3,fc_C_P_D3, fc_C_F_P_D3) );
330 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D1_D3, fc_C_P_D3, fc_C_F_P_D3) );
331 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D1, fc_C_P_D3, fc_C_F_P_D3) );
332 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D1_D1, fc_C_P_D3, fc_C_F_P_D3) );
335 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C1_P_D3, fc_C_F_P_D3) );
336 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P1_D3, fc_C_F_P_D3) );
337 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D2, fc_C_F_P_D2) );
340 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C1_F_P_D3) );
341 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C_F_P1_D3) );
342 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C_F_P_D2) );
348 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C1_P_D3, fc_C1_F_P_D3) );
349 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C_F1_P_D3) );
350 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P1_D3, fc_C_F_P1_D3) );
351 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D2, fc_C_F_P_D2) );
352 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D2_D3, fc_C_P_D2, fc_C_F_P_D2) );
355 INTREPID_TEST_COMMAND(atools.
outerProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P1_D3, fc_F_P1_D3) );
359 <<
"===============================================================================\n"\
360 <<
"| TEST 4: outerProductDataData exceptions |\n"\
361 <<
"===============================================================================\n";
365 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P_D3) );
366 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D1, fc_C_P_D3) );
370 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C_P_D3_D3) );
371 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C_P_D1) );
376 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3_D3,fc_C_P_D3, fc_C_P_D3) );
377 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D1, fc_C_P_D3, fc_C_P_D3) );
378 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D1_D2, fc_C_P_D3, fc_C_P_D3) );
388 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C1_P_D3) );
389 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C_P1_D3) );
390 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C_P_D2) );
396 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C1_P_D3, fc_C1_P_D3) );
397 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P1_D3, fc_C_P1_D3) );
398 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D2, fc_C_P_D2) );
400 INTREPID_TEST_COMMAND(atools.
outerProductDataData<
double>(fc_C_P_D3_D3, fc_C_P1_D3, fc_P1_D3) );
405 <<
"===============================================================================\n"\
406 <<
"| TEST 5: matvecProductDataField exceptions |\n"\
407 <<
"===============================================================================\n";
460 <<
"===============================================================================\n"\
461 <<
"| TEST 6: matvecProductDataData exceptions |\n"\
462 <<
"===============================================================================\n";
519 <<
"===============================================================================\n"\
520 <<
"| TEST 7: matmatProductDataField exceptions |\n"\
521 <<
"===============================================================================\n";
525 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3_D3, fc_C_F_P_D3_D3) );
526 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D1_D3, fc_C_F_P_D3_D3) );
527 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D1, fc_C_F_P_D3_D3) );
531 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P_D3_D3_D3) );
532 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P_D1_D3) );
533 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P_D3_D1) );
537 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3_D3, fc_C_P_D3_D3, fc_C_F_P_D3_D3) );
538 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D1_D3, fc_C_P_D3_D3, fc_C_F_P_D3_D3) );
539 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D1, fc_C_P_D3_D3, fc_C_F_P_D3_D3) );
542 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C1_P_D3_D3, fc_C_F_P_D3_D3) );
543 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P1_D3_D3, fc_C_F_P_D3_D3) );
544 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D2_D2, fc_C_F_P_D3_D3) );
545 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P1_D2_D2, fc_C_F_P_D3_D3) );
546 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D2_D2, fc_C_P_D3_D3, fc_C_F_P_D3_D3) );
549 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C1_P_D3, fc_C_F_P_D3_D3) );
550 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P1_D3, fc_C_F_P_D3_D3) );
554 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C1_F_P_D3_D3) );
555 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P1_D3_D3) );
556 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P_D2_D2) );
557 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P1_D2_D2) );
558 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C1_F_P_D2_D2) );
559 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C1_F_P1_D2_D2) );
562 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C1_F_P_D3_D3) );
563 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3, fc_C_F_P1_D3_D3) );
567 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_F_P1_D3_D3) );
568 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_F_P_D2_D2) );
569 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_F_P1_D2_D2) );
575 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C1_F_P_D3_D3) );
576 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F1_P_D3_D3) );
577 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P1_D3_D3) );
578 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_C_F_P_D2_D2) );
581 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_F1_P_D3_D3) );
582 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_F_P1_D3_D3) );
583 INTREPID_TEST_COMMAND(atools.
matmatProductDataField<
double>(fc_C_F_P_D3_D3, fc_C_P_D3_D3, fc_F_P_D2_D2) );
586 <<
"===============================================================================\n"\
587 <<
"| TEST 8: matmatProductDataData exceptions |\n"\
588 <<
"===============================================================================\n";
592 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3_D3, fc_C_P_D3_D3) );
593 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D1_D3, fc_C_P_D3_D3) );
594 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D1, fc_C_P_D3_D3) );
598 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C_P_D3_D3_D3) );
599 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P_D1_D3) );
600 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P_D3_D1) );
604 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3_D3, fc_C_P_D3, fc_C_P_D3_D3) );
605 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D1_D3, fc_C_P_D3_D3, fc_C_P_D3_D3) );
606 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D1, fc_C_P_D3_D3, fc_C_P_D3_D3) );
609 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C1_P_D3_D3, fc_C_P_D3_D3) );
610 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P1_D3_D3, fc_C_P_D3_D3) );
611 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D2_D2, fc_C_P_D3_D3) );
612 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P1_D2_D2, fc_C_P_D3_D3) );
613 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D2_D2, fc_C_P_D3_D3, fc_C_P_D3_D3) );
616 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C1_P_D3, fc_C_P_D3_D3) );
617 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P1_D3, fc_C_P_D3_D3) );
621 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C1_P_D3_D3) );
622 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P1_D3_D3) );
623 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P_D2_D2) );
624 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P1_D2_D2) );
625 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C1_P_D2_D2) );
626 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P1_D2_D2) );
629 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C1_P_D3_D3) );
630 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3, fc_C_P1_D3_D3) );
634 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_P1_D3_D3) );
635 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_P_D2_D2) );
636 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_P1_D2_D2) );
642 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C1_P_D3_D3) );
643 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C1_P_D3_D3) );
644 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P1_D3_D3) );
645 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_C_P_D2_D2) );
648 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_P_D2_D2) );
649 INTREPID_TEST_COMMAND(atools.
matmatProductDataData<
double>(fc_C_P_D3_D3, fc_C_P_D3_D3, fc_P1_D3_D3) );
652 catch (
const std::logic_error & err) {
653 *outStream <<
"UNEXPECTED ERROR !!! ----------------------------------------------------------\n";
654 *outStream << err.what() <<
'\n';
655 *outStream <<
"-------------------------------------------------------------------------------" <<
"\n\n";
659 if (Teuchos::TestForException_getThrowNumber() != endThrowNumber)
672 <<
"===============================================================================\n"\
673 <<
"| TEST 1.a: 3D crossProductDataField operations: (C,P,D) and (C,F,P,D) |\n"\
674 <<
"===============================================================================\n";
685 ijkData_1a(0, 0, 0) = 1.0; ijkData_1a(0, 0, 1) = 0.0; ijkData_1a(0, 0, 2) = 0.0;
686 ijkData_1a(0, 1, 0) = 1.0; ijkData_1a(0, 1, 1) = 0.0; ijkData_1a(0, 1, 2) = 0.0;
688 ijkData_1a(1, 0, 0) = 0.0; ijkData_1a(1, 0, 1) = 1.0; ijkData_1a(1, 0, 2) = 0.0;
689 ijkData_1a(1, 1, 0) = 0.0; ijkData_1a(1, 1, 1) = 1.0; ijkData_1a(1, 1, 2) = 0.0;
691 ijkData_1a(2, 0, 0) = 0.0; ijkData_1a(2, 0, 1) = 0.0; ijkData_1a(2, 0, 2) = 1.0;
692 ijkData_1a(2, 1, 0) = 0.0; ijkData_1a(2, 1, 1) = 0.0; ijkData_1a(2, 1, 2) = 1.0;
697 ijkFields_1a(0, 0, 0, 0) = 1.0; ijkFields_1a(0, 0, 0, 1) = 0.0; ijkFields_1a(0, 0, 0, 2) = 0.0;
698 ijkFields_1a(0, 0, 1, 0) = 1.0; ijkFields_1a(0, 0, 1, 1) = 0.0; ijkFields_1a(0, 0, 1, 2) = 0.0;
700 ijkFields_1a(0, 1, 0, 0) = 0.0; ijkFields_1a(0, 1, 0, 1) = 1.0; ijkFields_1a(0, 1, 0, 2) = 0.0;
701 ijkFields_1a(0, 1, 1, 0) = 0.0; ijkFields_1a(0, 1, 1, 1) = 1.0; ijkFields_1a(0, 1, 1, 2) = 0.0;
703 ijkFields_1a(0, 2, 0, 0) = 0.0; ijkFields_1a(0, 2, 0, 1) = 0.0; ijkFields_1a(0, 2, 0, 2) = 1.0;
704 ijkFields_1a(0, 2, 1, 0) = 0.0; ijkFields_1a(0, 2, 1, 1) = 0.0; ijkFields_1a(0, 2, 1, 2) = 1.0;
707 ijkFields_1a(1, 0, 0, 0) = 1.0; ijkFields_1a(1, 0, 0, 1) = 0.0; ijkFields_1a(1, 0, 0, 2) = 0.0;
708 ijkFields_1a(1, 0, 1, 0) = 1.0; ijkFields_1a(1, 0, 1, 1) = 0.0; ijkFields_1a(1, 0, 1, 2) = 0.0;
710 ijkFields_1a(1, 1, 0, 0) = 0.0; ijkFields_1a(1, 1, 0, 1) = 1.0; ijkFields_1a(1, 1, 0, 2) = 0.0;
711 ijkFields_1a(1, 1, 1, 0) = 0.0; ijkFields_1a(1, 1, 1, 1) = 1.0; ijkFields_1a(1, 1, 1, 2) = 0.0;
713 ijkFields_1a(1, 2, 0, 0) = 0.0; ijkFields_1a(1, 2, 0, 1) = 0.0; ijkFields_1a(1, 2, 0, 2) = 1.0;
714 ijkFields_1a(1, 2, 1, 0) = 0.0; ijkFields_1a(1, 2, 1, 1) = 0.0; ijkFields_1a(1, 2, 1, 2) = 1.0;
717 ijkFields_1a(2, 0, 0, 0) = 1.0; ijkFields_1a(2, 0, 0, 1) = 0.0; ijkFields_1a(2, 0, 0, 2) = 0.0;
718 ijkFields_1a(2, 0, 1, 0) = 1.0; ijkFields_1a(2, 0, 1, 1) = 0.0; ijkFields_1a(2, 0, 1, 2) = 0.0;
720 ijkFields_1a(2, 1, 0, 0) = 0.0; ijkFields_1a(2, 1, 0, 1) = 1.0; ijkFields_1a(2, 1, 0, 2) = 0.0;
721 ijkFields_1a(2, 1, 1, 0) = 0.0; ijkFields_1a(2, 1, 1, 1) = 1.0; ijkFields_1a(2, 1, 1, 2) = 0.0;
723 ijkFields_1a(2, 2, 0, 0) = 0.0; ijkFields_1a(2, 2, 0, 1) = 0.0; ijkFields_1a(2, 2, 0, 2) = 1.0;
724 ijkFields_1a(2, 2, 1, 0) = 0.0; ijkFields_1a(2, 2, 1, 1) = 0.0; ijkFields_1a(2, 2, 1, 2) = 1.0;
728 art::crossProductDataField<double>(outFields, ijkData_1a, ijkFields_1a);
731 if( !(outFields(0,0,0,0)==0.0 && outFields(0,0,0,1)==0.0 && outFields(0,0,0,2)==0.0 &&
732 outFields(0,0,1,0)==0.0 && outFields(0,0,1,1)==0.0 && outFields(0,0,1,2)==0.0 ) ) {
733 *outStream <<
"\n\nINCORRECT crossProductDataField (1): i x i != 0; ";
736 if( !(outFields(0,1,0,0)==0.0 && outFields(0,1,0,1)==0.0 && outFields(0,1,0,2)==1.0 &&
737 outFields(0,1,1,0)==0.0 && outFields(0,1,1,1)==0.0 && outFields(0,1,1,2)==1.0 ) ) {
738 *outStream <<
"\n\nINCORRECT crossProductDataField (2): i x j != k; ";
741 if( !(outFields(0,2,0,0)==0.0 && outFields(0,2,0,1)==-1.0 && outFields(0,2,0,2)==0.0 &&
742 outFields(0,2,1,0)==0.0 && outFields(0,2,1,1)==-1.0 && outFields(0,2,1,2)==0.0 ) ) {
743 *outStream <<
"\n\nINCORRECT crossProductDataField (3): i x k != -j; ";
748 if( !(outFields(1,0,0,0)==0.0 && outFields(1,0,0,1)==0.0 && outFields(1,0,0,2)==-1.0 &&
749 outFields(1,0,1,0)==0.0 && outFields(1,0,1,1)==0.0 && outFields(1,0,1,2)==-1.0 ) ) {
750 *outStream <<
"\n\nINCORRECT crossProductDataField (4): j x i != -k; ";
753 if( !(outFields(1,1,0,0)==0.0 && outFields(1,1,0,1)==0.0 && outFields(1,1,0,2)==0.0 &&
754 outFields(1,1,1,0)==0.0 && outFields(1,1,1,1)==0.0 && outFields(1,1,1,2)==0.0 ) ) {
755 *outStream <<
"\n\nINCORRECT crossProductDataField (5): j x j != 0; ";
758 if( !(outFields(1,2,0,0)==1.0 && outFields(1,2,0,1)==0.0 && outFields(1,2,0,2)==0.0 &&
759 outFields(1,2,1,0)==1.0 && outFields(1,2,1,1)==0.0 && outFields(1,2,1,2)==0.0 ) ) {
760 *outStream <<
"\n\nINCORRECT crossProductDataField (6): j x k != i; ";
765 if( !(outFields(2,0,0,0)==0.0 && outFields(2,0,0,1)==1.0 && outFields(2,0,0,2)==0.0 &&
766 outFields(2,0,1,0)==0.0 && outFields(2,0,1,1)==1.0 && outFields(2,0,1,2)==0.0 ) ) {
767 *outStream <<
"\n\nINCORRECT crossProductDataField (7): k x i != j; ";
770 if( !(outFields(2,1,0,0)==-1.0 && outFields(2,1,0,1)==0.0 && outFields(2,1,0,2)==0.0 &&
771 outFields(2,1,1,0)==-1.0 && outFields(2,1,1,1)==0.0 && outFields(2,1,1,2)==0.0 ) ) {
772 *outStream <<
"\n\nINCORRECT crossProductDataField (8): k x j != -i; ";
775 if( !(outFields(2,2,0,0)==0.0 && outFields(2,2,0,1)==0.0 && outFields(2,2,0,2)==0.0 &&
776 outFields(2,2,1,0)==0.0 && outFields(2,2,1,1)==0.0 && outFields(2,2,1,2)==0.0 ) ) {
777 *outStream <<
"\n\nINCORRECT crossProductDataField (9): k x k != 0; ";
783 <<
"===============================================================================\n"\
784 <<
"| TEST 1.b: 3D crossProductDataField operations: (C,P,D) and (F,P,D) |\n"\
785 <<
"===============================================================================\n";
796 ijkData_1b(0, 0, 0) = 1.0; ijkData_1b(0, 0, 1) = 0.0; ijkData_1b(0, 0, 2) = 0.0;
797 ijkData_1b(0, 1, 0) = 1.0; ijkData_1b(0, 1, 1) = 0.0; ijkData_1b(0, 1, 2) = 0.0;
798 ijkData_1b(0, 2, 0) = 1.0; ijkData_1b(0, 2, 1) = 0.0; ijkData_1b(0, 2, 2) = 0.0;
800 ijkData_1b(1, 0, 0) = 0.0; ijkData_1b(1, 0, 1) = 1.0; ijkData_1b(1, 0, 2) = 0.0;
801 ijkData_1b(1, 1, 0) = 0.0; ijkData_1b(1, 1, 1) = 1.0; ijkData_1b(1, 1, 2) = 0.0;
802 ijkData_1b(1, 2, 0) = 0.0; ijkData_1b(1, 2, 1) = 1.0; ijkData_1b(1, 2, 2) = 0.0;
804 ijkData_1b(2, 0, 0) = 0.0; ijkData_1b(2, 0, 1) = 0.0; ijkData_1b(2, 0, 2) = 1.0;
805 ijkData_1b(2, 1, 0) = 0.0; ijkData_1b(2, 1, 1) = 0.0; ijkData_1b(2, 1, 2) = 1.0;
806 ijkData_1b(2, 2, 0) = 0.0; ijkData_1b(2, 2, 1) = 0.0; ijkData_1b(2, 2, 2) = 1.0;
811 ijkFields_1b(0, 0, 0) = 1.0; ijkFields_1b(0, 0, 1) = 0.0; ijkFields_1b(0, 0, 2) = 0.0;
812 ijkFields_1b(0, 1, 0) = 0.0; ijkFields_1b(0, 1, 1) = 1.0; ijkFields_1b(0, 1, 2) = 0.0;
813 ijkFields_1b(0, 2, 0) = 0.0; ijkFields_1b(0, 2, 1) = 0.0; ijkFields_1b(0, 2, 2) = 1.0;
816 outFields.resize(3, 1, 3, 3);
817 art::crossProductDataField<double>(outFields, ijkData_1b, ijkFields_1b);
820 if( !(outFields(0,0,0,0)==0.0 && outFields(0,0,0,1)==0.0 && outFields(0,0,0,2)==0.0) ) {
821 *outStream <<
"\n\nINCORRECT crossProductDataField (10): i x i != 0; ";
824 if( !(outFields(0,0,1,0)==0.0 && outFields(0,0,1,1)==0.0 && outFields(0,0,1,2)==1.0) ) {
825 *outStream <<
"\n\nINCORRECT crossProductDataField (11): i x j != k; ";
828 if( !(outFields(0,0,2,0)==0.0 && outFields(0,0,2,1)==-1.0 && outFields(0,0,2,2)==0.0) ) {
829 *outStream <<
"\n\nINCORRECT crossProductDataField (12): i x k != -j; ";
834 if( !(outFields(1,0,0,0)==0.0 && outFields(1,0,0,1)==0.0 && outFields(1,0,0,2)==-1.0) ) {
835 *outStream <<
"\n\nINCORRECT crossProductDataField (13): j x i != -k; ";
838 if( !(outFields(1,0,1,0)==0.0 && outFields(1,0,1,1)==0.0 && outFields(1,0,1,2)==0.0) ) {
839 *outStream <<
"\n\nINCORRECT crossProductDataField (14): j x j != 0; ";
842 if( !(outFields(1,0,2,0)==1.0 && outFields(1,0,2,1)==0.0 && outFields(1,0,2,2)==0.0) ) {
843 *outStream <<
"\n\nINCORRECT crossProductDataField (15): j x k != i; ";
848 if( !(outFields(2,0,0,0)==0.0 && outFields(2,0,0,1)==1.0 && outFields(2,0,0,2)==0.0) ) {
849 *outStream <<
"\n\nINCORRECT crossProductDataField (16): k x i != j; ";
852 if( !(outFields(2,0,1,0)==-1.0 && outFields(2,0,1,1)==0.0 && outFields(2,0,1,2)==0.0) ) {
853 *outStream <<
"\n\nINCORRECT crossProductDataField (17): k x j != -i; ";
856 if( !(outFields(2,0,2,0)==0.0 && outFields(2,0,2,1)==0.0 && outFields(2,0,2,2)==0.0) ) {
857 *outStream <<
"\n\nINCORRECT crossProductDataField (18): k x k != 0; ";
863 <<
"===============================================================================\n"\
864 <<
"| TEST 1.c: 2D crossProductDataField operations: (C,P,D) and (C,F,P,D) |\n"\
865 <<
"===============================================================================\n";
875 ijData_1c(0, 0, 0) = 1.0; ijData_1c(0, 0, 1) = 0.0;
876 ijData_1c(0, 1, 0) = 1.0; ijData_1c(0, 1, 1) = 0.0;
878 ijData_1c(1, 0, 0) = 0.0; ijData_1c(1, 0, 1) = 1.0;
879 ijData_1c(1, 1, 0) = 0.0; ijData_1c(1, 1, 1) = 1.0;
884 ijFields_1c(0, 0, 0, 0) = 1.0; ijFields_1c(0, 0, 0, 1) = 0.0;
885 ijFields_1c(0, 0, 1, 0) = 1.0; ijFields_1c(0, 0, 1, 1) = 0.0;
887 ijFields_1c(0, 1, 0, 0) = 0.0; ijFields_1c(0, 1, 0, 1) = 1.0;
888 ijFields_1c(0, 1, 1, 0) = 0.0; ijFields_1c(0, 1, 1, 1) = 1.0;
891 ijFields_1c(1, 0, 0, 0) = 1.0; ijFields_1c(1, 0, 0, 1) = 0.0;
892 ijFields_1c(1, 0, 1, 0) = 1.0; ijFields_1c(1, 0, 1, 1) = 0.0;
894 ijFields_1c(1, 1, 0, 0) = 0.0; ijFields_1c(1, 1, 0, 1) = 1.0;
895 ijFields_1c(1, 1, 1, 0) = 0.0; ijFields_1c(1, 1, 1, 1) = 1.0;
898 outFields.resize(2, 2, 2);
899 art::crossProductDataField<double>(outFields, ijData_1c, ijFields_1c);
901 if( !(outFields(0,0,0)==0.0 && outFields(0,0,1)==0.0 ) ) {
902 *outStream <<
"\n\nINCORRECT crossProductDataField (19): i x i != 0; ";
905 if( !(outFields(0,1,0)==1.0 && outFields(0,1,1)==1.0 ) ) {
906 *outStream <<
"\n\nINCORRECT crossProductDataField (20): i x j != 1; ";
910 if( !(outFields(1,0,0)==-1.0 && outFields(1,0,1)==-1.0 ) ) {
911 *outStream <<
"\n\nINCORRECT crossProductDataField (21): j x i != -1; ";
914 if( !(outFields(1,1,0)==0.0 && outFields(1,1,1)==0.0 ) ) {
915 *outStream <<
"\n\nINCORRECT crossProductDataField (22): j x j != 0; ";
921 <<
"===============================================================================\n"\
922 <<
"| TEST 1.d: 2D crossProductDataField operations: (C,P,D) and (F,P,D) |\n"\
923 <<
"===============================================================================\n";
932 ijFields_1d(0, 0, 0) = 1.0; ijFields_1d(0, 0, 1) = 0.0;
933 ijFields_1d(0, 1, 0) = 0.0; ijFields_1d(0, 1, 1) = 1.0;
936 outFields.resize(2, 1, 2);
937 art::crossProductDataField<double>(outFields, ijData_1c, ijFields_1d);
939 if( !(outFields(0,0,0)==0.0 ) ) {
940 *outStream <<
"\n\nINCORRECT crossProductDataField (23): i x i != 0; ";
943 if( !(outFields(0,0,1)==1.0 ) ) {
944 *outStream <<
"\n\nINCORRECT crossProductDataField (24): i x j != 1; ";
947 if( !(outFields(1,0,0)==-1.0 ) ) {
948 *outStream <<
"\n\nINCORRECT crossProductDataField (25): j x i != -1; ";
951 if( !(outFields(1,0,1)==0.0 ) ) {
952 *outStream <<
"\n\nINCORRECT crossProductDataField (26): j x j != 0; ";
959 <<
"===============================================================================\n"\
960 <<
"| TEST 2.a: 3D crossProductDataData operations: (C,P,D) and (C,P,D) |\n"\
961 <<
"===============================================================================\n";
970 jkiData_2a(0, 0, 0) = 0.0; jkiData_2a(0, 0, 1) = 1.0; jkiData_2a(0, 0, 2) = 0.0;
971 jkiData_2a(0, 1, 0) = 0.0; jkiData_2a(0, 1, 1) = 1.0; jkiData_2a(0, 1, 2) = 0.0;
973 jkiData_2a(1, 0, 0) = 0.0; jkiData_2a(1, 0, 1) = 0.0; jkiData_2a(1, 0, 2) = 1.0;
974 jkiData_2a(1, 1, 0) = 0.0; jkiData_2a(1, 1, 1) = 0.0; jkiData_2a(1, 1, 2) = 1.0;
976 jkiData_2a(2, 0, 0) = 1.0; jkiData_2a(2, 0, 1) = 0.0; jkiData_2a(2, 0, 2) = 0.0;
977 jkiData_2a(2, 1, 0) = 1.0; jkiData_2a(2, 1, 1) = 0.0; jkiData_2a(2, 1, 2) = 0.0;
981 kijData_2a(0, 0, 0) = 0.0; kijData_2a(0, 0, 1) = 0.0; kijData_2a(0, 0, 2) = 1.0;
982 kijData_2a(0, 1, 0) = 0.0; kijData_2a(0, 1, 1) = 0.0; kijData_2a(0, 1, 2) = 1.0;
984 kijData_2a(1, 0, 0) = 1.0; kijData_2a(1, 0, 1) = 0.0; kijData_2a(1, 0, 2) = 0.0;
985 kijData_2a(1, 1, 0) = 1.0; kijData_2a(1, 1, 1) = 0.0; kijData_2a(1, 1, 2) = 0.0;
987 kijData_2a(2, 0, 0) = 0.0; kijData_2a(2, 0, 1) = 1.0; kijData_2a(2, 0, 2) = 0.0;
988 kijData_2a(2, 1, 0) = 0.0; kijData_2a(2, 1, 1) = 1.0; kijData_2a(2, 1, 2) = 0.0;
993 art::crossProductDataData<double>(outData, ijkData_1a, ijkData_1a);
995 for(
int i = 0; i < outData.size(); i++){
996 if(outData[i] != 0) {
997 *outStream <<
"\n\nINCORRECT crossProductDataData (1): i x i, j x j, or k x k != 0; ";
1004 art::crossProductDataData<double>(outData, ijkData_1a, jkiData_2a);
1007 if( !( outData(0,0,0)==0.0 && outData(0,0,1)==0.0 && outData(0,0,2)==1.0 &&
1008 outData(0,1,0)==0.0 && outData(0,1,1)==0.0 && outData(0,1,2)==1.0) ) {
1009 *outStream <<
"\n\nINCORRECT crossProductDataData (2): i x j != k; ";
1014 if( !( outData(1,0,0)==1.0 && outData(1,0,1)==0.0 && outData(1,0,2)==0.0 &&
1015 outData(1,1,0)==1.0 && outData(1,1,1)==0.0 && outData(1,1,2)==0.0) ) {
1016 *outStream <<
"\n\nINCORRECT crossProductDataData (3): j x k != i; ";
1021 if( !( outData(2,0,0)==0.0 && outData(2,0,1)==1.0 && outData(2,0,2)==0.0 &&
1022 outData(2,1,0)==0.0 && outData(2,1,1)==1.0 && outData(2,1,2)==0.0) ) {
1023 *outStream <<
"\n\nINCORRECT crossProductDataData (4): k x i != j; ";
1029 art::crossProductDataData<double>(outData, ijkData_1a, kijData_2a);
1032 if( !( outData(0,0,0)==0.0 && outData(0,0,1)==-1.0 && outData(0,0,2)==0.0 &&
1033 outData(0,1,0)==0.0 && outData(0,1,1)==-1.0 && outData(0,1,2)==0.0) ) {
1034 *outStream <<
"\n\nINCORRECT crossProductDataData (5): i x k != -j; ";
1039 if( !( outData(1,0,0)==0.0 && outData(1,0,1)==0.0 && outData(1,0,2)==-1.0 &&
1040 outData(1,1,0)==0.0 && outData(1,1,1)==0.0 && outData(1,1,2)==-1.0) ) {
1041 *outStream <<
"\n\nINCORRECT crossProductDataData (6): j x i != -k; ";
1046 if( !( outData(2,0,0)==-1.0 && outData(2,0,1)==0.0 && outData(2,0,2)==0.0 &&
1047 outData(2,1,0)==-1.0 && outData(2,1,1)==0.0 && outData(2,1,2)==0.0) ) {
1048 *outStream <<
"\n\nINCORRECT crossProductDataData (7): k x j != -i; ";
1055 <<
"===============================================================================\n"\
1056 <<
"| TEST 2.b: 3D crossProductDataData operations: (C,P,D) and (P,D) |\n"\
1057 <<
"===============================================================================\n";
1067 ijkData_2b(0, 0) = 1.0; ijkData_2b(0, 1) = 0.0; ijkData_2b(0, 2) = 0.0;
1068 ijkData_2b(1, 0) = 0.0; ijkData_2b(1, 1) = 1.0; ijkData_2b(1, 2) = 0.0;
1069 ijkData_2b(2, 0) = 0.0; ijkData_2b(2, 1) = 0.0; ijkData_2b(2, 2) = 1.0;
1072 outData.resize(3, 3, 3);
1073 art::crossProductDataData<double>(outData, ijkData_1b, ijkData_2b);
1076 if( !(outData(0,0,0)==0.0 && outData(0,0,1)==0.0 && outData(0,0,2)==0.0) ) {
1077 *outStream <<
"\n\nINCORRECT crossProductDataData (5): i x i != 0; ";
1080 if( !(outData(0,1,0)==0.0 && outData(0,1,1)==0.0 && outData(0,1,2)==1.0) ) {
1081 *outStream <<
"\n\nINCORRECT crossProductDataData (6): i x j != k; ";
1084 if( !(outData(0,2,0)==0.0 && outData(0,2,1)==-1.0 && outData(0,2,2)==0.0) ) {
1085 *outStream <<
"\n\nINCORRECT crossProductDataData (7): i x k != -j; ";
1090 if( !(outData(1,0,0)==0.0 && outData(1,0,1)==0.0 && outData(1,0,2)==-1.0) ) {
1091 *outStream <<
"\n\nINCORRECT crossProductDataData (8): j x i != -k; ";
1094 if( !(outData(1,1,0)==0.0 && outData(1,1,1)==0.0 && outData(1,1,2)==0.0) ) {
1095 *outStream <<
"\n\nINCORRECT crossProductDataData (9): j x j != 0; ";
1098 if( !(outData(1,2,0)==1.0 && outData(1,2,1)==0.0 && outData(1,2,2)==0.0) ) {
1099 *outStream <<
"\n\nINCORRECT crossProductDataData (10): j x k != i; ";
1104 if( !(outData(2,0,0)==0.0 && outData(2,0,1)==1.0 && outData(2,0,2)==0.0) ) {
1105 *outStream <<
"\n\nINCORRECT crossProductDataData (11): k x i != j; ";
1108 if( !(outData(2,1,0)==-1.0 && outData(2,1,1)==0.0 && outData(2,1,2)==0.0) ) {
1109 *outStream <<
"\n\nINCORRECT crossProductDataData (12): k x j != -i; ";
1112 if( !(outData(2,2,0)==0.0 && outData(2,2,1)==0.0 && outData(2,2,2)==0.0) ) {
1113 *outStream <<
"\n\nINCORRECT crossProductDataData (13): k x k != 0; ";
1120 <<
"===============================================================================\n"\
1121 <<
"| TEST 2.c: 2D crossProductDataData operations: (C,P,D) and (C,P,D) |\n"\
1122 <<
"===============================================================================\n";
1130 jiData_2c(0, 0, 0) = 0.0; jiData_2c(0, 0, 1) = 1.0;
1131 jiData_2c(0, 1, 0) = 0.0; jiData_2c(0, 1, 1) = 1.0;
1133 jiData_2c(1, 0, 0) = 1.0; jiData_2c(1, 0, 1) = 0.0;
1134 jiData_2c(1, 1, 0) = 1.0; jiData_2c(1, 1, 1) = 0.0;
1138 outData.resize(2,2);
1139 art::crossProductDataData<double>(outData, ijData_1c, ijData_1c);
1141 for(
int i = 0; i < outData.size(); i++){
1142 if(outData[i] != 0) {
1143 *outStream <<
"\n\nINCORRECT crossProductDataData (14): i x i or j x j != 0; ";
1149 art::crossProductDataData<double>(outData, ijData_1c, jiData_2c);
1151 if( !(outData(0,0)==1.0 && outData(0,1)==1.0 ) ) {
1152 *outStream <<
"\n\nINCORRECT crossProductDataData (15): i x j != 1; ";
1155 if( !(outData(1,0)==-1.0 && outData(1,1)==-1.0 ) ) {
1156 *outStream <<
"\n\nINCORRECT crossProductDataData (16): j x i != -1; ";
1162 <<
"===============================================================================\n"\
1163 <<
"| TEST 2.d: 2D crossProductDataData operations: (C,P,D) and (P,D) |\n"\
1164 <<
"===============================================================================\n";
1171 ijData_2d(0, 0) = 1.0; ijData_2d(0, 1) = 0.0;
1172 ijData_2d(1, 0) = 0.0; ijData_2d(1, 1) = 1.0;
1174 outData.resize(2,2);
1175 art::crossProductDataData<double>(outData, ijData_1c, ijData_2d);
1177 if( !(outData(0,0)==0.0 ) ) {
1178 *outStream <<
"\n\nINCORRECT crossProductDataData (17): i x i != 0; ";
1181 if( !(outData(0,1)==1.0 ) ) {
1182 *outStream <<
"\n\nINCORRECT crossProductDataData (18): i x j != 1; ";
1185 if( !(outData(1,0)==-1.0 ) ) {
1186 *outStream <<
"\n\nINCORRECT crossProductDataData (19): j x i != -1; ";
1189 if( !(outData(1,1)==0.0 ) ) {
1190 *outStream <<
"\n\nINCORRECT crossProductDataData (20): j x j != 0; ";
1197 <<
"===============================================================================\n"\
1198 <<
"| TEST 3.a: outerProductDataField operations: (C,P,D) and (C,F,P,D) |\n"\
1199 <<
"===============================================================================\n";
1209 outFields.resize(3, 3, 2, 3, 3);
1210 art::outerProductDataField<double>(outFields, ijkData_1a, ijkFields_1a);
1212 for(
int cell = 0; cell < ijkData_1a.dimension(0); cell++){
1213 for(
int field = 0; field < ijkFields_1a.dimension(1); field++){
1214 for(
int point = 0; point < ijkData_1a.dimension(1); point++){
1215 for(
int row = 0; row < ijkData_1a.dimension(2); row++){
1216 for(
int col = 0; col < ijkData_1a.dimension(2); col++){
1219 if( (row == cell && col == field) ){
1220 if(outFields(cell, field, point, row, col) != 1.0) {
1221 *outStream <<
"\n\nINCORRECT outerProductDataField (1): computed value is "
1222 << outFields(cell, field, point, row, col) <<
" whereas correct value is 1.0";
1227 if(outFields(cell, field, point, row, col) != 0.0) {
1228 *outStream <<
"\n\nINCORRECT outerProductDataField (2): computed value is "
1229 << outFields(cell, field, point, row, col) <<
" whereas correct value is 0.0";
1241 <<
"===============================================================================\n"\
1242 <<
"| TEST 3.b: outerProductDataField operations: (C,P,D) and (F,P,D) |\n"\
1243 <<
"===============================================================================\n";
1253 outFields.resize(3, 1, 3, 3, 3);
1254 art::outerProductDataField<double>(outFields, ijkData_1b, ijkFields_1b);
1256 for(
int cell = 0; cell < ijkData_1b.dimension(0); cell++){
1257 for(
int field = 0; field < ijkFields_1b.dimension(0); field++){
1258 for(
int point = 0; point < ijkData_1b.dimension(1); point++){
1259 for(
int row = 0; row < ijkData_1b.dimension(2); row++){
1260 for(
int col = 0; col < ijkData_1b.dimension(2); col++){
1263 if( (row == cell && col == point) ){
1264 if(outFields(cell, field, point, row, col) != 1.0) {
1265 *outStream <<
"\n\nINCORRECT outerProductDataField (3): computed value is "
1266 << outFields(cell, field, point, row, col) <<
" whereas correct value is 1.0";
1272 if(outFields(cell, field, point, row, col) != 0.0) {
1273 *outStream <<
"\n\nINCORRECT outerProductDataField (4): computed value is "
1274 << outFields(cell, field, point, row, col) <<
" whereas correct value is 0.0";
1286 <<
"===============================================================================\n"\
1287 <<
"| TEST 4.a: outerProductDataData operations: (C,P,D) and (C,P,D) |\n"\
1288 <<
"===============================================================================\n";
1297 outData.resize(3, 2, 3, 3);
1299 art::outerProductDataData<double>(outData, ijkData_1a, ijkData_1a);
1300 for(
int cell = 0; cell < ijkData_1a.dimension(0); cell++){
1301 for(
int point = 0; point < ijkData_1a.dimension(1); point++){
1302 for(
int row = 0; row < ijkData_1a.dimension(2); row++){
1303 for(
int col = 0; col < ijkData_1a.dimension(2); col++){
1306 if( (row == cell && col == cell) ){
1307 if(outData(cell, point, row, col) != 1.0) {
1308 *outStream <<
"\n\nINCORRECT outerProductDataData (1): computed value is "
1309 << outData(cell, point, row, col) <<
" whereas correct value is 1.0";
1314 if(outData(cell, point, row, col) != 0.0) {
1315 *outStream <<
"\n\nINCORRECT outerProductDataData (2): computed value is "
1316 << outData(cell, point, row, col) <<
" whereas correct value is 0.0";
1325 outData.initialize();
1326 art::outerProductDataData<double>(outData, ijkData_1a, jkiData_2a);
1327 for(
int cell = 0; cell < ijkData_1a.dimension(0); cell++){
1328 for(
int point = 0; point < ijkData_1a.dimension(1); point++){
1329 for(
int row = 0; row < ijkData_1a.dimension(2); row++){
1330 for(
int col = 0; col < ijkData_1a.dimension(2); col++){
1333 if( (row == cell && col == (cell + 1) % 3) ){
1334 if(outData(cell, point, row, col) != 1.0) {
1335 *outStream <<
"\n\nINCORRECT outerProductDataData (3): computed value is "
1336 << outData(cell, point, row, col) <<
" whereas correct value is 1.0";
1341 if(outData(cell, point, row, col) != 0.0) {
1342 *outStream <<
"\n\nINCORRECT outerProductDataData (4): computed value is "
1343 << outData(cell, point, row, col) <<
" whereas correct value is 0.0";
1353 outData.initialize();
1354 art::outerProductDataData<double>(outData, ijkData_1a, kijData_2a);
1355 for(
int cell = 0; cell < ijkData_1a.dimension(0); cell++){
1356 for(
int point = 0; point < ijkData_1a.dimension(1); point++){
1357 for(
int row = 0; row < ijkData_1a.dimension(2); row++){
1358 for(
int col = 0; col < ijkData_1a.dimension(2); col++){
1361 if( (row == cell && col == (cell + 2) % 3) ){
1362 if(outData(cell, point, row, col) != 1.0) {
1363 *outStream <<
"\n\nINCORRECT outerProductDataData (5): computed value is "
1364 << outData(cell, point, row, col) <<
" whereas correct value is 1.0";
1369 if(outData(cell, point, row, col) != 0.0) {
1370 *outStream <<
"\n\nINCORRECT outerProductDataData (6): computed value is "
1371 << outData(cell, point, row, col) <<
" whereas correct value is 0.0";
1383 <<
"===============================================================================\n"\
1384 <<
"| TEST 4.b: outerProductDataData operations: (C,P,D) and (P,D) |\n"\
1385 <<
"===============================================================================\n";
1394 outData.resize(3,3,3,3);
1395 art::outerProductDataData<double>(outData, ijkData_1b, ijkData_2b);
1396 for(
int cell = 0; cell < ijkData_1b.dimension(0); cell++){
1397 for(
int point = 0; point < ijkData_1b.dimension(1); point++){
1398 for(
int row = 0; row < ijkData_1b.dimension(2); row++){
1399 for(
int col = 0; col < ijkData_1b.dimension(2); col++){
1402 if( (row == cell && col == point) ){
1403 if(outData(cell, point, row, col) != 1.0) {
1404 *outStream <<
"\n\nINCORRECT outerProductDataData (7): computed value is "
1405 << outData(cell, point, row, col) <<
" whereas correct value is 1.0";
1410 if(outData(cell, point, row, col) != 0.0) {
1411 *outStream <<
"\n\nINCORRECT outerProductDataData (8): computed value is "
1412 << outData(cell, point, row, col) <<
" whereas correct value is 0.0";
1423 <<
"===============================================================================\n"\
1424 <<
"| TEST 5.a: matvecProductDataField operations: (C,P,D,D) and (C,F,P,D) |\n"\
1425 <<
"===============================================================================\n";
1436 inputMat(0,0,0,0) = 1.0; inputMat(0,0,0,1) = 1.0; inputMat(0,0,0,2) = 1.0;
1437 inputMat(0,0,1,0) =-1.0; inputMat(0,0,1,1) = 2.0; inputMat(0,0,1,2) =-1.0;
1438 inputMat(0,0,2,0) = 1.0; inputMat(0,0,2,1) = 2.0; inputMat(0,0,2,2) = 3.0;
1440 inputMat(1,0,0,0) = 0.0; inputMat(1,0,0,1) = 0.0; inputMat(1,0,0,2) = 0.0;
1441 inputMat(1,0,1,0) =-1.0; inputMat(1,0,1,1) =-2.0; inputMat(1,0,1,2) =-3.0;
1442 inputMat(1,0,2,0) =-2.0; inputMat(1,0,2,1) = 6.0; inputMat(1,0,2,2) =-4.0;
1447 inputVecFields(0,0,0,0) = 0.0; inputVecFields(0,0,0,1) = 0.0; inputVecFields(0,0,0,2) = 0.0;
1448 inputVecFields(0,1,0,0) = 1.0; inputVecFields(0,1,0,1) = 1.0; inputVecFields(0,1,0,2) = 1.0;
1450 inputVecFields(1,0,0,0) =-1.0; inputVecFields(1,0,0,1) =-1.0; inputVecFields(1,0,0,2) =-1.0;
1451 inputVecFields(1,1,0,0) =-1.0; inputVecFields(1,1,0,1) = 1.0; inputVecFields(1,1,0,2) =-1.0;
1456 outFieldsCorrect(0,0,0,0) = 0.0; outFieldsCorrect(0,0,0,1) = 0.0; outFieldsCorrect(0,0,0,2) = 0.0;
1457 outFieldsCorrect(0,1,0,0) = 3.0; outFieldsCorrect(0,1,0,1) = 0.0; outFieldsCorrect(0,1,0,2) = 6.0;
1459 outFieldsCorrect(1,0,0,0) = 0.0; outFieldsCorrect(1,0,0,1) = 6.0; outFieldsCorrect(1,0,0,2) = 0.0;
1460 outFieldsCorrect(1,1,0,0) = 0.0; outFieldsCorrect(1,1,0,1) = 2.0; outFieldsCorrect(1,1,0,2) = 12.0;
1463 outFields.resize(2,2,1,3);
1464 art::matvecProductDataField<double>(outFields, inputMat, inputVecFields);
1467 for(
int cell = 0; cell < outFields.dimension(0); cell++){
1468 for(
int field = 0; field < outFields.dimension(1); field++){
1469 for(
int point = 0; point < outFields.dimension(2); point++){
1470 for(
int row = 0; row < outFields.dimension(3); row++){
1471 if(outFields(cell, field, point, row) != outFieldsCorrect(cell, field, point, row)) {
1472 *outStream <<
"\n\nINCORRECT matvecProductDataField (1): \n value at multi-index ("
1473 << cell <<
"," << field <<
"," << point <<
"," << row <<
") = "
1474 << outFields(cell, field, point, row) <<
" but correct value is "
1475 << outFieldsCorrect(cell, field, point, row) <<
"\n";
1486 <<
"===============================================================================\n"\
1487 <<
"| TEST 5.b: matvecProductDataField operations: (C,P,D,D) and (F,P,D) |\n"\
1488 <<
"===============================================================================\n";
1497 inputVecFields.resize(4,1,3);
1499 inputVecFields(0,0,0) = 0.0; inputVecFields(0,0,1) = 0.0; inputVecFields(0,0,2) = 0.0;
1500 inputVecFields(1,0,0) = 1.0; inputVecFields(1,0,1) = 1.0; inputVecFields(1,0,2) = 1.0;
1501 inputVecFields(2,0,0) =-1.0; inputVecFields(2,0,1) =-1.0; inputVecFields(2,0,2) =-1.0;
1502 inputVecFields(3,0,0) =-1.0; inputVecFields(3,0,1) = 1.0; inputVecFields(3,0,2) =-1.0;
1505 outFieldsCorrect.resize(2,4,1,3);
1507 outFieldsCorrect(0,0,0,0) = 0.0; outFieldsCorrect(0,0,0,1) = 0.0; outFieldsCorrect(0,0,0,2) = 0.0;
1508 outFieldsCorrect(0,1,0,0) = 3.0; outFieldsCorrect(0,1,0,1) = 0.0; outFieldsCorrect(0,1,0,2) = 6.0;
1509 outFieldsCorrect(0,2,0,0) =-3.0; outFieldsCorrect(0,2,0,1) = 0.0; outFieldsCorrect(0,2,0,2) =-6.0;
1510 outFieldsCorrect(0,3,0,0) =-1.0; outFieldsCorrect(0,3,0,1) = 4.0; outFieldsCorrect(0,3,0,2) =-2.0;
1512 outFieldsCorrect(1,0,0,0) = 0.0; outFieldsCorrect(1,0,0,1) = 0.0; outFieldsCorrect(1,0,0,2) = 0.0;
1513 outFieldsCorrect(1,1,0,0) = 0.0; outFieldsCorrect(1,1,0,1) =-6.0; outFieldsCorrect(1,1,0,2) = 0.0;
1514 outFieldsCorrect(1,2,0,0) = 0.0; outFieldsCorrect(1,2,0,1) = 6.0; outFieldsCorrect(1,2,0,2) = 0.0;
1515 outFieldsCorrect(1,3,0,0) = 0.0; outFieldsCorrect(1,3,0,1) = 2.0; outFieldsCorrect(1,3,0,2) =12.0;
1518 outFields.resize(2,4,1,3);
1519 art::matvecProductDataField<double>(outFields, inputMat, inputVecFields);
1522 for(
int cell = 0; cell < outFields.dimension(0); cell++){
1523 for(
int field = 0; field < outFields.dimension(1); field++){
1524 for(
int point = 0; point < outFields.dimension(2); point++){
1525 for(
int row = 0; row < outFields.dimension(3); row++){
1526 if(outFields(cell, field, point, row) != outFieldsCorrect(cell, field, point, row)) {
1527 *outStream <<
"\n\nINCORRECT matvecProductDataField (2): \n value at multi-index ("
1528 << cell <<
"," << field <<
"," << point <<
"," << row <<
") = "
1529 << outFields(cell, field, point, row) <<
" but correct value is "
1530 << outFieldsCorrect(cell, field, point, row) <<
"\n";
1541 <<
"===============================================================================\n"\
1542 <<
"| TEST 5.c: matvecProductDataField random tests: branch inputFields(C,F,P,D) |\n"\
1543 <<
"===============================================================================\n";
1548 int c=5, p=9, f=7, d1=3;
1549 double zero = INTREPID_TOL*10000.0;
1572 for (
int i=0; i<in_c_f_p_d.size(); i++) {
1573 in_c_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1575 for (
int i=0; i<data_c_p.size(); i++) {
1576 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
1577 datainv_c_p[i] = 1.0 / data_c_p[i];
1579 for (
int i=0; i<data_c_1.size(); i++) {
1580 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
1581 datainv_c_1[i] = 1.0 / data_c_1[i];
1584 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p, in_c_f_p_d);
1585 art::matvecProductDataField<double>(out_c_f_p_d, datainv_c_p, out_c_f_p_d);
1586 rst::subtract(&out_c_f_p_d[0], &in_c_f_p_d[0], out_c_f_p_d.size());
1587 if (rst::vectorNorm(&out_c_f_p_d[0], out_c_f_p_d.size(), NORM_ONE) > zero) {
1588 *outStream <<
"\n\nINCORRECT matvecProductDataField (3): check scalar inverse property\n\n";
1592 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1, in_c_f_p_d);
1593 art::matvecProductDataField<double>(out_c_f_p_d, datainv_c_1, out_c_f_p_d);
1594 rst::subtract(&out_c_f_p_d[0], &in_c_f_p_d[0], out_c_f_p_d.size());
1595 if (rst::vectorNorm(&out_c_f_p_d[0], out_c_f_p_d.size(), NORM_ONE) > zero) {
1596 *outStream <<
"\n\nINCORRECT matvecProductDataField (4): check scalar inverse property\n\n";
1602 for (
int i=0; i<in_c_f_p_d.size(); i++) {
1603 in_c_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1605 for (
int i=0; i<data_c_p_d.size(); i++) {
1606 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
1607 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
1609 for (
int i=0; i<data_c_1_d.size(); i++) {
1610 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
1611 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
1614 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d, in_c_f_p_d);
1615 art::matvecProductDataField<double>(out_c_f_p_d, datainv_c_p_d, out_c_f_p_d);
1616 rst::subtract(&out_c_f_p_d[0], &in_c_f_p_d[0], out_c_f_p_d.size());
1617 if (rst::vectorNorm(&out_c_f_p_d[0], out_c_f_p_d.size(), NORM_ONE) > zero) {
1618 *outStream <<
"\n\nINCORRECT matvecProductDataField (5): check scalar inverse property\n\n";
1622 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d, in_c_f_p_d);
1623 art::matvecProductDataField<double>(out_c_f_p_d, datainv_c_1_d, out_c_f_p_d);
1624 rst::subtract(&out_c_f_p_d[0], &in_c_f_p_d[0], out_c_f_p_d.size());
1625 if (rst::vectorNorm(&out_c_f_p_d[0], out_c_f_p_d.size(), NORM_ONE) > zero) {
1626 *outStream <<
"\n\nINCORRECT matvecProductDataField (6): check scalar inverse property\n\n";
1632 for (
int i=0; i<in_c_f_p_d.size(); i++) {
1633 in_c_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1635 for (
int ic=0; ic < c; ic++) {
1636 for (
int ip=0; ip < p; ip++) {
1637 for (
int i=0; i<d1*d1; i++) {
1638 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1643 for (
int ic=0; ic < c; ic++) {
1644 for (
int ip=0; ip < 1; ip++) {
1645 for (
int i=0; i<d1*d1; i++) {
1646 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1652 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d_d, in_c_f_p_d);
1653 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_p_d_d, out_c_f_p_d);
1654 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1655 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1656 *outStream <<
"\n\nINCORRECT matvecProductDataField (7): check matrix inverse property\n\n";
1659 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d_d, in_c_f_p_d,
't');
1660 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_p_d_d, out_c_f_p_d,
't');
1661 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1662 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1663 *outStream <<
"\n\nINCORRECT matvecProductDataField (8): check matrix inverse property, w/ double transpose\n\n";
1667 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d_d, in_c_f_p_d);
1668 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_1_d_d, out_c_f_p_d);
1669 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1670 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1671 *outStream <<
"\n\nINCORRECT matvecProductDataField (9): check matrix inverse property\n\n";
1674 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d_d, in_c_f_p_d,
't');
1675 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_1_d_d, out_c_f_p_d,
't');
1676 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1677 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1678 *outStream <<
"\n\nINCORRECT matvecProductDataField (10): check matrix inverse property, w/ double transpose\n\n";
1684 for (
int i=0; i<in_c_f_p_d.size(); i++) {
1685 in_c_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1687 for (
int ic=0; ic < c; ic++) {
1688 for (
int ip=0; ip < p; ip++) {
1689 for (
int i=0; i<d1*d1; i++) {
1690 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1696 for (
int ic=0; ic < c; ic++) {
1697 for (
int ip=0; ip < 1; ip++) {
1698 for (
int i=0; i<d1*d1; i++) {
1699 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1706 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d_d, in_c_f_p_d);
1707 art::matvecProductDataField<double>(outi_c_f_p_d, datainvtrn_c_p_d_d, out_c_f_p_d,
't');
1708 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1709 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1710 *outStream <<
"\n\nINCORRECT matvecProductDataField (11): check matrix inverse transpose property\n\n";
1714 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d_d, in_c_f_p_d);
1715 art::matvecProductDataField<double>(outi_c_f_p_d, datainvtrn_c_1_d_d, out_c_f_p_d,
't');
1716 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1717 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1718 *outStream <<
"\n\nINCORRECT matvecProductDataField (12): check matrix inverse transpose property\n\n";
1726 <<
"===============================================================================\n"\
1727 <<
"| TEST 5.d: matvecProductDataField random tests: branch inputFields(F,P,D) |\n"\
1728 <<
"===============================================================================\n";
1733 int c=5, p=9, f=7, d1=3;
1734 double zero = INTREPID_TOL*10000.0;
1759 for (
int i=0; i<in_f_p_d.size(); i++) {
1760 in_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1762 for (
int i=0; i<data_c_p.size(); i++) {
1763 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
1764 datainv_c_p[i] = 1.0 / data_c_p[i];
1765 data_c_p_one[i] = 1.0;
1767 for (
int i=0; i<data_c_1.size(); i++) {
1768 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
1769 datainv_c_1[i] = 1.0 / data_c_1[i];
1772 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1773 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p, in_f_p_d);
1774 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_p, out_c_f_p_d);
1775 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1776 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1777 *outStream <<
"\n\nINCORRECT matvecProductDataField (13): check scalar inverse property\n\n";
1781 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1782 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1, in_f_p_d);
1783 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_1, out_c_f_p_d);
1784 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1785 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1786 *outStream <<
"\n\nINCORRECT matvecProductDataField (14): check scalar inverse property\n\n";
1792 for (
int i=0; i<in_f_p_d.size(); i++) {
1793 in_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1795 for (
int i=0; i<data_c_p_d.size(); i++) {
1796 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
1797 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
1799 for (
int i=0; i<data_c_1_d.size(); i++) {
1800 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
1801 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
1804 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1805 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d, in_f_p_d);
1806 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_p_d, out_c_f_p_d);
1807 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1808 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1809 *outStream <<
"\n\nINCORRECT matvecProductDataField (15): check scalar inverse property\n\n";
1813 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1814 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d, in_f_p_d);
1815 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_1_d, out_c_f_p_d);
1816 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1817 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1818 *outStream <<
"\n\nINCORRECT matvecProductDataField (16): check scalar inverse property\n\n";
1824 for (
int i=0; i<in_f_p_d.size(); i++) {
1825 in_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1827 for (
int ic=0; ic < c; ic++) {
1828 for (
int ip=0; ip < p; ip++) {
1829 for (
int i=0; i<d1*d1; i++) {
1830 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1835 for (
int ic=0; ic < c; ic++) {
1836 for (
int ip=0; ip < 1; ip++) {
1837 for (
int i=0; i<d1*d1; i++) {
1838 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1844 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1845 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d_d, in_f_p_d);
1846 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_p_d_d, out_c_f_p_d);
1847 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1848 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1849 *outStream <<
"\n\nINCORRECT matvecProductDataField (17): check matrix inverse property\n\n";
1852 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1853 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d_d, in_f_p_d,
't');
1854 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_p_d_d, out_c_f_p_d,
't');
1855 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1856 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1857 *outStream <<
"\n\nINCORRECT matvecProductDataField (18): check matrix inverse property, w/ double transpose\n\n";
1861 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1862 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d_d, in_f_p_d);
1863 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_1_d_d, out_c_f_p_d);
1864 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1865 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1866 *outStream <<
"\n\nINCORRECT matvecProductDataField (19): check matrix inverse property\n\n";
1869 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1870 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d_d, in_f_p_d,
't');
1871 art::matvecProductDataField<double>(outi_c_f_p_d, datainv_c_1_d_d, out_c_f_p_d,
't');
1872 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1873 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1874 *outStream <<
"\n\nINCORRECT matvecProductDataField (20): check matrix inverse property, w/ double transpose\n\n";
1880 for (
int i=0; i<in_f_p_d.size(); i++) {
1881 in_f_p_d[i] = Teuchos::ScalarTraits<double>::random();
1883 for (
int ic=0; ic < c; ic++) {
1884 for (
int ip=0; ip < p; ip++) {
1885 for (
int i=0; i<d1*d1; i++) {
1886 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1892 for (
int ic=0; ic < c; ic++) {
1893 for (
int ip=0; ip < 1; ip++) {
1894 for (
int i=0; i<d1*d1; i++) {
1895 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
1902 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1903 art::matvecProductDataField<double>(out_c_f_p_d, data_c_p_d_d, in_f_p_d);
1904 art::matvecProductDataField<double>(outi_c_f_p_d, datainvtrn_c_p_d_d, out_c_f_p_d,
't');
1905 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1906 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1907 *outStream <<
"\n\nINCORRECT matvecProductDataField (21): check matrix inverse transpose property\n\n";
1911 art::matvecProductDataField<double>(in_c_f_p_d, data_c_p_one, in_f_p_d);
1912 art::matvecProductDataField<double>(out_c_f_p_d, data_c_1_d_d, in_f_p_d);
1913 art::matvecProductDataField<double>(outi_c_f_p_d, datainvtrn_c_1_d_d, out_c_f_p_d,
't');
1914 rst::subtract(&outi_c_f_p_d[0], &in_c_f_p_d[0], outi_c_f_p_d.size());
1915 if (rst::vectorNorm(&outi_c_f_p_d[0], outi_c_f_p_d.size(), NORM_ONE) > zero) {
1916 *outStream <<
"\n\nINCORRECT matvecProductDataField (22): check matrix inverse transpose property\n\n";
1925 <<
"===============================================================================\n"\
1926 <<
"| TEST 6.a: matvecProductDataData operations: (C,P,D,D) and (C,P,D) |\n"\
1927 <<
"===============================================================================\n";
1936 inputMat.resize(4,1,3,3);
1938 inputMat(0,0,0,0) = 1.0; inputMat(0,0,0,1) = 1.0; inputMat(0,0,0,2) = 1.0;
1939 inputMat(0,0,1,0) =-1.0; inputMat(0,0,1,1) = 2.0; inputMat(0,0,1,2) =-1.0;
1940 inputMat(0,0,2,0) = 1.0; inputMat(0,0,2,1) = 2.0; inputMat(0,0,2,2) = 3.0;
1942 inputMat(1,0,0,0) = 0.0; inputMat(1,0,0,1) = 0.0; inputMat(1,0,0,2) = 0.0;
1943 inputMat(1,0,1,0) =-1.0; inputMat(1,0,1,1) =-2.0; inputMat(1,0,1,2) =-3.0;
1944 inputMat(1,0,2,0) =-2.0; inputMat(1,0,2,1) = 6.0; inputMat(1,0,2,2) =-4.0;
1946 inputMat(2,0,0,0) = 1.0; inputMat(2,0,0,1) = 1.0; inputMat(2,0,0,2) = 1.0;
1947 inputMat(2,0,1,0) =-1.0; inputMat(2,0,1,1) = 2.0; inputMat(2,0,1,2) =-1.0;
1948 inputMat(2,0,2,0) = 1.0; inputMat(2,0,2,1) = 2.0; inputMat(2,0,2,2) = 3.0;
1950 inputMat(3,0,0,0) = 0.0; inputMat(3,0,0,1) = 0.0; inputMat(3,0,0,2) = 0.0;
1951 inputMat(3,0,1,0) =-1.0; inputMat(3,0,1,1) =-2.0; inputMat(3,0,1,2) =-3.0;
1952 inputMat(3,0,2,0) =-2.0; inputMat(3,0,2,1) = 6.0; inputMat(3,0,2,2) =-4.0;
1955 inputVecFields.resize(4,1,3);
1956 inputVecFields(0,0,0) = 0.0; inputVecFields(0,0,1) = 0.0; inputVecFields(0,0,2) = 0.0;
1957 inputVecFields(1,0,0) = 1.0; inputVecFields(1,0,1) = 1.0; inputVecFields(1,0,2) = 1.0;
1958 inputVecFields(2,0,0) =-1.0; inputVecFields(2,0,1) =-1.0; inputVecFields(2,0,2) =-1.0;
1959 inputVecFields(3,0,0) =-1.0; inputVecFields(3,0,1) = 1.0; inputVecFields(3,0,2) =-1.0;
1962 outFieldsCorrect.resize(4,1,3);
1963 outFieldsCorrect(0,0,0) = 0.0; outFieldsCorrect(0,0,1) = 0.0; outFieldsCorrect(0,0,2) = 0.0;
1964 outFieldsCorrect(1,0,0) = 0.0; outFieldsCorrect(1,0,1) =-6.0; outFieldsCorrect(1,0,2) = 0.0;
1965 outFieldsCorrect(2,0,0) =-3.0; outFieldsCorrect(2,0,1) = 0.0; outFieldsCorrect(2,0,2) =-6.0;
1966 outFieldsCorrect(3,0,0) = 0.0; outFieldsCorrect(3,0,1) = 2.0; outFieldsCorrect(3,0,2) = 12.0;
1969 outFields.resize(4,1,3);
1970 art::matvecProductDataData<double>(outFields, inputMat, inputVecFields);
1973 for(
int cell = 0; cell < outFields.dimension(0); cell++){
1974 for(
int point = 0; point < outFields.dimension(1); point++){
1975 for(
int row = 0; row < outFields.dimension(2); row++){
1976 if(outFields(cell, point, row) != outFieldsCorrect(cell, point, row)) {
1977 *outStream <<
"\n\nINCORRECT matvecProductDataData (1): \n value at multi-index ("
1978 << cell <<
"," << point <<
"," << row <<
") = "
1979 << outFields(cell, point, row) <<
" but correct value is "
1980 << outFieldsCorrect(cell, point, row) <<
"\n";
1990 <<
"===============================================================================\n"\
1991 <<
"| TEST 6.b: matvecProductDataData operations: (C,P,D,D) and (P,D) |\n"\
1992 <<
"===============================================================================\n";
2000 inputMat.resize(1,4,3,3);
2002 inputMat(0,0,0,0) = 1.0; inputMat(0,0,0,1) = 1.0; inputMat(0,0,0,2) = 1.0;
2003 inputMat(0,0,1,0) =-1.0; inputMat(0,0,1,1) = 2.0; inputMat(0,0,1,2) =-1.0;
2004 inputMat(0,0,2,0) = 1.0; inputMat(0,0,2,1) = 2.0; inputMat(0,0,2,2) = 3.0;
2006 inputMat(0,1,0,0) = 0.0; inputMat(0,1,0,1) = 0.0; inputMat(0,1,0,2) = 0.0;
2007 inputMat(0,1,1,0) =-1.0; inputMat(0,1,1,1) =-2.0; inputMat(0,1,1,2) =-3.0;
2008 inputMat(0,1,2,0) =-2.0; inputMat(0,1,2,1) = 6.0; inputMat(0,1,2,2) =-4.0;
2010 inputMat(0,2,0,0) = 1.0; inputMat(0,2,0,1) = 1.0; inputMat(0,2,0,2) = 1.0;
2011 inputMat(0,2,1,0) =-1.0; inputMat(0,2,1,1) = 2.0; inputMat(0,2,1,2) =-1.0;
2012 inputMat(0,2,2,0) = 1.0; inputMat(0,2,2,1) = 2.0; inputMat(0,2,2,2) = 3.0;
2014 inputMat(0,3,0,0) = 0.0; inputMat(0,3,0,1) = 0.0; inputMat(0,3,0,2) = 0.0;
2015 inputMat(0,3,1,0) =-1.0; inputMat(0,3,1,1) =-2.0; inputMat(0,3,1,2) =-3.0;
2016 inputMat(0,3,2,0) =-2.0; inputMat(0,3,2,1) = 6.0; inputMat(0,3,2,2) =-4.0;
2019 inputVecFields.resize(4,3);
2021 inputVecFields(0,0) = 0.0; inputVecFields(0,1) = 0.0; inputVecFields(0,2) = 0.0;
2022 inputVecFields(1,0) = 1.0; inputVecFields(1,1) = 1.0; inputVecFields(1,2) = 1.0;
2023 inputVecFields(2,0) =-1.0; inputVecFields(2,1) =-1.0; inputVecFields(2,2) =-1.0;
2024 inputVecFields(3,0) =-1.0; inputVecFields(3,1) = 1.0; inputVecFields(3,2) =-1.0;
2027 outFieldsCorrect.resize(1,4,3);
2028 outFieldsCorrect(0,0,0) = 0.0; outFieldsCorrect(0,0,1) = 0.0; outFieldsCorrect(0,0,2) = 0.0;
2029 outFieldsCorrect(0,1,0) = 0.0; outFieldsCorrect(0,1,1) =-6.0; outFieldsCorrect(0,1,2) = 0.0;
2030 outFieldsCorrect(0,2,0) =-3.0; outFieldsCorrect(0,2,1) = 0.0; outFieldsCorrect(0,2,2) =-6.0;
2031 outFieldsCorrect(0,3,0) = 0.0; outFieldsCorrect(0,3,1) = 2.0; outFieldsCorrect(0,3,2) = 12.0;
2034 outFields.resize(1,4,3);
2035 art::matvecProductDataData<double>(outFields, inputMat, inputVecFields);
2038 for(
int cell = 0; cell < outFields.dimension(0); cell++){
2039 for(
int point = 0; point < outFields.dimension(1); point++){
2040 for(
int row = 0; row < outFields.dimension(2); row++){
2041 if(outFields(cell, point, row) != outFieldsCorrect(cell, point, row)) {
2042 *outStream <<
"\n\nINCORRECT matvecProductDataData (2): \n value at multi-index ("
2043 << cell <<
"," << point <<
"," << row <<
") = "
2044 << outFields(cell, point, row) <<
" but correct value is "
2045 << outFieldsCorrect(cell, point, row) <<
"\n";
2056 <<
"===============================================================================\n"\
2057 <<
"| TEST 6.c: matvecProductDataData random tests: branch inputDataRight(C,P,D) |\n"\
2058 <<
"===============================================================================\n";
2064 double zero = INTREPID_TOL*10000.0;
2087 for (
int i=0; i<in_c_p_d.size(); i++) {
2088 in_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2090 for (
int i=0; i<data_c_p.size(); i++) {
2091 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
2092 datainv_c_p[i] = 1.0 / data_c_p[i];
2094 for (
int i=0; i<data_c_1.size(); i++) {
2095 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
2096 datainv_c_1[i] = 1.0 / data_c_1[i];
2099 art::matvecProductDataData<double>(out_c_p_d, data_c_p, in_c_p_d);
2100 art::matvecProductDataData<double>(out_c_p_d, datainv_c_p, out_c_p_d);
2101 rst::subtract(&out_c_p_d[0], &in_c_p_d[0], out_c_p_d.size());
2102 if (rst::vectorNorm(&out_c_p_d[0], out_c_p_d.size(), NORM_ONE) > zero) {
2103 *outStream <<
"\n\nINCORRECT matvecProductDataData (3): check scalar inverse property\n\n";
2107 art::matvecProductDataData<double>(out_c_p_d, data_c_1, in_c_p_d);
2108 art::matvecProductDataData<double>(out_c_p_d, datainv_c_1, out_c_p_d);
2109 rst::subtract(&out_c_p_d[0], &in_c_p_d[0], out_c_p_d.size());
2110 if (rst::vectorNorm(&out_c_p_d[0], out_c_p_d.size(), NORM_ONE) > zero) {
2111 *outStream <<
"\n\nINCORRECT matvecProductDataData (4): check scalar inverse property\n\n";
2117 for (
int i=0; i<in_c_p_d.size(); i++) {
2118 in_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2120 for (
int i=0; i<data_c_p_d.size(); i++) {
2121 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2122 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
2124 for (
int i=0; i<data_c_1_d.size(); i++) {
2125 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
2126 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
2129 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d, in_c_p_d);
2130 art::matvecProductDataData<double>(out_c_p_d, datainv_c_p_d, out_c_p_d);
2131 rst::subtract(&out_c_p_d[0], &in_c_p_d[0], out_c_p_d.size());
2132 if (rst::vectorNorm(&out_c_p_d[0], out_c_p_d.size(), NORM_ONE) > zero) {
2133 *outStream <<
"\n\nINCORRECT matvecProductDataData (5): check scalar inverse property\n\n";
2137 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d, in_c_p_d);
2138 art::matvecProductDataData<double>(out_c_p_d, datainv_c_1_d, out_c_p_d);
2139 rst::subtract(&out_c_p_d[0], &in_c_p_d[0], out_c_p_d.size());
2140 if (rst::vectorNorm(&out_c_p_d[0], out_c_p_d.size(), NORM_ONE) > zero) {
2141 *outStream <<
"\n\nINCORRECT matvecProductDataData (6): check scalar inverse property\n\n";
2147 for (
int i=0; i<in_c_p_d.size(); i++) {
2148 in_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2150 for (
int ic=0; ic < c; ic++) {
2151 for (
int ip=0; ip < p; ip++) {
2152 for (
int i=0; i<d1*d1; i++) {
2153 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2158 for (
int ic=0; ic < c; ic++) {
2159 for (
int ip=0; ip < 1; ip++) {
2160 for (
int i=0; i<d1*d1; i++) {
2161 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2167 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d_d, in_c_p_d);
2168 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_p_d_d, out_c_p_d);
2169 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2170 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2171 *outStream <<
"\n\nINCORRECT matvecProductDataData (7): check matrix inverse property\n\n";
2174 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d_d, in_c_p_d,
't');
2175 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_p_d_d, out_c_p_d,
't');
2176 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2177 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2178 *outStream <<
"\n\nINCORRECT matvecProductDataData (8): check matrix inverse property, w/ double transpose\n\n";
2182 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d_d, in_c_p_d);
2183 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_1_d_d, out_c_p_d);
2184 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2185 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2186 *outStream <<
"\n\nINCORRECT matvecProductDataData (9): check matrix inverse property\n\n";
2189 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d_d, in_c_p_d,
't');
2190 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_1_d_d, out_c_p_d,
't');
2191 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2192 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2193 *outStream <<
"\n\nINCORRECT matvecProductDataData (10): check matrix inverse property, w/ double transpose\n\n";
2199 for (
int i=0; i<in_c_p_d.size(); i++) {
2200 in_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2202 for (
int ic=0; ic < c; ic++) {
2203 for (
int ip=0; ip < p; ip++) {
2204 for (
int i=0; i<d1*d1; i++) {
2205 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2211 for (
int ic=0; ic < c; ic++) {
2212 for (
int ip=0; ip < 1; ip++) {
2213 for (
int i=0; i<d1*d1; i++) {
2214 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2221 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d_d, in_c_p_d);
2222 art::matvecProductDataData<double>(outi_c_p_d, datainvtrn_c_p_d_d, out_c_p_d,
't');
2223 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2224 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2225 *outStream <<
"\n\nINCORRECT matvecProductDataData (11): check matrix inverse transpose property\n\n";
2229 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d_d, in_c_p_d);
2230 art::matvecProductDataData<double>(outi_c_p_d, datainvtrn_c_1_d_d, out_c_p_d,
't');
2231 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2232 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2233 *outStream <<
"\n\nINCORRECT matvecProductDataData (12): check matrix inverse transpose property\n\n";
2241 <<
"===============================================================================\n"\
2242 <<
"| TEST 6.d: matvecProductDataData random tests: branch inputDataRight(P,D) |\n"\
2243 <<
"===============================================================================\n";
2249 double zero = INTREPID_TOL*10000.0;
2274 for (
int i=0; i<in_p_d.size(); i++) {
2275 in_p_d[i] = Teuchos::ScalarTraits<double>::random();
2277 for (
int i=0; i<data_c_p.size(); i++) {
2278 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
2279 datainv_c_p[i] = 1.0 / data_c_p[i];
2280 data_c_p_one[i] = 1.0;
2282 for (
int i=0; i<data_c_1.size(); i++) {
2283 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
2284 datainv_c_1[i] = 1.0 / data_c_1[i];
2287 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2288 art::matvecProductDataData<double>(out_c_p_d, data_c_p, in_p_d);
2289 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_p, out_c_p_d);
2290 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2291 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2292 *outStream <<
"\n\nINCORRECT matvecProductDataData (13): check scalar inverse property\n\n";
2296 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2297 art::matvecProductDataData<double>(out_c_p_d, data_c_1, in_p_d);
2298 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_1, out_c_p_d);
2299 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2300 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2301 *outStream <<
"\n\nINCORRECT matvecProductDataData (14): check scalar inverse property\n\n";
2307 for (
int i=0; i<in_p_d.size(); i++) {
2308 in_p_d[i] = Teuchos::ScalarTraits<double>::random();
2310 for (
int i=0; i<data_c_p_d.size(); i++) {
2311 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2312 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
2314 for (
int i=0; i<data_c_1_d.size(); i++) {
2315 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
2316 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
2319 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2320 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d, in_p_d);
2321 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_p_d, out_c_p_d);
2322 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2323 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2324 *outStream <<
"\n\nINCORRECT matvecProductDataData (15): check scalar inverse property\n\n";
2328 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2329 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d, in_p_d);
2330 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_1_d, out_c_p_d);
2331 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2332 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2333 *outStream <<
"\n\nINCORRECT matvecProductDataData (16): check scalar inverse property\n\n";
2339 for (
int i=0; i<in_p_d.size(); i++) {
2340 in_p_d[i] = Teuchos::ScalarTraits<double>::random();
2342 for (
int ic=0; ic < c; ic++) {
2343 for (
int ip=0; ip < p; ip++) {
2344 for (
int i=0; i<d1*d1; i++) {
2345 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2350 for (
int ic=0; ic < c; ic++) {
2351 for (
int ip=0; ip < 1; ip++) {
2352 for (
int i=0; i<d1*d1; i++) {
2353 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2359 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2360 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d_d, in_p_d);
2361 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_p_d_d, out_c_p_d);
2362 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2363 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2364 *outStream <<
"\n\nINCORRECT matvecProductDataData (17): check matrix inverse property\n\n";
2367 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2368 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d_d, in_p_d,
't');
2369 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_p_d_d, out_c_p_d,
't');
2370 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2371 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2372 *outStream <<
"\n\nINCORRECT matvecProductDataData (18): check matrix inverse property, w/ double transpose\n\n";
2376 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2377 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d_d, in_p_d);
2378 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_1_d_d, out_c_p_d);
2379 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2380 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2381 *outStream <<
"\n\nINCORRECT matvecProductDataData (19): check matrix inverse property\n\n";
2384 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2385 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d_d, in_p_d,
't');
2386 art::matvecProductDataData<double>(outi_c_p_d, datainv_c_1_d_d, out_c_p_d,
't');
2387 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2388 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2389 *outStream <<
"\n\nINCORRECT matvecProductDataData (20): check matrix inverse property, w/ double transpose\n\n";
2395 for (
int i=0; i<in_p_d.size(); i++) {
2396 in_p_d[i] = Teuchos::ScalarTraits<double>::random();
2398 for (
int ic=0; ic < c; ic++) {
2399 for (
int ip=0; ip < p; ip++) {
2400 for (
int i=0; i<d1*d1; i++) {
2401 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2407 for (
int ic=0; ic < c; ic++) {
2408 for (
int ip=0; ip < 1; ip++) {
2409 for (
int i=0; i<d1*d1; i++) {
2410 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2417 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2418 art::matvecProductDataData<double>(out_c_p_d, data_c_p_d_d, in_p_d);
2419 art::matvecProductDataData<double>(outi_c_p_d, datainvtrn_c_p_d_d, out_c_p_d,
't');
2420 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2421 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2422 *outStream <<
"\n\nINCORRECT matvecProductDataData (21): check matrix inverse transpose property\n\n";
2426 art::matvecProductDataData<double>(in_c_p_d, data_c_p_one, in_p_d);
2427 art::matvecProductDataData<double>(out_c_p_d, data_c_1_d_d, in_p_d);
2428 art::matvecProductDataData<double>(outi_c_p_d, datainvtrn_c_1_d_d, out_c_p_d,
't');
2429 rst::subtract(&outi_c_p_d[0], &in_c_p_d[0], outi_c_p_d.size());
2430 if (rst::vectorNorm(&outi_c_p_d[0], outi_c_p_d.size(), NORM_ONE) > zero) {
2431 *outStream <<
"\n\nINCORRECT matvecProductDataData (22): check matrix inverse transpose property\n\n";
2440 <<
"===============================================================================\n"\
2441 <<
"| TEST 7.a: matmatProductDataField random tests: branch inputFields(C,F,P,D,D)|\n"\
2442 <<
"===============================================================================\n";
2444 int c=5, p=9, f=7, d1=3;
2445 double zero = INTREPID_TOL*10000.0;
2467 for (
int i=0; i<in_c_f_p_d_d.size(); i++) {
2468 in_c_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2470 for (
int i=0; i<data_c_p.size(); i++) {
2471 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
2472 datainv_c_p[i] = 1.0 / data_c_p[i];
2474 for (
int i=0; i<data_c_1.size(); i++) {
2475 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
2476 datainv_c_1[i] = 1.0 / data_c_1[i];
2479 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p, in_c_f_p_d_d);
2480 art::matmatProductDataField<double>(out_c_f_p_d_d, datainv_c_p, out_c_f_p_d_d);
2481 rst::subtract(&out_c_f_p_d_d[0], &in_c_f_p_d_d[0], out_c_f_p_d_d.size());
2482 if (rst::vectorNorm(&out_c_f_p_d_d[0], out_c_f_p_d_d.size(), NORM_ONE) > zero) {
2483 *outStream <<
"\n\nINCORRECT matmatProductDataField (1): check scalar inverse property\n\n";
2487 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1, in_c_f_p_d_d);
2488 art::matmatProductDataField<double>(out_c_f_p_d_d, datainv_c_1, out_c_f_p_d_d);
2489 rst::subtract(&out_c_f_p_d_d[0], &in_c_f_p_d_d[0], out_c_f_p_d_d.size());
2490 if (rst::vectorNorm(&out_c_f_p_d_d[0], out_c_f_p_d_d.size(), NORM_ONE) > zero) {
2491 *outStream <<
"\n\nINCORRECT matmatProductDataField (2): check scalar inverse property\n\n";
2497 for (
int i=0; i<in_c_f_p_d_d.size(); i++) {
2498 in_c_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2500 for (
int i=0; i<data_c_p_d.size(); i++) {
2501 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2502 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
2504 for (
int i=0; i<data_c_1_d.size(); i++) {
2505 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
2506 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
2509 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d, in_c_f_p_d_d);
2510 art::matmatProductDataField<double>(out_c_f_p_d_d, datainv_c_p_d, out_c_f_p_d_d);
2511 rst::subtract(&out_c_f_p_d_d[0], &in_c_f_p_d_d[0], out_c_f_p_d_d.size());
2512 if (rst::vectorNorm(&out_c_f_p_d_d[0], out_c_f_p_d_d.size(), NORM_ONE) > zero) {
2513 *outStream <<
"\n\nINCORRECT matmatProductDataField (3): check scalar inverse property\n\n";
2517 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d, in_c_f_p_d_d);
2518 art::matmatProductDataField<double>(out_c_f_p_d_d, datainv_c_1_d, out_c_f_p_d_d);
2519 rst::subtract(&out_c_f_p_d_d[0], &in_c_f_p_d_d[0], out_c_f_p_d_d.size());
2520 if (rst::vectorNorm(&out_c_f_p_d_d[0], out_c_f_p_d_d.size(), NORM_ONE) > zero) {
2521 *outStream <<
"\n\nINCORRECT matmatProductDataField (4): check scalar inverse property\n\n";
2527 for (
int i=0; i<in_c_f_p_d_d.size(); i++) {
2528 in_c_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2530 for (
int ic=0; ic < c; ic++) {
2531 for (
int ip=0; ip < p; ip++) {
2532 for (
int i=0; i<d1*d1; i++) {
2533 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2538 for (
int ic=0; ic < c; ic++) {
2539 for (
int ip=0; ip < 1; ip++) {
2540 for (
int i=0; i<d1*d1; i++) {
2541 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2547 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d_d, in_c_f_p_d_d);
2548 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_p_d_d, out_c_f_p_d_d);
2549 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2550 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2551 *outStream <<
"\n\nINCORRECT matmatProductDataField (5): check matrix inverse property\n\n";
2554 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d_d, in_c_f_p_d_d,
't');
2555 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_p_d_d, out_c_f_p_d_d,
't');
2556 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2557 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2558 *outStream <<
"\n\nINCORRECT matmatProductDataField (6): check matrix inverse property, w/ double transpose\n\n";
2562 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d_d, in_c_f_p_d_d);
2563 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_1_d_d, out_c_f_p_d_d);
2564 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2565 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2566 *outStream <<
"\n\nINCORRECT matmatProductDataField (7): check matrix inverse property\n\n";
2569 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d_d, in_c_f_p_d_d,
't');
2570 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_1_d_d, out_c_f_p_d_d,
't');
2571 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2572 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2573 *outStream <<
"\n\nINCORRECT matmatProductDataField (8): check matrix inverse property, w/ double transpose\n\n";
2579 for (
int i=0; i<in_c_f_p_d_d.size(); i++) {
2580 in_c_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2582 for (
int ic=0; ic < c; ic++) {
2583 for (
int ip=0; ip < p; ip++) {
2584 for (
int i=0; i<d1*d1; i++) {
2585 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2591 for (
int ic=0; ic < c; ic++) {
2592 for (
int ip=0; ip < 1; ip++) {
2593 for (
int i=0; i<d1*d1; i++) {
2594 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2601 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d_d, in_c_f_p_d_d);
2602 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainvtrn_c_p_d_d, out_c_f_p_d_d,
't');
2603 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2604 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2605 *outStream <<
"\n\nINCORRECT matmatProductDataField (9): check matrix inverse transpose property\n\n";
2609 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d_d, in_c_f_p_d_d);
2610 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainvtrn_c_1_d_d, out_c_f_p_d_d,
't');
2611 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2612 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2613 *outStream <<
"\n\nINCORRECT matmatProductDataField (10): check matrix inverse transpose property\n\n";
2622 <<
"===============================================================================\n"\
2623 <<
"| TEST 7.b: matmatProductDataField random tests: branch inputFields(F,P,D,D) |\n"\
2624 <<
"===============================================================================\n";
2626 int c=5, p=9, f=7, d1=3;
2627 double zero = INTREPID_TOL*10000.0;
2652 for (
int i=0; i<in_f_p_d_d.size(); i++) {
2653 in_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2655 for (
int i=0; i<data_c_p.size(); i++) {
2656 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
2657 datainv_c_p[i] = 1.0 / data_c_p[i];
2658 data_c_p_one[i] = 1.0;
2660 for (
int i=0; i<data_c_1.size(); i++) {
2661 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
2662 datainv_c_1[i] = 1.0 / data_c_1[i];
2666 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2667 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p, in_f_p_d_d);
2668 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_p, out_c_f_p_d_d);
2669 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2670 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2671 *outStream <<
"\n\nINCORRECT matmatProductDataField (11): check scalar inverse property\n\n";
2675 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2676 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1, in_f_p_d_d);
2677 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_1, out_c_f_p_d_d);
2678 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2679 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2680 *outStream <<
"\n\nINCORRECT matmatProductDataField (12): check scalar inverse property\n\n";
2686 for (
int i=0; i<in_f_p_d_d.size(); i++) {
2687 in_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2689 for (
int i=0; i<data_c_p_d.size(); i++) {
2690 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2691 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
2693 for (
int i=0; i<data_c_1_d.size(); i++) {
2694 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
2695 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
2698 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2699 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d, in_f_p_d_d);
2700 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_p_d, out_c_f_p_d_d);
2701 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2702 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2703 *outStream <<
"\n\nINCORRECT matmatProductDataField (13): check scalar inverse property\n\n";
2707 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2708 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d, in_f_p_d_d);
2709 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_1_d, out_c_f_p_d_d);
2710 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2711 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2712 *outStream <<
"\n\nINCORRECT matmatProductDataField (14): check scalar inverse property\n\n";
2718 for (
int i=0; i<in_f_p_d_d.size(); i++) {
2719 in_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2721 for (
int ic=0; ic < c; ic++) {
2722 for (
int ip=0; ip < p; ip++) {
2723 for (
int i=0; i<d1*d1; i++) {
2724 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2729 for (
int ic=0; ic < c; ic++) {
2730 for (
int ip=0; ip < 1; ip++) {
2731 for (
int i=0; i<d1*d1; i++) {
2732 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2738 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2739 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d_d, in_f_p_d_d);
2740 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_p_d_d, out_c_f_p_d_d);
2741 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2742 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2743 *outStream <<
"\n\nINCORRECT matmatProductDataField (15): check matrix inverse property\n\n";
2746 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2747 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d_d, in_f_p_d_d,
't');
2748 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_p_d_d, out_c_f_p_d_d,
't');
2749 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2750 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2751 *outStream <<
"\n\nINCORRECT matmatProductDataField (16): check matrix inverse property, w/ double transpose\n\n";
2755 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2756 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d_d, in_f_p_d_d);
2757 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_1_d_d, out_c_f_p_d_d);
2758 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2759 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2760 *outStream <<
"\n\nINCORRECT matmatProductDataField (17): check matrix inverse property\n\n";
2763 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2764 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d_d, in_f_p_d_d,
't');
2765 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainv_c_1_d_d, out_c_f_p_d_d,
't');
2766 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2767 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2768 *outStream <<
"\n\nINCORRECT matmatProductDataField (18): check matrix inverse property, w/ double transpose\n\n";
2774 for (
int i=0; i<in_f_p_d_d.size(); i++) {
2775 in_f_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2777 for (
int ic=0; ic < c; ic++) {
2778 for (
int ip=0; ip < p; ip++) {
2779 for (
int i=0; i<d1*d1; i++) {
2780 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2786 for (
int ic=0; ic < c; ic++) {
2787 for (
int ip=0; ip < 1; ip++) {
2788 for (
int i=0; i<d1*d1; i++) {
2789 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2796 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2797 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_p_d_d, in_f_p_d_d);
2798 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainvtrn_c_p_d_d, out_c_f_p_d_d,
't');
2799 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2800 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2801 *outStream <<
"\n\nINCORRECT matmatProductDataField (19): check matrix inverse transpose property\n\n";
2805 art::matmatProductDataField<double>(in_c_f_p_d_d, data_c_p_one, in_f_p_d_d);
2806 art::matmatProductDataField<double>(out_c_f_p_d_d, data_c_1_d_d, in_f_p_d_d);
2807 art::matmatProductDataField<double>(outi_c_f_p_d_d, datainvtrn_c_1_d_d, out_c_f_p_d_d,
't');
2808 rst::subtract(&outi_c_f_p_d_d[0], &in_c_f_p_d_d[0], outi_c_f_p_d_d.size());
2809 if (rst::vectorNorm(&outi_c_f_p_d_d[0], outi_c_f_p_d_d.size(), NORM_ONE) > zero) {
2810 *outStream <<
"\n\nINCORRECT matmatProductDataField (20): check matrix inverse transpose property\n\n";
2819 <<
"===============================================================================\n"\
2820 <<
"| TEST 8.a: matmatProductDataData random tests: branch inputDataRight(C,P,D,D)|\n"\
2821 <<
"===============================================================================\n";
2827 double zero = INTREPID_TOL*10000.0;
2850 for (
int i=0; i<in_c_p_d_d.size(); i++) {
2851 in_c_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2853 for (
int i=0; i<data_c_p.size(); i++) {
2854 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
2855 datainv_c_p[i] = 1.0 / data_c_p[i];
2857 for (
int i=0; i<data_c_1.size(); i++) {
2858 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
2859 datainv_c_1[i] = 1.0 / data_c_1[i];
2862 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p, in_c_p_d_d);
2863 art::matmatProductDataData<double>(out_c_p_d_d, datainv_c_p, out_c_p_d_d);
2864 rst::subtract(&out_c_p_d_d[0], &in_c_p_d_d[0], out_c_p_d_d.size());
2865 if (rst::vectorNorm(&out_c_p_d_d[0], out_c_p_d_d.size(), NORM_ONE) > zero) {
2866 *outStream <<
"\n\nINCORRECT matmatProductDataData (1): check scalar inverse property\n\n";
2870 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1, in_c_p_d_d);
2871 art::matmatProductDataData<double>(out_c_p_d_d, datainv_c_1, out_c_p_d_d);
2872 rst::subtract(&out_c_p_d_d[0], &in_c_p_d_d[0], out_c_p_d_d.size());
2873 if (rst::vectorNorm(&out_c_p_d_d[0], out_c_p_d_d.size(), NORM_ONE) > zero) {
2874 *outStream <<
"\n\nINCORRECT matmatProductDataData (2): check scalar inverse property\n\n";
2880 for (
int i=0; i<in_c_p_d_d.size(); i++) {
2881 in_c_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2883 for (
int i=0; i<data_c_p_d.size(); i++) {
2884 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
2885 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
2887 for (
int i=0; i<data_c_1_d.size(); i++) {
2888 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
2889 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
2892 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d, in_c_p_d_d);
2893 art::matmatProductDataData<double>(out_c_p_d_d, datainv_c_p_d, out_c_p_d_d);
2894 rst::subtract(&out_c_p_d_d[0], &in_c_p_d_d[0], out_c_p_d_d.size());
2895 if (rst::vectorNorm(&out_c_p_d_d[0], out_c_p_d_d.size(), NORM_ONE) > zero) {
2896 *outStream <<
"\n\nINCORRECT matmatProductDataData (3): check scalar inverse property\n\n";
2900 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d, in_c_p_d_d);
2901 art::matmatProductDataData<double>(out_c_p_d_d, datainv_c_1_d, out_c_p_d_d);
2902 rst::subtract(&out_c_p_d_d[0], &in_c_p_d_d[0], out_c_p_d_d.size());
2903 if (rst::vectorNorm(&out_c_p_d_d[0], out_c_p_d_d.size(), NORM_ONE) > zero) {
2904 *outStream <<
"\n\nINCORRECT matmatProductDataData (4): check scalar inverse property\n\n";
2910 for (
int i=0; i<in_c_p_d_d.size(); i++) {
2911 in_c_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2913 for (
int ic=0; ic < c; ic++) {
2914 for (
int ip=0; ip < p; ip++) {
2915 for (
int i=0; i<d1*d1; i++) {
2916 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2921 for (
int ic=0; ic < c; ic++) {
2922 for (
int ip=0; ip < 1; ip++) {
2923 for (
int i=0; i<d1*d1; i++) {
2924 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2930 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d_d, in_c_p_d_d);
2931 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_p_d_d, out_c_p_d_d);
2932 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
2933 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
2934 *outStream <<
"\n\nINCORRECT matmatProductDataData (5): check matrix inverse property\n\n";
2937 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d_d, in_c_p_d_d,
't');
2938 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_p_d_d, out_c_p_d_d,
't');
2939 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
2940 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
2941 *outStream <<
"\n\nINCORRECT matmatProductDataData (6): check matrix inverse property, w/ double transpose\n\n";
2945 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d_d, in_c_p_d_d);
2946 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_1_d_d, out_c_p_d_d);
2947 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
2948 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
2949 *outStream <<
"\n\nINCORRECT matmatProductDataData (7): check matrix inverse property\n\n";
2952 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d_d, in_c_p_d_d,
't');
2953 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_1_d_d, out_c_p_d_d,
't');
2954 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
2955 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
2956 *outStream <<
"\n\nINCORRECT matmatProductDataData (8): check matrix inverse property, w/ double transpose\n\n";
2962 for (
int i=0; i<in_c_p_d_d.size(); i++) {
2963 in_c_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
2965 for (
int ic=0; ic < c; ic++) {
2966 for (
int ip=0; ip < p; ip++) {
2967 for (
int i=0; i<d1*d1; i++) {
2968 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2974 for (
int ic=0; ic < c; ic++) {
2975 for (
int ip=0; ip < 1; ip++) {
2976 for (
int i=0; i<d1*d1; i++) {
2977 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
2984 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d_d, in_c_p_d_d);
2985 art::matmatProductDataData<double>(outi_c_p_d_d, datainvtrn_c_p_d_d, out_c_p_d_d,
't');
2986 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
2987 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
2988 *outStream <<
"\n\nINCORRECT matmatProductDataData (9): check matrix inverse transpose property\n\n";
2992 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d_d, in_c_p_d_d);
2993 art::matmatProductDataData<double>(outi_c_p_d_d, datainvtrn_c_1_d_d, out_c_p_d_d,
't');
2994 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
2995 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
2996 *outStream <<
"\n\nINCORRECT matmatProductDataData (10): check matrix inverse transpose property\n\n";
3002 <<
"===============================================================================\n"\
3003 <<
"| TEST 8.b: matmatProductDataData random tests: branch inputDataRight(P,D,D) |\n"\
3004 <<
"===============================================================================\n";
3010 double zero = INTREPID_TOL*10000.0;
3036 for (
int i=0; i<in_p_d_d.size(); i++) {
3037 in_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
3039 for (
int i=0; i<data_c_p.size(); i++) {
3040 data_c_p[i] = Teuchos::ScalarTraits<double>::random();
3041 datainv_c_p[i] = 1.0 / data_c_p[i];
3042 data_c_p_one[i] = 1.0;
3044 for (
int i=0; i<data_c_1.size(); i++) {
3045 data_c_1[i] = Teuchos::ScalarTraits<double>::random();
3046 datainv_c_1[i] = 1.0 / data_c_1[i];
3049 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3050 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p, in_p_d_d);
3051 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_p, out_c_p_d_d);
3052 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3053 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3054 *outStream <<
"\n\nINCORRECT matmatProductDataData (11): check scalar inverse property\n\n";
3058 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3059 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1, in_p_d_d);
3060 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_1, out_c_p_d_d);
3061 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3062 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3063 *outStream <<
"\n\nINCORRECT matmatProductDataData (12): check scalar inverse property\n\n";
3069 for (
int i=0; i<in_p_d_d.size(); i++) {
3070 in_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
3072 for (
int i=0; i<data_c_p_d.size(); i++) {
3073 data_c_p_d[i] = Teuchos::ScalarTraits<double>::random();
3074 datainv_c_p_d[i] = 1.0 / data_c_p_d[i];
3076 for (
int i=0; i<data_c_1_d.size(); i++) {
3077 data_c_1_d[i] = Teuchos::ScalarTraits<double>::random();
3078 datainv_c_1_d[i] = 1.0 / data_c_1_d[i];
3081 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3082 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d, in_p_d_d);
3083 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_p_d, out_c_p_d_d);
3084 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3085 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3086 *outStream <<
"\n\nINCORRECT matmatProductDataData (13): check scalar inverse property\n\n";
3090 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3091 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d, in_p_d_d);
3092 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_1_d, out_c_p_d_d);
3093 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3094 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3095 *outStream <<
"\n\nINCORRECT matmatProductDataData (14): check scalar inverse property\n\n";
3101 for (
int i=0; i<in_p_d_d.size(); i++) {
3102 in_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
3104 for (
int ic=0; ic < c; ic++) {
3105 for (
int ip=0; ip < p; ip++) {
3106 for (
int i=0; i<d1*d1; i++) {
3107 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
3112 for (
int ic=0; ic < c; ic++) {
3113 for (
int ip=0; ip < 1; ip++) {
3114 for (
int i=0; i<d1*d1; i++) {
3115 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
3121 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3122 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d_d, in_p_d_d);
3123 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_p_d_d, out_c_p_d_d);
3124 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3125 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3126 *outStream <<
"\n\nINCORRECT matmatProductDataData (15): check matrix inverse property\n\n";
3129 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3130 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d_d, in_p_d_d,
't');
3131 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_p_d_d, out_c_p_d_d,
't');
3132 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3133 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3134 *outStream <<
"\n\nINCORRECT matmatProductDataData (16): check matrix inverse property, w/ double transpose\n\n";
3138 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3139 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d_d, in_p_d_d);
3140 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_1_d_d, out_c_p_d_d);
3141 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3142 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3143 *outStream <<
"\n\nINCORRECT matmatProductDataData (17): check matrix inverse property\n\n";
3146 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3147 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d_d, in_p_d_d,
't');
3148 art::matmatProductDataData<double>(outi_c_p_d_d, datainv_c_1_d_d, out_c_p_d_d,
't');
3149 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3150 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3151 *outStream <<
"\n\nINCORRECT matmatProductDataData (18): check matrix inverse property, w/ double transpose\n\n";
3157 for (
int i=0; i<in_p_d_d.size(); i++) {
3158 in_p_d_d[i] = Teuchos::ScalarTraits<double>::random();
3160 for (
int ic=0; ic < c; ic++) {
3161 for (
int ip=0; ip < p; ip++) {
3162 for (
int i=0; i<d1*d1; i++) {
3163 (&data_c_p_d_d(ic, ip, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
3169 for (
int ic=0; ic < c; ic++) {
3170 for (
int ip=0; ip < 1; ip++) {
3171 for (
int i=0; i<d1*d1; i++) {
3172 (&data_c_1_d_d(ic, 0, 0, 0))[i] = Teuchos::ScalarTraits<double>::random();
3179 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3180 art::matmatProductDataData<double>(out_c_p_d_d, data_c_p_d_d, in_p_d_d);
3181 art::matmatProductDataData<double>(outi_c_p_d_d, datainvtrn_c_p_d_d, out_c_p_d_d,
't');
3182 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3183 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3184 *outStream <<
"\n\nINCORRECT matmatProductDataData (19): check matrix inverse transpose property\n\n";
3188 art::matmatProductDataData<double>(in_c_p_d_d, data_c_p_one, in_p_d_d);
3189 art::matmatProductDataData<double>(out_c_p_d_d, data_c_1_d_d, in_p_d_d);
3190 art::matmatProductDataData<double>(outi_c_p_d_d, datainvtrn_c_1_d_d, out_c_p_d_d,
't');
3191 rst::subtract(&outi_c_p_d_d[0], &in_c_p_d_d[0], outi_c_p_d_d.size());
3192 if (rst::vectorNorm(&outi_c_p_d_d[0], outi_c_p_d_d.size(), NORM_ONE) > zero) {
3193 *outStream <<
"\n\nINCORRECT matmatProductDataData (20): check matrix inverse transpose property\n\n";
3203 catch (
const std::logic_error & err) {
3204 *outStream <<
"UNEXPECTED ERROR !!! ----------------------------------------------------------\n";
3205 *outStream << err.what() <<
'\n';
3206 *outStream <<
"-------------------------------------------------------------------------------" <<
"\n\n";
3212 std::cout <<
"End Result: TEST FAILED\n";
3214 std::cout <<
"End Result: TEST PASSED\n";
3217 std::cout.copyfmt(oldFormatState);
Header file for utility class to provide multidimensional containers.