Intrepid
Intrepid_ArrayTools.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Intrepid Package
5 // Copyright (2007) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Pavel Bochev (pbboche@sandia.gov)
38 // Denis Ridzal (dridzal@sandia.gov), or
39 // Kara Peterson (kjpeter@sandia.gov)
40 //
41 // ************************************************************************
42 // @HEADER
43 
50 #ifndef INTREPID_ARRAYTOOLS_HPP
51 #define INTREPID_ARRAYTOOLS_HPP
52 
53 #include "Intrepid_ConfigDefs.hpp"
54 #include "Intrepid_Types.hpp"
55 #include "Teuchos_BLAS.hpp"
56 #include "Teuchos_Assert.hpp"
57 #include <Intrepid_KokkosRank.hpp>
58 #ifdef INTREPID_OLD_KOKKOS_CODE
59 #include "Kokkos_Core.hpp"
60 #include <impl/Kokkos_Timer.hpp>
61 #endif
62 
63 namespace Intrepid {
64 
71  class ArrayTools {
72  public:
73 
94  /* template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
95  static void contractFieldFieldScalarTemp(ArrayOutFields & outputFields,
96  const ArrayInFieldsLeft & leftFields,
97  const ArrayInFieldsRight & rightFields,
98  const ECompEngine compEngine,
99  const bool sumInto = false);
100 
101 */
123  /* template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
124  static void contractFieldFieldVectorTemp(ArrayOutFields & outputFields,
125  const ArrayInFieldsLeft & leftFields,
126  const ArrayInFieldsRight & rightFields,
127  const ECompEngine compEngine,
128  const bool sumInto = false);
129 */
130 
153  /*
154  template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
155  static void contractFieldFieldTensorTemp(ArrayOutFields & outputFields,
156  const ArrayInFieldsLeft & leftFields,
157  const ArrayInFieldsRight & rightFields,
158  const ECompEngine compEngine,
159  const bool sumInto = false);
160  */
161 
181  /*
182  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
183  static void contractDataFieldScalarTemp(ArrayOutFields & outputFields,
184  const ArrayInData & inputData,
185  const ArrayInFields & inputFields,
186  const ECompEngine compEngine,
187  const bool sumInto = false);
188 */
189 
209  /*
210  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
211  static void contractDataFieldVectorTemp(ArrayOutFields & outputFields,
212  const ArrayInData & inputData,
213  const ArrayInFields & inputFields,
214  const ECompEngine compEngine,
215  const bool sumInto = false);
216 */
217 
238  /*
239  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
240  static void contractDataFieldTensorTemp(ArrayOutFields & outputFields,
241  const ArrayInData & inputData,
242  const ArrayInFields & inputFields,
243  const ECompEngine compEngine,
244  const bool sumInto = false);
245 
246 */
263  /*
264  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
265  static void contractDataDataScalarTemp(ArrayOutData & outputData,
266  const ArrayInDataLeft & inputDataLeft,
267  const ArrayInDataRight & inputDataRight,
268  const ECompEngine compEngine,
269  const bool sumInto = false);
270 */
271 
288  /* template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
289  static void contractDataDataVectorTemp(ArrayOutData & outputData,
290  const ArrayInDataLeft & inputDataLeft,
291  const ArrayInDataRight & inputDataRight,
292  const ECompEngine compEngine,
293  const bool sumInto = false);
294 
295 */
313  /* template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
314  static void contractDataDataTensorTemp(ArrayOutData & outputData,
315  const ArrayInDataLeft & inputDataLeft,
316  const ArrayInDataRight & inputDataRight,
317  const ECompEngine compEngine,
318  const bool sumInto = false);
319 */
320 
350  template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
351  static void contractFieldFieldScalar(ArrayOutFields & outputFields,
352  const ArrayInFieldsLeft & leftFields,
353  const ArrayInFieldsRight & rightFields,
354  const ECompEngine compEngine,
355  const bool sumInto = false);
356 
357 
379  template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
380  static void contractFieldFieldVector(ArrayOutFields & outputFields,
381  const ArrayInFieldsLeft & leftFields,
382  const ArrayInFieldsRight & rightFields,
383  const ECompEngine compEngine,
384  const bool sumInto = false);
385 
386 
409  template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
410  static void contractFieldFieldTensor(ArrayOutFields & outputFields,
411  const ArrayInFieldsLeft & leftFields,
412  const ArrayInFieldsRight & rightFields,
413  const ECompEngine compEngine,
414  const bool sumInto = false);
415 
416 
435  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
436  static void contractDataFieldScalar(ArrayOutFields & outputFields,
437  const ArrayInData & inputData,
438  const ArrayInFields & inputFields,
439  const ECompEngine compEngine,
440  const bool sumInto = false);
441 
442 
462  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
463  static void contractDataFieldVector(ArrayOutFields & outputFields,
464  const ArrayInData & inputData,
465  const ArrayInFields & inputFields,
466  const ECompEngine compEngine,
467  const bool sumInto = false);
468 
469 
490  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
491  static void contractDataFieldTensor(ArrayOutFields & outputFields,
492  const ArrayInData & inputData,
493  const ArrayInFields & inputFields,
494  const ECompEngine compEngine,
495  const bool sumInto = false);
496 
497 
514  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
515  static void contractDataDataScalar(ArrayOutData & outputData,
516  const ArrayInDataLeft & inputDataLeft,
517  const ArrayInDataRight & inputDataRight,
518  const ECompEngine compEngine,
519  const bool sumInto = false);
520 
521 
538  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
539  static void contractDataDataVector(ArrayOutData & outputData,
540  const ArrayInDataLeft & inputDataLeft,
541  const ArrayInDataRight & inputDataRight,
542  const ECompEngine compEngine,
543  const bool sumInto = false);
544 
545 
563  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
564  static void contractDataDataTensor(ArrayOutData & outputData,
565  const ArrayInDataLeft & inputDataLeft,
566  const ArrayInDataRight & inputDataRight,
567  const ECompEngine compEngine,
568  const bool sumInto = false);
569 
570 
600  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
601  static void scalarMultiplyDataField(ArrayOutFields & outputFields,
602  const ArrayInData & inputData,
603  const ArrayInFields & inputFields,
604  const bool reciprocal = false);
605 
606  template<class ArrayOutFields, class ArrayInData, class ArrayInFields, class Layout, class MemorySpace,int infieldRank,int outfieldRank>
608  /*
609 
610  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
611  static void scalarMultiplyDataFieldTemp(ArrayOutFields & outputFields,
612  const ArrayInData & inputData,
613  ArrayInFields & inputFields,
614  const bool reciprocal=false);*/
643  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
644  static void scalarMultiplyDataData(ArrayOutData & outputData,
645  const ArrayInDataLeft & inputDataLeft,
646  const ArrayInDataRight & inputDataRight,
647  const bool reciprocal = false);
648 
677  template<class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight, class Layout, class MemorySpace,int invalRank,int outvalRank>
679  /*
680  template<class Scalar,class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
681  static void scalarMultiplyDataDataTemp(ArrayOutData & outputData,
682  ArrayInDataLeft & inputDataLeft,
683  ArrayInDataRight & inputDataRight,
684  const bool reciprocal=false);*/
685 #ifdef INTREPID_OLD_KOKKOS_CODE
686 /*
687  template<class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight, class Layout, class MemorySpace>
688  static void scalarMultiplyDataDataTemp(Kokkos::View<ArrayOutData,Layout,MemorySpace> & outputData,
689  Kokkos::View<ArrayInDataLeft,Layout,MemorySpace> & inputDataLeft,
690  Kokkos::View<ArrayInDataRight,Layout,MemorySpace> & inputDataRight,
691  const bool reciprocal=false);
692 */
693  template<class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight, class Layout, class MemorySpace,int invalRank,int outvalRank>
694  struct scalarMultiplyDataData2Kokkos;
695 
696 #endif
697 
727  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
728  static void dotMultiplyDataField(ArrayOutFields & outputFields,
729  const ArrayInData & inputDataLeft,
730  const ArrayInFields & inputFields);
731 
732 
759  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
760  static void dotMultiplyDataData(ArrayOutData & outputData,
761  const ArrayInDataLeft & inputDataLeft,
762  const ArrayInDataRight & inputDataRight);
763 
764 
786  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
787  static void crossProductDataField(ArrayOutFields & outputFields,
788  const ArrayInData & inputData,
789  const ArrayInFields & inputFields);
790 
791 
812  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
813  static void crossProductDataData(ArrayOutData & outputData,
814  const ArrayInDataLeft & inputDataLeft,
815  const ArrayInDataRight & inputDataRight);
816 
817 
840  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
841  static void outerProductDataField(ArrayOutFields & outputFields,
842  const ArrayInData & inputData,
843  const ArrayInFields & inputFields);
844 
845 
867  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
868  static void outerProductDataData(ArrayOutData & outputData,
869  const ArrayInDataLeft & inputDataLeft,
870  const ArrayInDataRight & inputDataRight);
871 
872 
908  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
909  static void matvecProductDataField(ArrayOutFields & outputFields,
910  const ArrayInData & inputData,
911  const ArrayInFields & inputFields,
912  const char transpose = 'N');
913  /*
914  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
915  static void matvecProductDataFieldTemp(ArrayOutFields & outputFields,
916  const ArrayInData & inputData,
917  const ArrayInFields & inputFields,
918  const char transpose = 'N');
919  */
920 
953  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
954  static void matvecProductDataData(ArrayOutData & outputData,
955  const ArrayInDataLeft & inputDataLeft,
956  const ArrayInDataRight & inputDataRight,
957  const char transpose = 'N');
958  /*
959  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
960  static void matvecProductDataDataTemp(ArrayOutData & outputData,
961  const ArrayInDataLeft & inputDataLeft,
962  const ArrayInDataRight & inputDataRight,
963  const char transpose = 'N');
964  */
965 
1000  template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
1001  static void matmatProductDataField(ArrayOutFields & outputFields,
1002  const ArrayInData & inputData,
1003  const ArrayInFields & inputFields,
1004  const char transpose = 'N');
1005 
1006 
1007 
1041  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
1042  static void matmatProductDataData(ArrayOutData & outputData,
1043  const ArrayInDataLeft & inputDataLeft,
1044  const ArrayInDataRight & inputDataRight,
1045  const char transpose = 'N');
1046 
1047  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight,int inleftrank,int inrankright>
1049 
1050  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight,int inrightrank>
1052  /*
1053  template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
1054  static void matmatProductDataDataTemp(ArrayOutData & outputData,
1055  const ArrayInDataLeft & inputDataLeft,
1056  const ArrayInDataRight & inputDataRight,
1057  const char transpose = 'N'); */
1074  template<class Scalar, class ArrayOutFields, class ArrayInFields>
1075  static void cloneFields(ArrayOutFields & outputFields,
1076  const ArrayInFields & inputFields);
1077 
1078 
1079  template<class ArrayOutFields, class ArrayInFields, class Layout, class MemorySpace,int invalRank,int outvalRank>
1081  /*
1082  template<class Scalar,class ArrayOutFields, class ArrayInFields>
1083  static void cloneFieldsTemp(ArrayOutFields & outputFields,
1084  const ArrayInFields & inputFields);
1085 */
1104  template<class Scalar, class ArrayOutFields, class ArrayInFactors, class ArrayInFields>
1105  static void cloneScaleFields(ArrayOutFields & outputFields,
1106  const ArrayInFactors & inputFactors,
1107  const ArrayInFields & inputFields);
1108 
1109 
1125  template<class Scalar, class ArrayInOutFields, class ArrayInFactors>
1126  static void scaleFields(ArrayInOutFields & inoutFields,
1127  const ArrayInFactors & inputFactors);
1128 
1129 
1130  }; // end class ArrayTools
1131 
1132 } // end namespace Intrepid
1133 
1134 // include templated definitions
1135 // #ifdef INTREPID_OLD_KOKKOS_CODE
1136 // #include <Intrepid_ArrayToolsDefScalar_Kokkos.hpp>
1137 // #endif
1143 
1144 #endif
static void contractDataDataVector(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; and &quot;space&quot; dimensions P and D of rank-3 containers with dimensions (C...
static void contractDataDataScalar(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; dimensions P of rank-2 containers with dimensions (C,P), and returns the result...
static void contractDataDataTensor(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; and &quot;space&quot; dimensions P, D1 and D2 of rank-4 containers with dimensions (C...
static void contractFieldFieldTensor(ArrayOutFields &outputFields, const ArrayInFieldsLeft &leftFields, const ArrayInFieldsRight &rightFields, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; and &quot;space&quot; dimensions P, D1, and D2 of two rank-5 containers with dimensions (...
static void contractFieldFieldScalar(ArrayOutFields &outputFields, const ArrayInFieldsLeft &leftFields, const ArrayInFieldsRight &rightFields, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; dimension P of two rank-3 containers with dimensions (C,L,P) and (C...
static void contractFieldFieldVector(ArrayOutFields &outputFields, const ArrayInFieldsLeft &leftFields, const ArrayInFieldsRight &rightFields, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; and &quot;space&quot; dimensions P and D1 of two rank-4 containers with dimensions (C...
static void contractDataFieldVector(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; and &quot;space&quot; dimensions P and D of a rank-4 container and a rank-3 container wit...
static void matmatProductDataData(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight, const char transpose= 'N')
There are two use cases: (1) matrix-matrix product of a rank-4 container inputDataRight with dimensio...
static void cloneScaleFields(ArrayOutFields &outputFields, const ArrayInFactors &inputFactors, const ArrayInFields &inputFields)
Multiplies a rank-2, 3, or 4 container with dimensions (F,P), (F,P,D1) or (F,P,D1,D2), representing the values of a scalar, vector or a tensor field, F-componentwise with a scalar container indexed by (C,F), and stores the result in an output value container of size (C,F,P), (C,F,P,D1) or (C,F,P,D1,D2).
Definition file for clone / scale operations of the array tools interface.
Contains definitions of custom data types in Intrepid.
static void crossProductDataField(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields)
There are two use cases: (1) cross product of a rank-4 container inputFields with dimensions (C...
static void contractDataFieldScalar(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; dimensions P of a rank-3 containers and a rank-2 container with dimensions (C...
Definition file for tensor multiply operations of the array tools interface.
static void contractDataFieldTensor(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields, const ECompEngine compEngine, const bool sumInto=false)
Contracts the &quot;point&quot; and &quot;space&quot; dimensions P, D1 and D2 of a rank-5 container and a rank-4 containe...
static void dotMultiplyDataField(ArrayOutFields &outputFields, const ArrayInData &inputDataLeft, const ArrayInFields &inputFields)
There are two use cases: (1) dot product of a rank-3, 4 or 5 container inputFields with dimensions (C...
Definition file for scalar multiply operations of the array tools interface.
Definition file for dot-multiply operations of the array tools interface.
There are two use cases: (1) dot product of a rank-3, 4 or 5 container inputFields with dimensions (C...
static void dotMultiplyDataData(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight)
There are two use cases: (1) dot product of a rank-2, 3 or 4 container inputDataRight with dimensions...
static void scalarMultiplyDataData(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight, const bool reciprocal=false)
There are two use cases: (1) multiplies a rank-2, 3, or 4 container inputDataRight with dimensions (C...
Utility class that provides methods for higher-order algebraic manipulation of user-defined arrays...
static void crossProductDataData(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight)
There are two use cases: (1) cross product of a rank-3 container inputDataRight with dimensions (C...
static void matmatProductDataField(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields, const char transpose= 'N')
There are two use cases: (1) matrix-matrix product of a rank-5 container inputFields with dimensions ...
static void scalarMultiplyDataField(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields, const bool reciprocal=false)
There are two use cases: (1) multiplies a rank-3, 4, or 5 container inputFields with dimensions (C...
static void outerProductDataData(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight)
There are two use cases: (1) outer product of a rank-3 container inputDataRight with dimensions (C...
static void outerProductDataField(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields)
There are two use cases: (1) outer product of a rank-4 container inputFields with dimensions (C...
static void matvecProductDataData(ArrayOutData &outputData, const ArrayInDataLeft &inputDataLeft, const ArrayInDataRight &inputDataRight, const char transpose= 'N')
There are two use cases: (1) matrix-vector product of a rank-3 container inputDataRight with dimensio...
Definition file for contraction (integration) operations of the array tools class.
static void matvecProductDataField(ArrayOutFields &outputFields, const ArrayInData &inputData, const ArrayInFields &inputFields, const char transpose= 'N')
There are two use cases: (1) matrix-vector product of a rank-4 container inputFields with dimensions ...
static void cloneFields(ArrayOutFields &outputFields, const ArrayInFields &inputFields)
Replicates a rank-2, 3, or 4 container with dimensions (F,P), (F,P,D1) or (F,P,D1,D2), representing the values of a scalar, vector or a tensor field, into an output value container of size (C,F,P), (C,F,P,D1) or (C,F,P,D1,D2).
static void scaleFields(ArrayInOutFields &inoutFields, const ArrayInFactors &inputFactors)
Multiplies, in place, a rank-2, 3, or 4 container with dimensions (C,F,P), (C,F,P,D1) or (C,F,P,D1,D2), representing the values of a scalar, vector or a tensor field, F-componentwise with a scalar container indexed by (C,F).