1 #ifndef INTREPID_ARRAYTOOLSDEFSCALAR_HPP
2 #define INTREPID_ARRAYTOOLSDEFSCALAR_HPP
76 template<
class Scalar,
class ArrayOutFields,
class ArrayInData,
class ArrayInFields>
78 const ArrayInData & inputData,
79 const ArrayInFields & inputFields,
80 const bool reciprocal) {
81 #ifdef HAVE_INTREPID_DEBUG
82 TEUCHOS_TEST_FOR_EXCEPTION( (getrank(inputData) != 2), std::invalid_argument,
83 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Input data container must have rank 2.");
84 if (getrank(outputFields) <= getrank(inputFields)) {
85 TEUCHOS_TEST_FOR_EXCEPTION( ( (getrank(inputFields) < 3) || (getrank(inputFields) > 5) ), std::invalid_argument,
86 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Input fields container must have rank 3, 4, or 5.");
87 TEUCHOS_TEST_FOR_EXCEPTION( (getrank(outputFields) != getrank(inputFields)), std::invalid_argument,
88 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Input and output fields containers must have the same rank.");
89 TEUCHOS_TEST_FOR_EXCEPTION( (inputFields.dimension(0) != inputData.dimension(0) ), std::invalid_argument,
90 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Zeroth dimensions (number of integration domains) of the fields and data input containers must agree!");
91 TEUCHOS_TEST_FOR_EXCEPTION( ( (inputFields.dimension(2) != inputData.dimension(1)) && (inputData.dimension(1) != 1) ), std::invalid_argument,
92 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Second dimension of the fields input container and first dimension of data input container (number of integration points) must agree or first data dimension must be 1!");
93 for (
size_t i=0; i<getrank(inputFields); i++) {
94 std::string errmsg =
">>> ERROR (ArrayTools::scalarMultiplyDataField): Dimension ";
95 errmsg += (char)(48+i);
96 errmsg +=
" of the input and output fields containers must agree!";
97 TEUCHOS_TEST_FOR_EXCEPTION( (inputFields.dimension(i) != outputFields.dimension(i)), std::invalid_argument, errmsg );
101 TEUCHOS_TEST_FOR_EXCEPTION( ( (getrank(inputFields) < 2) || (getrank(inputFields) > 4) ), std::invalid_argument,
102 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Input fields container must have rank 2, 3, or 4.");
103 TEUCHOS_TEST_FOR_EXCEPTION( (getrank(outputFields) != getrank(inputFields)+1), std::invalid_argument,
104 ">>> ERROR (ArrayTools::scalarMultiplyDataField): The rank of the input fields container must be one less than the rank of the output fields container.");
105 TEUCHOS_TEST_FOR_EXCEPTION( ( (inputFields.dimension(1) != inputData.dimension(1)) && (inputData.dimension(1) != 1) ), std::invalid_argument,
106 ">>> ERROR (ArrayTools::scalarMultiplyDataField): First dimensions of fields input container and data input container (number of integration points) must agree or first data dimension must be 1!");
107 TEUCHOS_TEST_FOR_EXCEPTION( ( inputData.dimension(0) != outputFields.dimension(0) ), std::invalid_argument,
108 ">>> ERROR (ArrayTools::scalarMultiplyDataField): Zeroth dimensions of fields output container and data input containers (number of integration domains) must agree!");
109 for (
size_t i=0; i<getrank(inputFields); i++) {
110 std::string errmsg =
">>> ERROR (ArrayTools::scalarMultiplyDataField): Dimensions ";
111 errmsg += (char)(48+i);
113 errmsg += (char)(48+i+1);
114 errmsg +=
" of the input and output fields containers must agree!";
115 TEUCHOS_TEST_FOR_EXCEPTION( (inputFields.dimension(i) != outputFields.dimension(i+1)), std::invalid_argument, errmsg );
119 ArrayWrapper<Scalar,ArrayOutFields, Rank<ArrayOutFields >::value,
false>outputFieldsWrap(outputFields);
120 ArrayWrapper<Scalar,ArrayInData, Rank<ArrayInData >::value,
true>inputDataWrap(inputData);
121 ArrayWrapper<Scalar,ArrayInFields, Rank<ArrayInFields >::value,
true>inputFieldsWrap(inputFields);
124 size_t invalRank = getrank(inputFields);
125 size_t outvalRank = getrank(outputFields);
126 int numCells = outputFields.dimension(0);
127 int numFields = outputFields.dimension(1);
128 int numPoints = outputFields.dimension(2);
129 int numDataPoints = inputData.dimension(1);
132 if (outvalRank > 3) {
133 dim1Tens = outputFields.dimension(3);
134 if (outvalRank > 4) {
135 dim2Tens = outputFields.dimension(4);
139 if (outvalRank == invalRank) {
141 if (numDataPoints != 1) {
145 for(
int cl = 0; cl < numCells; cl++) {
146 for(
int bf = 0; bf < numFields; bf++) {
147 for(
int pt = 0; pt < numPoints; pt++) {
148 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(cl, bf, pt)/inputDataWrap(cl, pt);
156 for(
int cl = 0; cl < numCells; cl++) {
157 for(
int bf = 0; bf < numFields; bf++) {
158 for(
int pt = 0; pt < numPoints; pt++) {
159 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(cl, bf, pt)*inputDataWrap(cl, pt);
170 for(
int cl = 0; cl < numCells; cl++) {
171 for(
int bf = 0; bf < numFields; bf++) {
172 for(
int pt = 0; pt < numPoints; pt++) {
173 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
174 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(cl, bf, pt, iVec)/inputDataWrap(cl, pt);
181 for(
int cl = 0; cl < numCells; cl++) {
182 for(
int bf = 0; bf < numFields; bf++) {
183 for(
int pt = 0; pt < numPoints; pt++) {
184 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
185 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(cl, bf, pt, iVec)*inputDataWrap(cl, pt);
196 for(
int cl = 0; cl < numCells; cl++) {
197 for(
int bf = 0; bf < numFields; bf++) {
198 for(
int pt = 0; pt < numPoints; pt++) {
199 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
200 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
201 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(cl, bf, pt, iTens1, iTens2)/inputDataWrap(cl, pt);
209 for(
int cl = 0; cl < numCells; cl++) {
210 for(
int bf = 0; bf < numFields; bf++) {
211 for(
int pt = 0; pt < numPoints; pt++) {
212 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
213 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
214 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(cl, bf, pt, iTens1, iTens2)*inputDataWrap(cl, pt);
225 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 3) || (invalRank == 4) || (invalRank == 5) ), std::invalid_argument,
226 ">>> ERROR (ArrayTools::scalarMultiplyDataField): This branch of the method is defined only for rank-3,4 or 5 containers.");
235 for(
int cl = 0; cl < numCells; cl++) {
236 for(
int bf = 0; bf < numFields; bf++) {
237 for(
int pt = 0; pt < numPoints; pt++) {
238 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(cl, bf, pt)/inputDataWrap(cl, 0);
244 for(
int cl = 0; cl < numCells; cl++) {
245 for(
int bf = 0; bf < numFields; bf++) {
246 for(
int pt = 0; pt < numPoints; pt++) {
247 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(cl, bf, pt)*inputDataWrap(cl, 0);
257 for(
int cl = 0; cl < numCells; cl++) {
258 for(
int bf = 0; bf < numFields; bf++) {
259 for(
int pt = 0; pt < numPoints; pt++) {
260 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
261 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(cl, bf, pt, iVec)/inputDataWrap(cl, 0);
268 for(
int cl = 0; cl < numCells; cl++) {
269 for(
int bf = 0; bf < numFields; bf++) {
270 for(
int pt = 0; pt < numPoints; pt++) {
271 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
272 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(cl, bf, pt, iVec)*inputDataWrap(cl, 0);
283 for(
int cl = 0; cl < numCells; cl++) {
284 for(
int bf = 0; bf < numFields; bf++) {
285 for(
int pt = 0; pt < numPoints; pt++) {
286 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
287 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
288 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(cl, bf, pt, iTens1, iTens2)/inputDataWrap(cl, 0);
296 for(
int cl = 0; cl < numCells; cl++) {
297 for(
int bf = 0; bf < numFields; bf++) {
298 for(
int pt = 0; pt < numPoints; pt++) {
299 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
300 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
301 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(cl, bf, pt, iTens1, iTens2)*inputDataWrap(cl, 0);
312 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 3) || (invalRank == 4) || (invalRank == 5) ), std::invalid_argument,
313 ">>> ERROR (ArrayTools::scalarMultiplyDataField): This branch of the method is defined only for rank-3, 4 or 5 input containers.");
321 if (numDataPoints != 1) {
326 for(
int cl = 0; cl < numCells; cl++) {
327 for(
int bf = 0; bf < numFields; bf++) {
328 for(
int pt = 0; pt < numPoints; pt++) {
329 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(bf, pt)/inputDataWrap(cl, pt);
335 for(
int cl = 0; cl < numCells; cl++) {
336 for(
int bf = 0; bf < numFields; bf++) {
337 for(
int pt = 0; pt < numPoints; pt++) {
338 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(bf, pt)*inputDataWrap(cl, pt);
348 for(
int cl = 0; cl < numCells; cl++) {
349 for(
int bf = 0; bf < numFields; bf++) {
350 for(
int pt = 0; pt < numPoints; pt++) {
351 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
352 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(bf, pt, iVec)/inputDataWrap(cl, pt);
359 for(
int cl = 0; cl < numCells; cl++) {
360 for(
int bf = 0; bf < numFields; bf++) {
361 for(
int pt = 0; pt < numPoints; pt++) {
362 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
363 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(bf, pt, iVec)*inputDataWrap(cl, pt);
374 for(
int cl = 0; cl < numCells; cl++) {
375 for(
int bf = 0; bf < numFields; bf++) {
376 for(
int pt = 0; pt < numPoints; pt++) {
377 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
378 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
379 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(bf, pt, iTens1, iTens2)/inputDataWrap(cl, pt);
387 for(
int cl = 0; cl < numCells; cl++) {
388 for(
int bf = 0; bf < numFields; bf++) {
389 for(
int pt = 0; pt < numPoints; pt++) {
390 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
391 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
392 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(bf, pt, iTens1, iTens2)*inputDataWrap(cl, pt);
403 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 2) || (invalRank == 3) || (invalRank == 4) ), std::invalid_argument,
404 ">>> ERROR (ArrayTools::scalarMultiplyDataField): This branch of the method is defined only for rank-2, 3 or 4 input containers.");
413 for(
int cl = 0; cl < numCells; cl++) {
414 for(
int bf = 0; bf < numFields; bf++) {
415 for(
int pt = 0; pt < numPoints; pt++) {
416 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(bf, pt)/inputDataWrap(cl, 0);
422 for(
int cl = 0; cl < numCells; cl++) {
423 for(
int bf = 0; bf < numFields; bf++) {
424 for(
int pt = 0; pt < numPoints; pt++) {
425 outputFieldsWrap(cl, bf, pt) = inputFieldsWrap(bf, pt)*inputDataWrap(cl, 0);
435 for(
int cl = 0; cl < numCells; cl++) {
436 for(
int bf = 0; bf < numFields; bf++) {
437 for(
int pt = 0; pt < numPoints; pt++) {
438 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
439 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(bf, pt, iVec)/inputDataWrap(cl, 0);
446 for(
int cl = 0; cl < numCells; cl++) {
447 for(
int bf = 0; bf < numFields; bf++) {
448 for(
int pt = 0; pt < numPoints; pt++) {
449 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
450 outputFieldsWrap(cl, bf, pt, iVec) = inputFieldsWrap(bf, pt, iVec)*inputDataWrap(cl, 0);
461 for(
int cl = 0; cl < numCells; cl++) {
462 for(
int bf = 0; bf < numFields; bf++) {
463 for(
int pt = 0; pt < numPoints; pt++) {
464 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
465 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
466 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(bf, pt, iTens1, iTens2)/inputDataWrap(cl, 0);
474 for(
int cl = 0; cl < numCells; cl++) {
475 for(
int bf = 0; bf < numFields; bf++) {
476 for(
int pt = 0; pt < numPoints; pt++) {
477 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
478 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
479 outputFieldsWrap(cl, bf, pt, iTens1, iTens2) = inputFieldsWrap(bf, pt, iTens1, iTens2)*inputDataWrap(cl, 0);
490 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 2) || (invalRank == 3) || (invalRank == 3) ), std::invalid_argument,
491 ">>> ERROR (ArrayTools::scalarMultiplyDataField): This branch of the method is defined only for rank-2, 3 or 4 input containers.");
500 template<
class Scalar,
class ArrayOutData,
class ArrayInDataLeft,
class ArrayInDataRight>
502 const ArrayInDataLeft & inputDataLeft,
503 const ArrayInDataRight & inputDataRight,
504 const bool reciprocal) {
506 #ifdef HAVE_INTREPID_DEBUG
507 TEUCHOS_TEST_FOR_EXCEPTION( (getrank(inputDataLeft) != 2), std::invalid_argument,
508 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Left input data container must have rank 2.");
509 if (getrank(outputData) <= getrank(inputDataRight)) {
510 TEUCHOS_TEST_FOR_EXCEPTION( ( (getrank(inputDataRight) < 2) || (getrank(inputDataRight) > 4) ), std::invalid_argument,
511 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Right input data container must have rank 2, 3, or 4.");
512 TEUCHOS_TEST_FOR_EXCEPTION( (getrank(outputData) != getrank(inputDataRight)), std::invalid_argument,
513 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Right input and output data containers must have the same rank.");
514 TEUCHOS_TEST_FOR_EXCEPTION( (inputDataRight.dimension(0) != inputDataLeft.dimension(0) ), std::invalid_argument,
515 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Zeroth dimensions (number of integration domains) of the left and right data input containers must agree!");
516 TEUCHOS_TEST_FOR_EXCEPTION( ( (inputDataRight.dimension(1) != inputDataLeft.dimension(1)) && (inputDataLeft.dimension(1) != 1) ), std::invalid_argument,
517 ">>> ERROR (ArrayTools::scalarMultiplyDataData): First dimensions of the left and right data input containers (number of integration points) must agree or first dimension of the left data input container must be 1!");
518 for (
size_t i=0; i<getrank(inputDataRight); i++) {
519 std::string errmsg =
">>> ERROR (ArrayTools::scalarMultiplyDataData): Dimension ";
520 errmsg += (char)(48+i);
521 errmsg +=
" of the right input and output data containers must agree!";
522 TEUCHOS_TEST_FOR_EXCEPTION( (inputDataRight.dimension(i) != outputData.dimension(i)), std::invalid_argument, errmsg );
526 TEUCHOS_TEST_FOR_EXCEPTION( ( (getrank(inputDataRight) < 1) || (getrank(inputDataRight) > 3) ), std::invalid_argument,
527 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Right input data container must have rank 1, 2, or 3.");
528 TEUCHOS_TEST_FOR_EXCEPTION( (getrank(outputData) != getrank(inputDataRight)+1), std::invalid_argument,
529 ">>> ERROR (ArrayTools::scalarMultiplyDataData): The rank of the right input data container must be one less than the rank of the output data container.");
530 TEUCHOS_TEST_FOR_EXCEPTION( ( (inputDataRight.dimension(0) != inputDataLeft.dimension(1)) && (inputDataLeft.dimension(1) != 1) ), std::invalid_argument,
531 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Zeroth dimension of the right input data container and first dimension of the left data input container (number of integration points) must agree or first dimension of the left data input container must be 1!");
532 TEUCHOS_TEST_FOR_EXCEPTION( ( inputDataLeft.dimension(0) != outputData.dimension(0) ), std::invalid_argument,
533 ">>> ERROR (ArrayTools::scalarMultiplyDataData): Zeroth dimensions of data output and left data input containers (number of integration domains) must agree!");
534 for (
size_t i=0; i<getrank(inputDataRight); i++) {
535 std::string errmsg =
">>> ERROR (ArrayTools::scalarMultiplyDataData): Dimensions ";
536 errmsg += (char)(48+i);
538 errmsg += (char)(48+i+1);
539 errmsg +=
" of the right input and output data containers must agree!";
540 TEUCHOS_TEST_FOR_EXCEPTION( (inputDataRight.dimension(i) != outputData.dimension(i+1)), std::invalid_argument, errmsg );
546 ArrayWrapper<Scalar,ArrayOutData, Rank<ArrayOutData >::value,
false>outputDataWrap(outputData);
547 ArrayWrapper<Scalar,ArrayInDataLeft, Rank<ArrayInDataLeft >::value,
true>inputDataLeftWrap(inputDataLeft);
548 ArrayWrapper<Scalar,ArrayInDataRight, Rank<ArrayInDataRight >::value,
true>inputDataRightWrap(inputDataRight);
552 size_t invalRank = getrank(inputDataRight);
553 size_t outvalRank = getrank(outputData);
554 int numCells = outputData.dimension(0);
555 int numPoints = outputData.dimension(1);
556 int numDataPoints = inputDataLeft.dimension(1);
559 if (outvalRank > 2) {
560 dim1Tens = outputData.dimension(2);
561 if (outvalRank > 3) {
562 dim2Tens = outputData.dimension(3);
566 if (outvalRank == invalRank) {
568 if (numDataPoints != 1) {
573 for(
int cl = 0; cl < numCells; cl++) {
574 for(
int pt = 0; pt < numPoints; pt++) {
575 outputDataWrap(cl, pt) = inputDataRightWrap(cl, pt)/inputDataLeftWrap(cl, pt);
580 for(
int cl = 0; cl < numCells; cl++) {
581 for(
int pt = 0; pt < numPoints; pt++) {
582 outputDataWrap(cl, pt) = inputDataRightWrap(cl, pt)*inputDataLeftWrap(cl, pt);
591 for(
int cl = 0; cl < numCells; cl++) {
592 for(
int pt = 0; pt < numPoints; pt++) {
593 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
594 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(cl, pt, iVec)/inputDataLeftWrap(cl, pt);
600 for(
int cl = 0; cl < numCells; cl++) {
601 for(
int pt = 0; pt < numPoints; pt++) {
602 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
603 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(cl, pt, iVec)*inputDataLeftWrap(cl, pt);
613 for(
int cl = 0; cl < numCells; cl++) {
614 for(
int pt = 0; pt < numPoints; pt++) {
615 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
616 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
617 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(cl, pt, iTens1, iTens2)/inputDataLeftWrap(cl, pt);
624 for(
int cl = 0; cl < numCells; cl++) {
625 for(
int pt = 0; pt < numPoints; pt++) {
626 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
627 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
628 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(cl, pt, iTens1, iTens2)*inputDataLeftWrap(cl, pt);
638 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 2) || (invalRank == 3) || (invalRank == 4) ), std::invalid_argument,
639 ">>> ERROR (ArrayTools::scalarMultiplyDataData): This branch of the method is defined only for rank-2, 3 or 4 containers.");
648 for(
int cl = 0; cl < numCells; cl++) {
649 for(
int pt = 0; pt < numPoints; pt++) {
650 outputDataWrap(cl, pt) = inputDataRightWrap(cl, pt)/inputDataLeftWrap(cl, 0);
655 for(
int cl = 0; cl < numCells; cl++) {
656 for(
int pt = 0; pt < numPoints; pt++) {
657 outputDataWrap(cl, pt) = inputDataRightWrap(cl, pt)*inputDataLeftWrap(cl, 0);
666 for(
int cl = 0; cl < numCells; cl++) {
667 for(
int pt = 0; pt < numPoints; pt++) {
668 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
669 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(cl, pt, iVec)/inputDataLeftWrap(cl, 0);
675 for(
int cl = 0; cl < numCells; cl++) {
676 for(
int pt = 0; pt < numPoints; pt++) {
677 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
678 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(cl, pt, iVec)*inputDataLeftWrap(cl, 0);
688 for(
int cl = 0; cl < numCells; cl++) {
689 for(
int pt = 0; pt < numPoints; pt++) {
690 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
691 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
692 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(cl, pt, iTens1, iTens2)/inputDataLeftWrap(cl, 0);
699 for(
int cl = 0; cl < numCells; cl++) {
700 for(
int pt = 0; pt < numPoints; pt++) {
701 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
702 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
703 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(cl, pt, iTens1, iTens2)*inputDataLeftWrap(cl, 0);
713 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 2) || (invalRank == 3) || (invalRank == 4) ), std::invalid_argument,
714 ">>> ERROR (ArrayTools::scalarMultiplyDataData): This branch of the method is defined only for rank-2, 3 or 4 input containers.");
722 if (numDataPoints != 1) {
727 for(
int cl = 0; cl < numCells; cl++) {
728 for(
int pt = 0; pt < numPoints; pt++) {
729 outputDataWrap(cl, pt) = inputDataRightWrap(pt)/inputDataLeftWrap(cl, pt);
734 for(
int cl = 0; cl < numCells; cl++) {
735 for(
int pt = 0; pt < numPoints; pt++) {
736 outputDataWrap(cl, pt) = inputDataRightWrap(pt)*inputDataLeftWrap(cl, pt);
745 for(
int cl = 0; cl < numCells; cl++) {
746 for(
int pt = 0; pt < numPoints; pt++) {
747 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
748 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(pt, iVec)/inputDataLeftWrap(cl, pt);
754 for(
int cl = 0; cl < numCells; cl++) {
755 for(
int pt = 0; pt < numPoints; pt++) {
756 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
757 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(pt, iVec)*inputDataLeftWrap(cl, pt);
767 for(
int cl = 0; cl < numCells; cl++) {
768 for(
int pt = 0; pt < numPoints; pt++) {
769 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
770 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
771 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(pt, iTens1, iTens2)/inputDataLeftWrap(cl, pt);
778 for(
int cl = 0; cl < numCells; cl++) {
779 for(
int pt = 0; pt < numPoints; pt++) {
780 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
781 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
782 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(pt, iTens1, iTens2)*inputDataLeftWrap(cl, pt);
792 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 1) || (invalRank == 2) || (invalRank == 3) ), std::invalid_argument,
793 ">>> ERROR (ArrayTools::scalarMultiplyDataData): This branch of the method is defined only for rank-1, 2 or 3 input containers.");
802 for(
int cl = 0; cl < numCells; cl++) {
803 for(
int pt = 0; pt < numPoints; pt++) {
804 outputDataWrap(cl, pt) = inputDataRightWrap(pt)/inputDataLeftWrap(cl, 0);
809 for(
int cl = 0; cl < numCells; cl++) {
810 for(
int pt = 0; pt < numPoints; pt++) {
811 outputDataWrap(cl, pt) = inputDataRightWrap(pt)*inputDataLeftWrap(cl, 0);
820 for(
int cl = 0; cl < numCells; cl++) {
821 for(
int pt = 0; pt < numPoints; pt++) {
822 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
823 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(pt, iVec)/inputDataLeftWrap(cl, 0);
829 for(
int cl = 0; cl < numCells; cl++) {
830 for(
int pt = 0; pt < numPoints; pt++) {
831 for(
int iVec = 0; iVec < dim1Tens; iVec++) {
832 outputDataWrap(cl, pt, iVec) = inputDataRightWrap(pt, iVec)*inputDataLeftWrap(cl, 0);
842 for(
int cl = 0; cl < numCells; cl++) {
843 for(
int pt = 0; pt < numPoints; pt++) {
844 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
845 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
846 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(pt, iTens1, iTens2)/inputDataLeftWrap(cl, 0);
853 for(
int cl = 0; cl < numCells; cl++) {
854 for(
int pt = 0; pt < numPoints; pt++) {
855 for(
int iTens1 = 0; iTens1 < dim1Tens; iTens1++) {
856 for(
int iTens2 = 0; iTens2 < dim2Tens; iTens2++) {
857 outputDataWrap(cl, pt, iTens1, iTens2) = inputDataRightWrap(pt, iTens1, iTens2)*inputDataLeftWrap(cl, 0);
867 TEUCHOS_TEST_FOR_EXCEPTION( !( (invalRank == 1) || (invalRank == 2) || (invalRank == 3) ), std::invalid_argument,
868 ">>> ERROR (ArrayTools::scalarMultiplyDataData): This branch of the method is defined only for rank-1, 2 or 3 input containers.");