Intrepid2
Static Public Member Functions | List of all members
Intrepid2::DataTools Class Reference

Static Public Member Functions

template<class Scalar , class DeviceType >
static void multiplyByCPWeights (Data< Scalar, DeviceType > &resultMatrixData, const Data< Scalar, DeviceType > &matrixDataIn, const Data< Scalar, DeviceType > &scalarDataIn)
 
template<class Scalar , class DeviceType >
static Data< Scalar, DeviceType > multiplyByCPWeights (const Data< Scalar, DeviceType > &matrixDataIn, const Data< Scalar, DeviceType > &scalarDataIn)
 
template<class Scalar , class DeviceType >
static Data< Scalar, DeviceType > transposeMatrix (const Data< Scalar, DeviceType > &matrixDataIn)
 

Detailed Description

Definition at line 22 of file Intrepid2_DataTools.hpp.

Member Function Documentation

template<class Scalar , class DeviceType >
static void Intrepid2::DataTools::multiplyByCPWeights ( Data< Scalar, DeviceType > &  resultMatrixData,
const Data< Scalar, DeviceType > &  matrixDataIn,
const Data< Scalar, DeviceType > &  scalarDataIn 
)
inlinestatic

Fills Data object of logical shape (C,P,D,D) corresponding to the pointwise product of an object of shape (C,P,D,D) with one of shape (C,P). Will also work for any "matrix" data and scalar data where the "matrix" has equal or higher rank than the scalar, but otherwise share the same shape. E.g., (C,F,P,D1,D2) matrices could be multiplied by (C,F,P) scalars, or (C,P,D) vectors by (C,P) scalars.

Parameters
resultMatrixData[out] - the resulting (C,P,D,D) container. Must be allocated appropriately to store the resulting data; see the implementation of the two-argument multiplyByCPWeights(), which performs this allocation for you.
matrixDataIn[in] - the input (C,P,D,D) container.
scalarDataIn[in] - the input (C,P) container.

Definition at line 31 of file Intrepid2_DataTools.hpp.

References Intrepid2::Data< DataScalar, DeviceType >::extent_int(), Intrepid2::Data< DataScalar, DeviceType >::getExtents(), Intrepid2::Data< DataScalar, DeviceType >::getVariationTypes(), Intrepid2::Data< DataScalar, DeviceType >::rank(), Intrepid2::Data< DataScalar, DeviceType >::shallowCopy(), and Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceProduct().

Referenced by Intrepid2::IntegrationTools< DeviceType >::integrate(), and Intrepid2::TransformedBasisValues< Scalar, DeviceType >::multiplyByPointwiseWeights().

template<class Scalar , class DeviceType >
static Data<Scalar,DeviceType> Intrepid2::DataTools::multiplyByCPWeights ( const Data< Scalar, DeviceType > &  matrixDataIn,
const Data< Scalar, DeviceType > &  scalarDataIn 
)
inlinestatic

Allocates and fills Data object of logical shape (C,P,D,D) corresponding to the pointwise product of an object of shape (C,P,D,D) with one of shape (C,P). Will also work for any "matrix" data and scalar data where the "matrix" has equal or higher rank than the scalar, but otherwise share the same shape. E.g., (C,F,P,D1,D2) matrices could be multiplied by (C,F,P) scalars, or (C,P,D) vectors by (C,P) scalars.

Parameters
matrixDataIn[in] - the (C,P,D,D) container.
scalarDataIn[in] - the (C,P) container.
Returns

Definition at line 53 of file Intrepid2_DataTools.hpp.

References Intrepid2::Data< DataScalar, DeviceType >::allocateInPlaceCombinationResult(), Intrepid2::Data< DataScalar, DeviceType >::extent_int(), Intrepid2::Data< DataScalar, DeviceType >::getExtents(), Intrepid2::Data< DataScalar, DeviceType >::getVariationTypes(), Intrepid2::Data< DataScalar, DeviceType >::rank(), and Intrepid2::Data< DataScalar, DeviceType >::shallowCopy().

template<class Scalar , class DeviceType >
static Data<Scalar,DeviceType> Intrepid2::DataTools::transposeMatrix ( const Data< Scalar, DeviceType > &  matrixDataIn)
inlinestatic

Allocates and fills Data object corresponding to the transpose of matrix data, represented by the last two dimensions of the input object.

Parameters
matrixDataIn[in] - the (…,D1,D2) container.
Returns
a (…,D2,D1) container containing the transpose of the input matrix data.

Definition at line 77 of file Intrepid2_DataTools.hpp.

References Intrepid2::Data< DataScalar, DeviceType >::allocateMatMatResult(), Intrepid2::Data< DataScalar, DeviceType >::getExtents(), Intrepid2::Data< DataScalar, DeviceType >::getVariationTypes(), and Intrepid2::Data< DataScalar, DeviceType >::rank().

Referenced by Intrepid2::IntegrationTools< DeviceType >::integrate().


The documentation for this class was generated from the following file: