16 #ifndef __INTREPID2_REALSPACETOOLS_HPP__
17 #define __INTREPID2_REALSPACETOOLS_HPP__
19 #include "Intrepid2_ConfigDefs.hpp"
24 #include "Kokkos_Core.hpp"
45 template<
typename DeviceType =
void>
59 template<
typename inVecValueType,
class ...inVecProperties>
60 KOKKOS_INLINE_FUNCTION
62 vectorNorm(
const Kokkos::DynRankView<inVecValueType,inVecProperties...> inVec,
63 const ENorm normType );
74 template<
class MatrixViewType>
75 KOKKOS_INLINE_FUNCTION
76 static typename MatrixViewType::value_type
77 det(
const MatrixViewType inMat );
89 template<
typename inVec1ValueType,
class ...inVec1Properties,
90 typename inVec2ValueType,
class ...inVec2Properties>
91 KOKKOS_INLINE_FUNCTION
92 static inVec1ValueType
93 dot(
const Kokkos::DynRankView<inVec1ValueType,inVec1Properties...> inVec1,
94 const Kokkos::DynRankView<inVec2ValueType,inVec2Properties...> inVec2 );
104 template<
typename outputValueType,
class ...outputProperties,
105 typename inputValueType,
class ...inputProperties>
108 const Kokkos::DynRankView<inputValueType, inputProperties...> input );
120 template<
typename outputValueType,
class ...outputProperties,
121 typename inputValueType,
class ...inputProperties>
123 clone( Kokkos::DynRankView<outputValueType,outputProperties...> output,
124 const Kokkos::DynRankView<inputValueType,inputProperties...> input );
135 template<
typename absArrayValueType,
class ...absArrayProperties,
136 typename inArrayValueType,
class ...inArrayProperties>
138 absval( Kokkos::DynRankView<absArrayValueType,absArrayProperties...> absArray,
139 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray );
146 template<
typename inoutArrayValueType,
class ...inoutArrayProperties>
148 absval( Kokkos::DynRankView<inoutArrayValueType,inoutArrayProperties...> inoutArray );
164 template<
typename normArrayValueType,
class ...normArrayProperties,
165 typename inVecValueType,
class ...inVecProperties>
167 vectorNorm( Kokkos::DynRankView<normArrayValueType,normArrayProperties...> normArray,
168 const Kokkos::DynRankView<inVecValueType, inVecProperties...> inVecs,
169 const ENorm normType );
185 template<
typename transposeMatValueType,
class ...transposeMatProperties,
186 typename inMatValueType,
class ...inMatProperties>
188 transpose( Kokkos::DynRankView<transposeMatValueType,transposeMatProperties...> transposeMats,
189 const Kokkos::DynRankView<inMatValueType, inMatProperties...> inMats );
206 template<
class InverseMatrixViewType,
class MatrixViewType>
208 inverse( InverseMatrixViewType inverseMats, MatrixViewType inMats );
224 template<
class DeterminantArrayViewType,
class MatrixViewType>
226 det( DeterminantArrayViewType detArray,
const MatrixViewType inMats );
239 template<
typename sumArrayValueType,
class ...sumArrayProperties,
240 typename inArray1ValueType,
class ...inArray1Properties,
241 typename inArray2ValueType,
class ...inArray2Properties>
243 add( Kokkos::DynRankView<sumArrayValueType,sumArrayProperties...> sumArray,
244 const Kokkos::DynRankView<inArray1ValueType,inArray1Properties...> inArray1,
245 const Kokkos::DynRankView<inArray2ValueType,inArray2Properties...> inArray2 );
257 template<
typename inoutSumArrayValueType,
class ...inoutSumArrayProperties,
258 typename inArrayValueType,
class ...inArrayProperties>
260 add( Kokkos::DynRankView<inoutSumArrayValueType,inoutSumArrayProperties...> inoutSumArray,
261 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray );
274 template<
typename diffArrayValueType,
class ...diffArrayProperties,
275 typename inArray1ValueType,
class ...inArray1Properties,
276 typename inArray2ValueType,
class ...inArray2Properties>
278 subtract( Kokkos::DynRankView<diffArrayValueType,diffArrayProperties...> diffArray,
279 const Kokkos::DynRankView<inArray1ValueType, inArray1Properties...> inArray1,
280 const Kokkos::DynRankView<inArray2ValueType, inArray2Properties...> inArray2 );
292 template<
typename inoutDiffArrayValueType,
class ...inoutDiffArrayProperties,
293 typename inArrayValueType,
class ...inArrayProperties>
295 subtract( Kokkos::DynRankView<inoutDiffArrayValueType,inoutDiffArrayProperties...> diffArray,
296 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray );
309 template<
typename ValueType,
310 typename scaledArrayValueType,
class ...scaledArrayProperties,
311 typename inArrayValueType,
class ...inArrayProperties>
313 scale( Kokkos::DynRankView<scaledArrayValueType,scaledArrayProperties...> scaledArray,
314 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray,
315 const ValueType alpha );
323 template<
typename ValueType,
324 typename inoutScaledArrayValueType,
class ...inoutScaledArrayProperties>
326 scale( Kokkos::DynRankView<inoutScaledArrayValueType,inoutScaledArrayProperties...> inoutScaledArray,
327 const ValueType alpha );
343 template<
typename dotArrayValueType,
class ...dotArrayProperties,
344 typename inVec1ValueType,
class ...inVec1Properties,
345 typename inVec2ValueType,
class ...inVec2Properties>
347 dot( Kokkos::DynRankView<dotArrayValueType,dotArrayProperties...> dotArray,
348 const Kokkos::DynRankView<inVec1ValueType, inVec1Properties...> inVecs1,
349 const Kokkos::DynRankView<inVec2ValueType, inVec2Properties...> inVecs2 );
369 template<
typename matVecValueType,
class ...matVecProperties,
370 typename inMatValueType,
class ...inMatProperties,
371 typename inVecValueType,
class ...inVecProperties>
373 matvec( Kokkos::DynRankView<matVecValueType,matVecProperties...> matVecs,
374 const Kokkos::DynRankView<inMatValueType, inMatProperties...> inMats,
375 const Kokkos::DynRankView<inVecValueType, inVecProperties...> inVecs );
382 template<
typename outMatValueType,
class ...outMatProperties,
383 typename inMatValueType,
class ...inMatProperties>
385 AtA( Kokkos::DynRankView<outMatValueType,outMatProperties...> outMats,
386 const Kokkos::DynRankView<inMatValueType, inMatProperties...> inMats);
401 template<
typename vecProdValueType,
class ...vecProdProperties,
402 typename inLeftValueType,
class ...inLeftProperties,
403 typename inRightValueType,
class ...inRightProperties>
405 vecprod( Kokkos::DynRankView<vecProdValueType,vecProdProperties...> vecProd,
406 const Kokkos::DynRankView<inLeftValueType, inLeftProperties...> inLeft,
407 const Kokkos::DynRankView<inRightValueType,inRightProperties...> inRight );
Header function for Intrepid2::Util class and other utility functions.
Contains definitions of custom data types in Intrepid2.