49 #ifndef INTREPID_REALSPACETOOLS_HPP
50 #define INTREPID_REALSPACETOOLS_HPP
52 #include "Intrepid_ConfigDefs.hpp"
54 #include "Teuchos_oblackholestream.hpp"
55 #include "Teuchos_Assert.hpp"
58 #include <Intrepid_KokkosRank.hpp>
59 #ifdef INTREPID_OLD_KOKKOS_CODE
60 #include "Kokkos_Core.hpp"
67 template<
class Scalar>
79 static void absval(Scalar* absArray,
const Scalar* inArray,
const int size);
88 static void absval(Scalar* inoutArray,
const int size);
100 template<
class ArrayAbs,
class ArrayIn>
101 static void absval(ArrayAbs & absArray,
const ArrayIn & inArray);
108 template<
class ArrayInOut>
109 static void absval(ArrayInOut & inoutAbsArray);
119 static Scalar
vectorNorm(
const Scalar* inVec,
const size_t dim,
const ENorm normType);
131 template<
class ArrayIn>
132 static Scalar
vectorNorm(
const ArrayIn & inVec,
const ENorm normType);
148 template<
class ArrayNorm,
class ArrayIn>
149 static void vectorNorm(ArrayNorm & normArray,
const ArrayIn & inVecs,
const ENorm normType);
161 static void transpose(Scalar* transposeMat,
const Scalar* inMat,
const size_t dim);
179 template<
class ArrayTranspose,
class ArrayIn>
180 static void transpose(ArrayTranspose & transposeMats,
const ArrayIn & inMats);
191 static void inverse(Scalar* inverseMat,
const Scalar* inMat,
const size_t dim);
209 template<
class ArrayInverse,
class ArrayIn>
210 static void inverse(ArrayInverse & inverseMats,
const ArrayIn & inMats);
213 static Scalar det(
const Scalar* inMat,
const size_t dim);
225 template<
class ArrayIn>
226 static Scalar det(
const ArrayIn & inMat);
243 template<
class ArrayDet,
class ArrayIn>
244 static void det(ArrayDet & detArray,
const ArrayIn & inMats);
251 template<
class ArrayDet,
class ArrayIn,
int matRank>
262 static void add(Scalar* sumArray,
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
273 static void add(Scalar* inoutSumArray,
const Scalar* inArray,
const int size);
287 template<
class ArraySum,
class ArrayIn1,
class ArrayIn2>
288 static void add(ArraySum & sumArray,
const ArrayIn1 & inArray1,
const ArrayIn2 & inArray2);
301 template<
class ArraySum,
class ArrayIn>
302 static void add(ArraySum & inoutSumArray,
const ArrayIn & inArray);
314 static void subtract(Scalar* diffArray,
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
325 static void subtract(Scalar* inoutDiffArray,
const Scalar* inArray,
const int size);
339 template<
class ArrayDiff,
class ArrayIn1,
class ArrayIn2>
340 static void subtract(ArrayDiff & diffArray,
const ArrayIn1 & inArray1,
const ArrayIn2 & inArray2);
353 template<
class ArrayDiff,
class ArrayIn>
354 static void subtract(ArrayDiff & inoutDiffArray,
const ArrayIn & inArray);
356 template<
class ArrayDiff,
class ArrayIn>
357 static void subtractTemp(ArrayDiff & inoutDiffArray,
const ArrayIn & inArray);
367 static void scale(Scalar* scaledArray,
const Scalar* inArray,
const int size,
const Scalar scalar);
378 static void scale(Scalar* inoutScaledArray,
const int size,
const Scalar scalar);
392 template<
class ArrayScaled,
class ArrayIn>
393 static void scale(ArrayScaled & scaledArray,
const ArrayIn & inArray,
const Scalar scalar);
402 template<
class ArrayScaled>
403 static void scale(ArrayScaled & inoutScaledArray,
const Scalar scalar);
413 static Scalar
dot(
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
426 template<
class ArrayVec1,
class ArrayVec2>
427 static Scalar
dot(
const ArrayVec1 & inVec1,
const ArrayVec2 & inVec2);
443 template<
class ArrayDot,
class ArrayVec1,
class ArrayVec2>
444 static void dot(ArrayDot & dotArray,
const ArrayVec1 & inVecs1,
const ArrayVec2 & inVecs2);
459 static void matvec(Scalar* matVec,
const Scalar* inMat,
const Scalar* inVec,
const size_t dim);
480 template<
class ArrayMatVec,
class ArrayMat,
class ArrayVec>
481 static void matvec(ArrayMatVec & matVecs,
const ArrayMat & inMats,
const ArrayVec & inVecs);
497 template<
class ArrayVecProd,
class ArrayIn1,
class ArrayIn2>
498 static void vecprod(ArrayVecProd & vecProd,
const ArrayIn1 & inLeft,
const ArrayIn2 & inRight);
Contains definitions of custom data types in Intrepid.