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_Rank.hpp>
64 template<
class Scalar>
76 static void absval(Scalar* absArray,
const Scalar* inArray,
const int size);
85 static void absval(Scalar* inoutArray,
const int size);
97 template<
class ArrayAbs,
class ArrayIn>
98 static void absval(ArrayAbs & absArray,
const ArrayIn & inArray);
105 template<
class ArrayInOut>
106 static void absval(ArrayInOut & inoutAbsArray);
116 static Scalar
vectorNorm(
const Scalar* inVec,
const size_t dim,
const ENorm normType);
128 template<
class ArrayIn>
129 static Scalar
vectorNorm(
const ArrayIn & inVec,
const ENorm normType);
145 template<
class ArrayNorm,
class ArrayIn>
146 static void vectorNorm(ArrayNorm & normArray,
const ArrayIn & inVecs,
const ENorm normType);
158 static void transpose(Scalar* transposeMat,
const Scalar* inMat,
const size_t dim);
176 template<
class ArrayTranspose,
class ArrayIn>
177 static void transpose(ArrayTranspose & transposeMats,
const ArrayIn & inMats);
188 static void inverse(Scalar* inverseMat,
const Scalar* inMat,
const size_t dim);
206 template<
class ArrayInverse,
class ArrayIn>
207 static void inverse(ArrayInverse & inverseMats,
const ArrayIn & inMats);
210 static Scalar det(
const Scalar* inMat,
const size_t dim);
222 template<
class ArrayIn>
223 static Scalar det(
const ArrayIn & inMat);
240 template<
class ArrayDet,
class ArrayIn>
241 static void det(ArrayDet & detArray,
const ArrayIn & inMats);
243 template<
class ArrayDet,
class ArrayIn,
int matRank>
254 static void add(Scalar* sumArray,
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
265 static void add(Scalar* inoutSumArray,
const Scalar* inArray,
const int size);
279 template<
class ArraySum,
class ArrayIn1,
class ArrayIn2>
280 static void add(ArraySum & sumArray,
const ArrayIn1 & inArray1,
const ArrayIn2 & inArray2);
293 template<
class ArraySum,
class ArrayIn>
294 static void add(ArraySum & inoutSumArray,
const ArrayIn & inArray);
306 static void subtract(Scalar* diffArray,
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
317 static void subtract(Scalar* inoutDiffArray,
const Scalar* inArray,
const int size);
331 template<
class ArrayDiff,
class ArrayIn1,
class ArrayIn2>
332 static void subtract(ArrayDiff & diffArray,
const ArrayIn1 & inArray1,
const ArrayIn2 & inArray2);
345 template<
class ArrayDiff,
class ArrayIn>
346 static void subtract(ArrayDiff & inoutDiffArray,
const ArrayIn & inArray);
348 template<
class ArrayDiff,
class ArrayIn>
349 static void subtractTemp(ArrayDiff & inoutDiffArray,
const ArrayIn & inArray);
359 static void scale(Scalar* scaledArray,
const Scalar* inArray,
const int size,
const Scalar scalar);
370 static void scale(Scalar* inoutScaledArray,
const int size,
const Scalar scalar);
384 template<
class ArrayScaled,
class ArrayIn>
385 static void scale(ArrayScaled & scaledArray,
const ArrayIn & inArray,
const Scalar scalar);
394 template<
class ArrayScaled>
395 static void scale(ArrayScaled & inoutScaledArray,
const Scalar scalar);
405 static Scalar
dot(
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
418 template<
class ArrayVec1,
class ArrayVec2>
419 static Scalar
dot(
const ArrayVec1 & inVec1,
const ArrayVec2 & inVec2);
435 template<
class ArrayDot,
class ArrayVec1,
class ArrayVec2>
436 static void dot(ArrayDot & dotArray,
const ArrayVec1 & inVecs1,
const ArrayVec2 & inVecs2);
451 static void matvec(Scalar* matVec,
const Scalar* inMat,
const Scalar* inVec,
const size_t dim);
472 template<
class ArrayMatVec,
class ArrayMat,
class ArrayVec>
473 static void matvec(ArrayMatVec & matVecs,
const ArrayMat & inMats,
const ArrayVec & inVecs);
489 template<
class ArrayVecProd,
class ArrayIn1,
class ArrayIn2>
490 static void vecprod(ArrayVecProd & vecProd,
const ArrayIn1 & inLeft,
const ArrayIn2 & inRight);
Contains definitions of custom data types in Intrepid.