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"
62 template<
class Scalar>
74 static void absval(Scalar* absArray,
const Scalar* inArray,
const int size);
83 static void absval(Scalar* inoutArray,
const int size);
95 template<
class ArrayAbs,
class ArrayIn>
96 static void absval(ArrayAbs & absArray,
const ArrayIn & inArray);
103 template<
class ArrayInOut>
104 static void absval(ArrayInOut & inoutAbsArray);
114 static Scalar
vectorNorm(
const Scalar* inVec,
const int dim,
const ENorm normType);
126 template<
class ArrayIn>
127 static Scalar
vectorNorm(
const ArrayIn & inVec,
const ENorm normType);
143 template<
class ArrayNorm,
class ArrayIn>
144 static void vectorNorm(ArrayNorm & normArray,
const ArrayIn & inVecs,
const ENorm normType);
154 static void transpose(Scalar* transposeMat,
const Scalar* inMat,
const int dim);
171 template<
class ArrayTranspose,
class ArrayIn>
172 static void transpose(ArrayTranspose & transposeMats,
const ArrayIn & inMats);
182 static void inverse(Scalar* inverseMat,
const Scalar* inMat,
const int dim);
200 template<
class ArrayInverse,
class ArrayIn>
201 static void inverse(ArrayInverse & inverseMats,
const ArrayIn & inMats);
210 static Scalar
det(
const Scalar* inMat,
const int 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);
253 static void add(Scalar* sumArray,
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
264 static void add(Scalar* inoutSumArray,
const Scalar* inArray,
const int size);
278 template<
class ArraySum,
class ArrayIn1,
class ArrayIn2>
279 static void add(ArraySum & sumArray,
const ArrayIn1 & inArray1,
const ArrayIn2 & inArray2);
292 template<
class ArraySum,
class ArrayIn>
293 static void add(ArraySum & inoutSumArray,
const ArrayIn & inArray);
305 static void subtract(Scalar* diffArray,
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
316 static void subtract(Scalar* inoutDiffArray,
const Scalar* inArray,
const int size);
330 template<
class ArrayDiff,
class ArrayIn1,
class ArrayIn2>
331 static void subtract(ArrayDiff & diffArray,
const ArrayIn1 & inArray1,
const ArrayIn2 & inArray2);
344 template<
class ArrayDiff,
class ArrayIn>
345 static void subtract(ArrayDiff & inoutDiffArray,
const ArrayIn & inArray);
357 static void scale(Scalar* scaledArray,
const Scalar* inArray,
const int size,
const Scalar scalar);
368 static void scale(Scalar* inoutScaledArray,
const int size,
const Scalar scalar);
382 template<
class ArrayScaled,
class ArrayIn>
383 static void scale(ArrayScaled & scaledArray,
const ArrayIn & inArray,
const Scalar scalar);
392 template<
class ArrayScaled>
393 static void scale(ArrayScaled & inoutScaledArray,
const Scalar scalar);
403 static Scalar
dot(
const Scalar* inArray1,
const Scalar* inArray2,
const int size);
416 template<
class ArrayVec1,
class ArrayVec2>
417 static Scalar
dot(
const ArrayVec1 & inVec1,
const ArrayVec2 & inVec2);
433 template<
class ArrayDot,
class ArrayVec1,
class ArrayVec2>
434 static void dot(ArrayDot & dotArray,
const ArrayVec1 & inVecs1,
const ArrayVec2 & inVecs2);
449 static void matvec(Scalar* matVec,
const Scalar* inMat,
const Scalar* inVec,
const int dim);
470 template<
class ArrayMatVec,
class ArrayMat,
class ArrayVec>
471 static void matvec(ArrayMatVec & matVecs,
const ArrayMat & inMats,
const ArrayVec & inVecs);
487 template<
class ArrayVecProd,
class ArrayIn1,
class ArrayIn2>
488 static void vecprod(ArrayVecProd & vecProd,
const ArrayIn1 & inLeft,
const ArrayIn2 & inRight);
Contains definitions of custom data types in Intrepid.