49 #ifndef __INTREPID2_REALSPACETOOLS_HPP__
50 #define __INTREPID2_REALSPACETOOLS_HPP__
52 #include "Intrepid2_ConfigDefs.hpp"
57 #include "Kokkos_Core.hpp"
78 template<
typename DeviceType =
void>
92 template<
typename inVecValueType,
class ...inVecProperties>
93 KOKKOS_INLINE_FUNCTION
95 vectorNorm(
const Kokkos::DynRankView<inVecValueType,inVecProperties...> inVec,
96 const ENorm normType );
107 template<
class MatrixViewType>
108 KOKKOS_INLINE_FUNCTION
109 static typename MatrixViewType::value_type
110 det(
const MatrixViewType inMat );
122 template<
typename inVec1ValueType,
class ...inVec1Properties,
123 typename inVec2ValueType,
class ...inVec2Properties>
124 KOKKOS_INLINE_FUNCTION
125 static inVec1ValueType
126 dot(
const Kokkos::DynRankView<inVec1ValueType,inVec1Properties...> inVec1,
127 const Kokkos::DynRankView<inVec2ValueType,inVec2Properties...> inVec2 );
137 template<
typename outputValueType,
class ...outputProperties,
138 typename inputValueType,
class ...inputProperties>
141 const Kokkos::DynRankView<inputValueType, inputProperties...> input );
153 template<
typename outputValueType,
class ...outputProperties,
154 typename inputValueType,
class ...inputProperties>
156 clone( Kokkos::DynRankView<outputValueType,outputProperties...> output,
157 const Kokkos::DynRankView<inputValueType,inputProperties...> input );
168 template<
typename absArrayValueType,
class ...absArrayProperties,
169 typename inArrayValueType,
class ...inArrayProperties>
171 absval( Kokkos::DynRankView<absArrayValueType,absArrayProperties...> absArray,
172 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray );
179 template<
typename inoutArrayValueType,
class ...inoutArrayProperties>
181 absval( Kokkos::DynRankView<inoutArrayValueType,inoutArrayProperties...> inoutArray );
197 template<
typename normArrayValueType,
class ...normArrayProperties,
198 typename inVecValueType,
class ...inVecProperties>
200 vectorNorm( Kokkos::DynRankView<normArrayValueType,normArrayProperties...> normArray,
201 const Kokkos::DynRankView<inVecValueType, inVecProperties...> inVecs,
202 const ENorm normType );
218 template<
typename transposeMatValueType,
class ...transposeMatProperties,
219 typename inMatValueType,
class ...inMatProperties>
221 transpose( Kokkos::DynRankView<transposeMatValueType,transposeMatProperties...> transposeMats,
222 const Kokkos::DynRankView<inMatValueType, inMatProperties...> inMats );
239 template<
class InverseMatrixViewType,
class MatrixViewType>
241 inverse( InverseMatrixViewType inverseMats, MatrixViewType inMats );
257 template<
class DeterminantArrayViewType,
class MatrixViewType>
259 det( DeterminantArrayViewType detArray,
const MatrixViewType inMats );
272 template<
typename sumArrayValueType,
class ...sumArrayProperties,
273 typename inArray1ValueType,
class ...inArray1Properties,
274 typename inArray2ValueType,
class ...inArray2Properties>
276 add( Kokkos::DynRankView<sumArrayValueType,sumArrayProperties...> sumArray,
277 const Kokkos::DynRankView<inArray1ValueType,inArray1Properties...> inArray1,
278 const Kokkos::DynRankView<inArray2ValueType,inArray2Properties...> inArray2 );
290 template<
typename inoutSumArrayValueType,
class ...inoutSumArrayProperties,
291 typename inArrayValueType,
class ...inArrayProperties>
293 add( Kokkos::DynRankView<inoutSumArrayValueType,inoutSumArrayProperties...> inoutSumArray,
294 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray );
307 template<
typename diffArrayValueType,
class ...diffArrayProperties,
308 typename inArray1ValueType,
class ...inArray1Properties,
309 typename inArray2ValueType,
class ...inArray2Properties>
311 subtract( Kokkos::DynRankView<diffArrayValueType,diffArrayProperties...> diffArray,
312 const Kokkos::DynRankView<inArray1ValueType, inArray1Properties...> inArray1,
313 const Kokkos::DynRankView<inArray2ValueType, inArray2Properties...> inArray2 );
325 template<
typename inoutDiffArrayValueType,
class ...inoutDiffArrayProperties,
326 typename inArrayValueType,
class ...inArrayProperties>
328 subtract( Kokkos::DynRankView<inoutDiffArrayValueType,inoutDiffArrayProperties...> diffArray,
329 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray );
342 template<
typename ValueType,
343 typename scaledArrayValueType,
class ...scaledArrayProperties,
344 typename inArrayValueType,
class ...inArrayProperties>
346 scale( Kokkos::DynRankView<scaledArrayValueType,scaledArrayProperties...> scaledArray,
347 const Kokkos::DynRankView<inArrayValueType, inArrayProperties...> inArray,
348 const ValueType alpha );
356 template<
typename ValueType,
357 typename inoutScaledArrayValueType,
class ...inoutScaledArrayProperties>
359 scale( Kokkos::DynRankView<inoutScaledArrayValueType,inoutScaledArrayProperties...> inoutScaledArray,
360 const ValueType alpha );
376 template<
typename dotArrayValueType,
class ...dotArrayProperties,
377 typename inVec1ValueType,
class ...inVec1Properties,
378 typename inVec2ValueType,
class ...inVec2Properties>
380 dot( Kokkos::DynRankView<dotArrayValueType,dotArrayProperties...> dotArray,
381 const Kokkos::DynRankView<inVec1ValueType, inVec1Properties...> inVecs1,
382 const Kokkos::DynRankView<inVec2ValueType, inVec2Properties...> inVecs2 );
402 template<
typename matVecValueType,
class ...matVecProperties,
403 typename inMatValueType,
class ...inMatProperties,
404 typename inVecValueType,
class ...inVecProperties>
406 matvec( Kokkos::DynRankView<matVecValueType,matVecProperties...> matVecs,
407 const Kokkos::DynRankView<inMatValueType, inMatProperties...> inMats,
408 const Kokkos::DynRankView<inVecValueType, inVecProperties...> inVecs );
415 template<
typename outMatValueType,
class ...outMatProperties,
416 typename inMatValueType,
class ...inMatProperties>
418 AtA( Kokkos::DynRankView<outMatValueType,outMatProperties...> outMats,
419 const Kokkos::DynRankView<inMatValueType, inMatProperties...> inMats);
434 template<
typename vecProdValueType,
class ...vecProdProperties,
435 typename inLeftValueType,
class ...inLeftProperties,
436 typename inRightValueType,
class ...inRightProperties>
438 vecprod( Kokkos::DynRankView<vecProdValueType,vecProdProperties...> vecProd,
439 const Kokkos::DynRankView<inLeftValueType, inLeftProperties...> inLeft,
440 const Kokkos::DynRankView<inRightValueType,inRightProperties...> inRight );
Header function for Intrepid2::Util class and other utility functions.
Contains definitions of custom data types in Intrepid2.