49 #ifndef __INTREPID2_ARRAYTOOLS_HPP__
50 #define __INTREPID2_ARRAYTOOLS_HPP__
52 #include "Intrepid2_ConfigDefs.hpp"
57 #include "Kokkos_Core.hpp"
76 template<
typename ExecSpaceType =
void>
97 template<
typename outputFieldValueType,
class ...outputFieldProperties,
98 typename leftFieldValueType,
class ...leftFieldProperties,
99 typename rightFieldValueType,
class ...rightFieldProperties>
102 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
103 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
104 const bool sumInto =
false );
126 template<
typename outputFieldValueType,
class ...outputFieldProperties,
127 typename leftFieldValueType,
class ...leftFieldProperties,
128 typename rightFieldValueType,
class ...rightFieldProperties>
131 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
132 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
133 const bool sumInto =
false );
156 template<
typename outputFieldValueType,
class ...outputFieldProperties,
157 typename leftFieldValueType,
class ...leftFieldProperties,
158 typename rightFieldValueType,
class ...rightFieldProperties>
161 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
162 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
163 const bool sumInto =
false );
182 template<
typename outputFieldValueType,
class ...outputFieldProperties,
183 typename inputDataValueType,
class ...inputDataProperties,
184 typename inputFieldValueType,
class ...inputFieldProperties>
187 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
188 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
189 const bool sumInto =
false );
209 template<
typename outputFieldValueType,
class ...outputFieldProperties,
210 typename inputDataValueType,
class ...inputDataProperties,
211 typename inputFieldValueType,
class ...inputFieldProperties>
214 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
215 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
216 const bool sumInto =
false );
237 template<
typename outputFieldValueType,
class ...outputFieldProperties,
238 typename inputDataValueType,
class ...inputDataProperties,
239 typename inputFieldValueType,
class ...inputFieldProperties>
242 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
243 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
244 const bool sumInto =
false);
261 template<
typename outputDataValueType,
class ...outputDataProperties,
262 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
263 typename inputDataRightValueType,
class ...inputDataRightProperties>
266 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
267 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
268 const bool sumInto =
false );
285 template<
typename outputDataValueType,
class ...outputDataProperties,
286 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
287 typename inputDataRightValueType,
class ...inputDataRightProperties>
290 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
291 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
292 const bool sumInto =
false );
310 template<
typename outputDataValueType,
class ...outputDataProperties,
311 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
312 typename inputDataRightValueType,
class ...inputDataRightProperties>
315 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
316 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
317 const bool sumInto =
false );
348 template<
typename outputFieldValueType,
class ...outputFieldProperties,
349 typename inputDataValueType,
class ...inputDataProperties,
350 typename inputFieldValueType,
class ...inputFieldProperties>
353 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
354 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
355 const bool reciprocal =
false );
385 template<
typename outputDataValueType,
class ...outputDataProperties,
386 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
387 typename inputDataRightValueType,
class ...inputDataRightProperties>
390 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
391 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
392 const bool reciprocal =
false );
421 template<
typename outputFieldValueType,
class ...outputFieldProperties,
422 typename inputDataValueType,
class ...inputDataProperties,
423 typename inputFieldValueType,
class ...inputFieldProperties>
425 dotMultiplyDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
426 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
427 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
455 template<
typename outputDataValueType,
class ...outputDataProperties,
456 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
457 typename inputDataRightValueType,
class ...inputDataRightProperties>
459 dotMultiplyDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
460 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
461 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight );
485 template<
typename outputFieldValueType,
class ...outputFieldProperties,
486 typename inputDataValueType,
class ...inputDataProperties,
487 typename inputFieldValueType,
class ...inputFieldProperties>
489 crossProductDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
490 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
491 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
513 template<
typename outputDataValueType,
class ...outputDataProperties,
514 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
515 typename inputDataRightValueType,
class ...inputDataRightProperties>
517 crossProductDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
518 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
519 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight );
543 template<
typename outputFieldValueType,
class ...outputFieldProperties,
544 typename inputDataValueType,
class ...inputDataProperties,
545 typename inputFieldValueType,
class ...inputFieldProperties>
547 outerProductDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
548 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
549 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
572 template<
typename outputDataValueType,
class ...outputDataProperties,
573 typename inputDataLeftValuetype,
class ...inputDataLeftProperties,
574 typename inputDataRightValueType,
class ...inputDataRightProperties>
576 outerProductDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
577 const Kokkos::DynRankView<inputDataLeftValuetype, inputDataLeftProperties...> inputDataLeft,
578 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight );
615 template<
typename outputFieldValueType,
class ...outputFieldProperties,
616 typename inputDataValueType,
class ...inputDataProperties,
617 typename inputFieldValueType,
class ...inputFieldProperties>
620 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
621 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
622 const char transpose =
'N');
656 template<
typename outputDataValueType,
class ...outputDataProperties,
657 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
658 typename inputDataRightValueType,
class ...inputDataRightProperties>
661 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
662 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
663 const char transpose =
'N');
699 template<
typename outputFieldValueType,
class ...outputFieldProperties,
700 typename inputDataValueType,
class ...inputDataProperties,
701 typename inputFieldValueType,
class ...inputFieldProperties>
704 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
705 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
706 const char transpose =
'N' );
741 template<
typename outputDataValueType,
class ...outputDataProperties,
742 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
743 typename inputDataRightValueType,
class ...inputDataRightProperties>
746 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
747 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
748 const char transpose =
'N' );
766 template<
typename outputFieldValueType,
class ...outputFieldProperties,
767 typename inputFieldValueType,
class ...inputFieldProperties>
769 cloneFields( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
770 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
788 template<
typename outputDataValueType,
class ...outputDataProperties,
789 typename inputDataValueType,
class ...inputDataProperties>
791 cloneData( Kokkos::DynRankView<outputDataValueType,outputDataProperties...> outputData,
792 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData );
803 template<
typename outputFieldValueType,
class ...outputFieldProperties,
804 typename leftFieldValueType,
class ...leftFieldProperties,
805 typename rightFieldValueType,
class ...rightFieldProperties>
807 contractFieldField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
808 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
809 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
810 const bool sumInto );
812 template<
typename outputFieldValueType,
class ...outputFieldProperties,
813 typename inputDataValueType,
class ...inputDataProperties,
814 typename inputFieldValuetype,
class ...inputFieldProperties>
816 contractDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
817 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
818 const Kokkos::DynRankView<inputFieldValuetype, inputFieldProperties...> inputFields,
819 const bool sumInto );
821 template<
typename outputDataValueType,
class ...outputDataProperties,
822 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
823 typename inputDataRightValueType,
class ...inputDataRightProperties>
825 contractDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
826 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
827 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
828 const bool sumInto );
830 template<
typename outputValueType,
class ...outputProperties,
831 typename leftInputValueType,
class ...leftInputProperties,
832 typename rightInputValueType,
class ...rightInputProperties>
834 dotMultiply( Kokkos::DynRankView<outputValueType, outputProperties...> output,
835 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
836 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
837 const bool hasField );
839 template<
typename outputValueType,
class ...outputProperties,
840 typename leftInputValueType,
class ...leftInputProperties,
841 typename rightInputValueType,
class ...rightInputProperties>
843 crossProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
844 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
845 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
846 const bool hasField );
848 template<
typename outputValueType,
class ...outputProperties,
849 typename leftInputValueType,
class ...leftInputProperties,
850 typename rightInputValueType,
class ...rightInputProperties>
852 outerProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
853 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
854 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
855 const bool hasField );
857 template<
typename outputValueType,
class ...outputProperties,
858 typename leftInputValueType,
class ...leftInputProperties,
859 typename rightInputValueType,
class ...rightInputProperties>
861 matvecProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
862 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
863 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
865 const bool isTranspose );
867 template<
typename outputValueType,
class ...outputProperties,
868 typename leftInputValueType,
class ...leftInputProperties,
869 typename rightInputValueType,
class ...rightInputProperties>
871 matmatProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
872 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
873 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
875 const bool isTranspose );
Contains definitions of custom data types in Intrepid2.
Header file for small functions used in Intrepid2.