Intrepid2
|
Implementation of basic linear algebra functionality in Euclidean space. More...
#include <Intrepid2_RealSpaceTools.hpp>
Classes | |
struct | Serial |
Public Member Functions | |
template<typename inoutArrayValueType , class ... inoutAbsArrayProperties> | |
void | absval (Kokkos::DynRankView< inoutArrayValueType, inoutAbsArrayProperties... > inoutAbsArray) |
Static Public Member Functions | |
template<typename outputValueType , class ... outputProperties, typename inputValueType , class ... inputProperties> | |
static void | extractScalarValues (Kokkos::DynRankView< outputValueType, outputProperties... > output, const Kokkos::DynRankView< inputValueType, inputProperties... > input) |
Extract scalar type values from Sacado-based array. | |
template<typename outputValueType , class ... outputProperties, typename inputValueType , class ... inputProperties> | |
static void | clone (Kokkos::DynRankView< outputValueType, outputProperties... > output, const Kokkos::DynRankView< inputValueType, inputProperties... > input) |
Clone input array. | |
template<typename absArrayValueType , class ... absArrayProperties, typename inArrayValueType , class ... inArrayProperties> | |
static void | absval (Kokkos::DynRankView< absArrayValueType, absArrayProperties... > absArray, const Kokkos::DynRankView< inArrayValueType, inArrayProperties... > inArray) |
Computes absolute value of an array. | |
template<typename inoutArrayValueType , class ... inoutArrayProperties> | |
static void | absval (Kokkos::DynRankView< inoutArrayValueType, inoutArrayProperties... > inoutArray) |
Computes, in place, absolute value of an array. | |
template<typename normArrayValueType , class ... normArrayProperties, typename inVecValueType , class ... inVecProperties> | |
static void | vectorNorm (Kokkos::DynRankView< normArrayValueType, normArrayProperties... > normArray, const Kokkos::DynRankView< inVecValueType, inVecProperties... > inVecs, const ENorm normType) |
Computes norms (1, 2, infinity) of vectors stored in a array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D). | |
template<typename transposeMatValueType , class ... transposeMatProperties, typename inMatValueType , class ... inMatProperties> | |
static void | transpose (Kokkos::DynRankView< transposeMatValueType, transposeMatProperties... > transposeMats, const Kokkos::DynRankView< inMatValueType, inMatProperties... > inMats) |
Computes transposes of square matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D). | |
template<class InverseMatrixViewType , class MatrixViewType > | |
static void | inverse (InverseMatrixViewType inverseMats, MatrixViewType inMats) |
Computes inverses of nonsingular matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D). | |
template<class DeterminantArrayViewType , class MatrixViewType > | |
static void | det (DeterminantArrayViewType detArray, const MatrixViewType inMats) |
Computes determinants of matrices stored in an array of total rank 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D). | |
template<typename sumArrayValueType , class ... sumArrayProperties, typename inArray1ValueType , class ... inArray1Properties, typename inArray2ValueType , class ... inArray2Properties> | |
static void | add (Kokkos::DynRankView< sumArrayValueType, sumArrayProperties... > sumArray, const Kokkos::DynRankView< inArray1ValueType, inArray1Properties... > inArray1, const Kokkos::DynRankView< inArray2ValueType, inArray2Properties... > inArray2) |
Adds arrays inArray1 and inArray2: sumArray = inArray1 + inArray2. | |
template<typename inoutSumArrayValueType , class ... inoutSumArrayProperties, typename inArrayValueType , class ... inArrayProperties> | |
static void | add (Kokkos::DynRankView< inoutSumArrayValueType, inoutSumArrayProperties... > inoutSumArray, const Kokkos::DynRankView< inArrayValueType, inArrayProperties... > inArray) |
Adds, in place, inArray into inoutSumArray: inoutSumArray = inoutSumArray + inArray. | |
template<typename diffArrayValueType , class ... diffArrayProperties, typename inArray1ValueType , class ... inArray1Properties, typename inArray2ValueType , class ... inArray2Properties> | |
static void | subtract (Kokkos::DynRankView< diffArrayValueType, diffArrayProperties... > diffArray, const Kokkos::DynRankView< inArray1ValueType, inArray1Properties... > inArray1, const Kokkos::DynRankView< inArray2ValueType, inArray2Properties... > inArray2) |
Subtracts inArray2 from inArray1: diffArray = inArray1 - inArray2. | |
template<typename inoutDiffArrayValueType , class ... inoutDiffArrayProperties, typename inArrayValueType , class ... inArrayProperties> | |
static void | subtract (Kokkos::DynRankView< inoutDiffArrayValueType, inoutDiffArrayProperties... > diffArray, const Kokkos::DynRankView< inArrayValueType, inArrayProperties... > inArray) |
Subtracts, in place, inArray from diffArray: diffArray = diffArray - inArray. | |
template<typename ValueType , typename scaledArrayValueType , class ... scaledArrayProperties, typename inArrayValueType , class ... inArrayProperties> | |
static void | scale (Kokkos::DynRankView< scaledArrayValueType, scaledArrayProperties... > scaledArray, const Kokkos::DynRankView< inArrayValueType, inArrayProperties... > inArray, const ValueType alpha) |
Multiplies array inArray by the scalar scalar (componentwise): scaledArray = scalar * inArray. | |
template<typename ValueType , typename inoutScaledArrayValueType , class ... inoutScaledArrayProperties> | |
static void | scale (Kokkos::DynRankView< inoutScaledArrayValueType, inoutScaledArrayProperties... > inoutScaledArray, const ValueType alpha) |
Multiplies, in place, array inoutScaledArray by the scalar scalar (componentwise): inoutScaledArray = scalar * inoutScaledArray. | |
template<typename dotArrayValueType , class ... dotArrayProperties, typename inVec1ValueType , class ... inVec1Properties, typename inVec2ValueType , class ... inVec2Properties> | |
static void | dot (Kokkos::DynRankView< dotArrayValueType, dotArrayProperties... > dotArray, const Kokkos::DynRankView< inVec1ValueType, inVec1Properties... > inVecs1, const Kokkos::DynRankView< inVec2ValueType, inVec2Properties... > inVecs2) |
Computes dot product of vectors stored in an array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D). | |
template<typename matVecValueType , class ... matVecProperties, typename inMatValueType , class ... inMatProperties, typename inVecValueType , class ... inVecProperties> | |
static void | matvec (Kokkos::DynRankView< matVecValueType, matVecProperties... > matVecs, const Kokkos::DynRankView< inMatValueType, inMatProperties... > inMats, const Kokkos::DynRankView< inVecValueType, inVecProperties... > inVecs) |
Matrix-vector left multiply using multidimensional arrays: matVec = inMat * inVec. | |
template<typename outMatValueType , class ... outMatProperties, typename inMatValueType , class ... inMatProperties> | |
static void | AtA (Kokkos::DynRankView< outMatValueType, outMatProperties... > outMats, const Kokkos::DynRankView< inMatValueType, inMatProperties... > inMats) |
Computes the matrix-matrix product ![]() ![]() | |
template<typename vecProdValueType , class ... vecProdProperties, typename inLeftValueType , class ... inLeftProperties, typename inRightValueType , class ... inRightProperties> | |
static void | vecprod (Kokkos::DynRankView< vecProdValueType, vecProdProperties... > vecProd, const Kokkos::DynRankView< inLeftValueType, inLeftProperties... > inLeft, const Kokkos::DynRankView< inRightValueType, inRightProperties... > inRight) |
Vector product using multidimensional arrays: vecProd = inVecLeft x inVecRight | |
Implementation of basic linear algebra functionality in Euclidean space.
Note:
Definition at line 79 of file Intrepid2_RealSpaceTools.hpp.
|
static |
Computes absolute value of an array.
outArray | [out] - output array |
inArray | [in] - input array |
Definition at line 418 of file Intrepid2_RealSpaceToolsDef.hpp.
void Intrepid2::RealSpaceTools< DeviceType >::absval | ( | Kokkos::DynRankView< inoutArrayValueType, inoutAbsArrayProperties... > | inoutAbsArray | ) |
Definition at line 455 of file Intrepid2_RealSpaceToolsDef.hpp.
|
static |
Computes, in place, absolute value of an array.
inoutArray | [in/out] - input/output array |
|
static |
Adds, in place, inArray into inoutSumArray:
inoutSumArray = inoutSumArray + inArray.
inoutSumArray | [in/out] - sum/first summand |
inArray | [in] - second summand |
Definition at line 987 of file Intrepid2_RealSpaceToolsDef.hpp.
References Intrepid2::RealSpaceTools< DeviceType >::add().
|
static |
Adds arrays inArray1 and inArray2:
sumArray = inArray1 + inArray2.
sumArray | [out] - sum |
inArray1 | [in] - first summand |
inArray2 | [in] - second summand |
Definition at line 946 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::RealSpaceTools< DeviceType >::add().
|
static |
Computes the matrix-matrix product
matVec | [out] - matrix-matrix product ![]() |
inMat | [in] - the matrix argument ![]() |
Definition at line 1470 of file Intrepid2_RealSpaceToolsDef.hpp.
|
static |
Clone input array.
output | [out] - output array |
input | [in] - input array |
Definition at line 333 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::Experimental::LagrangianInterpolation< DeviceType >::getDofCoordsAndCoeffs(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHCurlBasisCoeffs(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHCurlEvaluationPoints(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHDivBasisCoeffs(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHDivEvaluationPoints(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHGradEvaluationPoints(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHVolBasisCoeffs(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getHVolEvaluationPoints(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getL2DGBasisCoeffs(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getL2DGEvaluationPoints(), Intrepid2::Experimental::ProjectionTools< DeviceType >::getL2EvaluationPoints(), Intrepid2::FunctionSpaceTools< DeviceType >::HGRADtransformVALUE(), Intrepid2::FunctionSpaceTools< DeviceType >::mapHGradDataFromPhysSideToRefSide(), Intrepid2::FunctionSpaceTools< DeviceType >::mapHGradDataFromPhysToRef(), and Intrepid2::OrientationTools< DeviceType >::modifyBasisByOrientation().
|
static |
Computes determinants of matrices stored in an array of total rank 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D).
detArray | [out] - array of determinants indexed by (i0) or (i0, i1) |
inMats | [in] - array of matrices indexed by (i0, D, D) or (i0, i1, D, D) |
Definition at line 855 of file Intrepid2_RealSpaceToolsDef.hpp.
References Intrepid2::getFunctorRank().
Referenced by Intrepid2::CellTools< DeviceType >::setJacobianDet().
|
static |
Computes dot product of vectors stored in an array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D).
dotArray | [out] - dot product array indexed by (i0) or (i0, i1) |
inVecs1 | [in] - first array of vectors indexed by (i0, D) or (i0, i1, D) |
inVecs2 | [in] - second array of vectors indexed by (i0, D) or (i0, i1, D) |
Definition at line 1236 of file Intrepid2_RealSpaceToolsDef.hpp.
|
static |
Extract scalar type values from Sacado-based array.
output | [out] - output array |
input | [in] - input array |
Definition at line 256 of file Intrepid2_RealSpaceToolsDef.hpp.
|
static |
Computes inverses of nonsingular matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D).
inverseMats | [out] - array of inverses indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
inMats | [in] - array of matrices indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
Definition at line 749 of file Intrepid2_RealSpaceToolsDef.hpp.
References Intrepid2::getFunctorRank().
Referenced by Intrepid2::CellTools< DeviceType >::setJacobianInv().
|
static |
Matrix-vector left multiply using multidimensional arrays:
matVec = inMat * inVec.
An array (rank 1, 2 or 3) of "column" vectors, indexed by (D), (i0, D) or (i0, i1, D), is multiplied on the left by an array (rank 2, 3 or 4) of square matrices, indexed by (D, D), (i0, D, D) or (i0, i1, D, D).
matVec | [out] - matrix-vector product indexed by (D), (i0, D) or (i0, i1, D) |
inMat | [in] - the matrix argument indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
inVec | [in] - the vector argument indexed by (D), (i0, D) or (i0, i1, D) |
Definition at line 1388 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::getPhysicalEdgeTangents(), and Intrepid2::CellTools< DeviceType >::getPhysicalFaceTangents().
|
static |
Multiplies, in place, array inoutScaledArray by the scalar scalar (componentwise):
inoutScaledArray = scalar * inoutScaledArray.
inoutScaledArray | [in/out] - input/output array |
alpha | [in] - multiplier |
Definition at line 1184 of file Intrepid2_RealSpaceToolsDef.hpp.
References Intrepid2::RealSpaceTools< DeviceType >::scale().
|
static |
Multiplies array inArray by the scalar scalar (componentwise):
scaledArray = scalar * inArray.
scaledArray | [out] - scaled array |
inArray | [in] - input array |
alpha | [in] - multiplier |
Definition at line 1144 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::RealSpaceTools< DeviceType >::scale().
|
static |
Subtracts inArray2 from inArray1:
diffArray = inArray1 - inArray2.
diffArray | [out] - difference |
inArray1 | [in] - minuend |
inArray2 | [in] - subtrahend |
Definition at line 1045 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::RealSpaceTools< DeviceType >::subtract().
|
static |
Subtracts, in place, inArray from diffArray:
diffArray = diffArray - inArray.
diffArray | [in/out] - difference/minuend |
inArray | [in] - subtrahend |
Definition at line 1086 of file Intrepid2_RealSpaceToolsDef.hpp.
References Intrepid2::RealSpaceTools< DeviceType >::subtract().
|
static |
Computes transposes of square matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D).
transposeMats | [out] - array of transposes indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
inMats | [in] - array of matrices indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
Definition at line 584 of file Intrepid2_RealSpaceToolsDef.hpp.
|
static |
Vector product using multidimensional arrays:
vecProd = inVecLeft x inVecRight
Vector multiplication of two "column" vectors stored in arrays (rank 1, 2, or 3) indexed by (D), (i0, D) or (i0, i1, D).
vecProd | [in] - vector product indexed by (D), (i0, D) or (i0, i1, D) |
inLeft | [in] - left vector argument indexed by (D), (i0, D) or (i0, i1, D) |
inRight | [in] - right vector argument indexed by (D), (i0, D) or (i0, i1, D) |
Definition at line 1572 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::getPhysicalFaceNormals(), and Intrepid2::CellTools< DeviceType >::getReferenceFaceNormal().
|
static |
Computes norms (1, 2, infinity) of vectors stored in a array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D).
normArray | [out] - norm array indexed by (i0) or (i0, i1) |
inVecs | [in] - array of vectors indexed by (i0, D) or (i0, i1, D) |
normType | [in] - norm type |
Definition at line 499 of file Intrepid2_RealSpaceToolsDef.hpp.
Referenced by Intrepid2::FunctionSpaceTools< DeviceType >::computeEdgeMeasure().