Intrepid2
Intrepid2::PAMatrix< DeviceType, Scalar > Class Template Reference

Partially assembled (matrix-free) representation of element matrices for integrals of tensor-product (hypercube) bases, supporting matrix-free application by sum factorization, sum-factorized full assembly, and diagonal extraction. More...

#include <Intrepid2_PAMatrix.hpp>

Classes

struct  OpSpec
struct  PointDataSpec

Public Types

using View1D = Kokkos::View<Scalar*,DeviceType>
using BasisPtrType = BasisPtr<DeviceType,Scalar,Scalar>
using ComponentSequence = std::tuple<std::vector<OpSpec>, PointDataSpec, std::vector<OpSpec>, int, int, int, int>
 left, pointData, right, left offset, left output span, right offset, right input span

Public Member Functions

 PAMatrix (const TransformedBasisValues< Scalar, DeviceType > basisValuesLeft, const TensorData< Scalar, DeviceType > cellMeasures, const TransformedBasisValues< Scalar, DeviceType > basisValuesRight, const ScalarView< Orientation, DeviceType > orientations=ScalarView< Orientation, DeviceType >(), const BasisPtrType basisLeft=Teuchos::null, const BasisPtrType basisRight=Teuchos::null)
 Constructs a PAMatrix representing the contraction of basisValuesLeft against basisValuesRight containers on point and space dimensions, weighting each point according to cellMeasures.
 PAMatrix (const TransformedBasisValues< Scalar, DeviceType > basisValues, const TensorData< Scalar, DeviceType > cellMeasures, const ScalarView< Orientation, DeviceType > orientations, const BasisPtrType basis=Teuchos::null)
 Constructs a PAMatrix representing the contraction of basisValues against itself in point and space dimensions, weighting each point according to cellMeasures.
 PAMatrix ()=default
 Constructs an empty PAMatrix, which may be assigned to from a constructed one.
Data< Scalar, DeviceType > allocateMatrixStorage () const
 Allocates storage for a fully-assembled matrix.
Data< Scalar, DeviceType > allocateDiagonalStorage () const
 Allocates and returns a container with shape (C,F), where F=min(F1,F2).
Kokkos::View< Scalar *, DeviceType > allocateWorkspace (const ordinal_type &worksetSize) const
 Allocates and returns workspace storage suitable for providing to apply() to a vector with a workset of size worksetSize.
Kokkos::View< Scalar *, DeviceType > allocateWorkspace (const ordinal_type &worksetSize, const ordinal_type &n) const
 Allocates and returns workspace storage suitable for providing to apply() to an n-multivector with a workset of size worksetSize.
template<typename OutputViewType, typename InputViewType>
void apply (const OutputViewType &outputVector, const InputViewType &inputVector, const Kokkos::View< Scalar *, DeviceType > &workspace, const bool sumInto=false, const int worksetSizeIn=0) const
 Applies the matrix to inputVector, placing the result in outputVector, without explicit assembly and storage of the matrix itself.
void assemble (Data< Scalar, DeviceType > &integrals, const PAMatrixAssemblyOptions &options=PAMatrixAssemblyOptions::defaultsWithEnvironmentOverrides()) const
 Fully assembles the matrix, using sum factorization.
void extractDiagonal (const Data< Scalar, DeviceType > &diagonal) const
 Extracts the diagonal of the matrix, placing it in diagonal. If the matrix is not square, returns the portion of the matrix for which i==j.
const TransformedBasisValues< Scalar, DeviceType > & leftBasisValues () const
 The left basis values (with transform) from which the matrix was constructed.
const TransformedBasisValues< Scalar, DeviceType > & rightBasisValues () const
 The right basis values (with transform) from which the matrix was constructed.
const TensorData< Scalar, DeviceType > & cellMeasures () const
 The cell measures (quadrature weights times Jacobian determinants) from which the matrix was constructed.
const ScalarView< Orientation, DeviceType > & orientations () const
 The cell orientations (empty if none were provided).
const BasisPtrType & leftBasis () const
 The left basis (null if none was provided).
const BasisPtrType & rightBasis () const
 The right basis (null if none was provided).
bool hasOrdinalFilter () const
 True if the left or right basis values have an ordinal filter (e.g., for Serendipity bases).
bool hasNontrivialOrientations () const
 True if orientations were provided and at least one cell is not aligned to the reference.

Implementation details

These are not part of the supported interface. They are public only because they define KOKKOS_LAMBDAs, and CUDA does not allow extended host device lambdas in private or protected member functions.

Data< Scalar, DeviceType > _composedWeightedTransform
std::map< PointDataSpec, View1D > _pointDataCache
TensorData< Scalar, DeviceType > _cellMeasures
TransformedBasisValues< Scalar, DeviceType > _basisValuesLeft
TransformedBasisValues< Scalar, DeviceType > _basisValuesRight
ScalarView< Orientation, DeviceType > _orientations
BasisPtrType _basisLeft
BasisPtrType _basisRight
bool _hasNontrivialOrientations = false
size_t maxIntermediateSize_ = 0
std::vector< ComponentSequence > componentIntegralsToSum_
std::vector< std::pair< int, int > > componentIntegralGroups_
Kokkos::View< ordinal_type *, DeviceType > leftOrdinalFilter_
Kokkos::View< ordinal_type *, DeviceType > rightOrdinalFilter_
int numUnfilteredFieldsLeft_ = 0
int numUnfilteredFieldsRight_ = 0
void init (const TransformedBasisValues< Scalar, DeviceType > basisValuesLeft, const TensorData< Scalar, DeviceType > cellMeasures, const TransformedBasisValues< Scalar, DeviceType > basisValuesRight, const ScalarView< Orientation, DeviceType > orientations)
void assembleUnoriented (Data< Scalar, DeviceType > &integrals, const PAMatrixAssemblyOptions &options) const
 assembles the matrix for the unoriented bases
void assembleDirect (Data< Scalar, DeviceType > &integrals, const PAMatrixAssemblyOptions &options) const
 assembles by direct sum factorization (requires supportsDirectAssembly())
void assembleUnitColumns (Data< Scalar, DeviceType > &integrals, const PAMatrixAssemblyOptions &options) const
 assembles by contraction of unit columns (requires supportsDirectAssembly())
void assembleByApply (Data< Scalar, DeviceType > &integrals, const PAMatrixAssemblyOptions &options) const
 assembles by apply() to blocked unit columns
void orientAssembledMatrix (Data< Scalar, DeviceType > &integrals) const
 applies orientations in place to an assembled (C,F1,F2) matrix
size_t applyWorkspacePerCell () const
 the workspace size, in entries per cell and vector, required by apply()
template<typename OutputViewType, typename InputViewType>
void applyUnorientedWorkset (const OutputViewType &output, const ordinal_type outputCellOffset, const InputViewType &input, const ordinal_type inputCellOffset, const ordinal_type startCell, const ordinal_type Cw, const ordinal_type N, Scalar *workspace1, Scalar *workspace2) const
 Applies the unoriented matrix to cells [startCell, startCell+Cw), accumulating into output. Cell c of the workset is cell c+inputCellOffset of input (shape (.,F2[,N])) and cell c+outputCellOffset of output (shape (.,F1[,N])). workspace1 and workspace2 must each hold maxIntermediateSize_ * Cw * N entries.

GEMM statistics (opt-in)

PAMatrix can record an estimated floating-point operation count and the time spent in the GEMM calls it issues, for performance studies. Recording is off by default; enable it with setGEMMStatisticsEnabled(true).

Limitations:

  • The statistics are process-wide and cumulative: they are shared by all PAMatrix instances, and are never reset. To measure an interval, record gemmFlopCount() and gemmTimeSeconds() at its start and pass them to gemmThroughputGFlops().
  • Recording is not thread-safe; do not issue PAMatrix operations from multiple host threads while it is enabled.
  • Only the GEMMs PAMatrix itself issues are counted. Other work (e.g., point-data multiplication and the sum-factorized assembly kernels) is neither counted nor timed.
  • Flop counts are estimates (2K-1 operations per entry of an MxK by KxN product).
  • Times come from a Teuchos::TimeMonitor named "Intrepid2::PAMatrix gemm"; each recorded GEMM is followed by a fence of its execution space, so that the times include the GEMM's execution.
bool supportsDirectAssembly () const
 True if assemble() can use direct sum factorization (or contraction of unit columns) for this matrix's structure: scalar point weights, one-dimensional tensor components, and equal left and right tensor component counts. Otherwise, assemble() applies the matrix to blocked unit columns.
static void setGEMMStatisticsEnabled (const bool enabled)
 Enables or disables recording of GEMM statistics (off by default).
static bool gemmStatisticsEnabled ()
 Returns true if GEMM statistics are being recorded.
static double gemmFlopCount ()
 Returns the cumulative estimated floating-point operation count for recorded GEMM calls.
static double gemmTimeSeconds ()
 Returns the cumulative time spent in recorded GEMM calls.
static double gemmThroughputGFlops (const double baseFlopCount=0, const double baseTimeSeconds=0)
 Returns the GEMM throughput in GFlop/s; baseFlopCount and baseTimeSeconds, if provided, are subtracted from the cumulative counts, to give the throughput since a previous measurement.

Detailed Description

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
class Intrepid2::PAMatrix< DeviceType, Scalar >

Partially assembled (matrix-free) representation of element matrices for integrals of tensor-product (hypercube) bases, supporting matrix-free application by sum factorization, sum-factorized full assembly, and diagonal extraction.

The matrix is represented by the 1D basis operators (values or derivatives at quadrature points) of each tensor component, together with the pointwise data (transforms composed with cell measures) at quadrature points.

Definition at line 82 of file Intrepid2_PAMatrix.hpp.

Member Typedef Documentation

◆ BasisPtrType

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
using Intrepid2::PAMatrix< DeviceType, Scalar >::BasisPtrType = BasisPtr<DeviceType,Scalar,Scalar>

Definition at line 85 of file Intrepid2_PAMatrix.hpp.

◆ ComponentSequence

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
using Intrepid2::PAMatrix< DeviceType, Scalar >::ComponentSequence = std::tuple<std::vector<OpSpec>, PointDataSpec, std::vector<OpSpec>, int, int, int, int>

left, pointData, right, left offset, left output span, right offset, right input span

Definition at line 109 of file Intrepid2_PAMatrix.hpp.

◆ View1D

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
using Intrepid2::PAMatrix< DeviceType, Scalar >::View1D = Kokkos::View<Scalar*,DeviceType>

Definition at line 84 of file Intrepid2_PAMatrix.hpp.

Constructor & Destructor Documentation

◆ PAMatrix() [1/2]

template<typename DeviceType, class Scalar>
Intrepid2::PAMatrix< DeviceType, Scalar >::PAMatrix ( const TransformedBasisValues< Scalar, DeviceType > basisValuesLeft,
const TensorData< Scalar, DeviceType > cellMeasures,
const TransformedBasisValues< Scalar, DeviceType > basisValuesRight,
const ScalarView< Orientation, DeviceType > orientations = ScalarView<Orientation,DeviceType>(),
const BasisPtrType basisLeft = Teuchos::null,
const BasisPtrType basisRight = Teuchos::null )

Constructs a PAMatrix representing the contraction of basisValuesLeft against basisValuesRight containers on point and space dimensions, weighting each point according to cellMeasures.

Parameters
basisValuesLeft[in] - Left input container, with logical shape (C,F1,P,D)
cellMeasures[in] - Point weight container, with logical shape (C,P)
basisValuesRight[in] - Right input container with logical shape (C,F2,P,D)
orientations[in] - orientations container, with shape (C) (optional)
basisLeft[in] - the basis for the left values; required if any orientation is not aligned to the reference
basisRight[in] - the basis for the right values; required if any orientation is not aligned to the reference

With orientations, the matrix represented is the one for the oriented bases, O_L phi and O_R psi, where O_L and O_R are the operators applied by OrientationTools::modifyBasisByOrientation(); i.e., O_L M O_R^T, where M is the matrix for the unoriented bases.

On construction, computes (if it will be needed) a composedTransform object with logical shape (C,P), (C,P,D), or (C,P,D,D) that stores (det J) M^T_L M_R, where det J represents cellMeasures and M_L and M_R represent the basis transformations for the left and right basis, respectively.

Definition at line 338 of file Intrepid2_PAMatrixDef.hpp.

References cellMeasures(), and orientations().

Referenced by PAMatrix().

◆ PAMatrix() [2/2]

template<typename DeviceType, class Scalar>
Intrepid2::PAMatrix< DeviceType, Scalar >::PAMatrix ( const TransformedBasisValues< Scalar, DeviceType > basisValues,
const TensorData< Scalar, DeviceType > cellMeasures,
const ScalarView< Orientation, DeviceType > orientations,
const BasisPtrType basis = Teuchos::null )

Constructs a PAMatrix representing the contraction of basisValues against itself in point and space dimensions, weighting each point according to cellMeasures.

Parameters
basisValues[in] - Transformed basis values input container, with logical shape (C,F,P,D)
cellMeasures[in] - Point weight container, with logical shape (C,P)
orientations[in] - orientations container, with shape (C)
basis[in] - the basis; required if any orientation is not aligned to the reference

On construction, computes (if it will be needed) a composedTransform object with logical shape (C,P), (C,P,D), or (C,P,D,D) that stores (det J) M^T M, where det J represents cellMeasures and M represents the basis transformations for the reference-space basis.

Definition at line 356 of file Intrepid2_PAMatrixDef.hpp.

References cellMeasures(), orientations(), and PAMatrix().

Member Function Documentation

◆ allocateDiagonalStorage()

template<typename DeviceType, class Scalar>
Data< Scalar, DeviceType > Intrepid2::PAMatrix< DeviceType, Scalar >::allocateDiagonalStorage ( ) const

Allocates and returns a container with shape (C,F), where F=min(F1,F2).

Returns
a container with logical shape (C,F), suitable for passing to extractDiagonal().

Definition at line 932 of file Intrepid2_PAMatrixDef.hpp.

◆ allocateMatrixStorage()

template<typename DeviceType, class Scalar>
Data< Scalar, DeviceType > Intrepid2::PAMatrix< DeviceType, Scalar >::allocateMatrixStorage ( ) const

Allocates storage for a fully-assembled matrix.

Returns
integrals, a container with logical shape (C,F1,F2), suitable for passing to assemble().

Definition at line 877 of file Intrepid2_PAMatrixDef.hpp.

◆ allocateWorkspace() [1/2]

template<typename DeviceType, class Scalar>
Kokkos::View< Scalar *, DeviceType > Intrepid2::PAMatrix< DeviceType, Scalar >::allocateWorkspace ( const ordinal_type & worksetSize) const

Allocates and returns workspace storage suitable for providing to apply() to a vector with a workset of size worksetSize.

Definition at line 2068 of file Intrepid2_PAMatrixDef.hpp.

References allocateWorkspace().

Referenced by allocateWorkspace().

◆ allocateWorkspace() [2/2]

template<typename DeviceType, class Scalar>
Kokkos::View< Scalar *, DeviceType > Intrepid2::PAMatrix< DeviceType, Scalar >::allocateWorkspace ( const ordinal_type & worksetSize,
const ordinal_type & n ) const

Allocates and returns workspace storage suitable for providing to apply() to an n-multivector with a workset of size worksetSize.

Definition at line 2074 of file Intrepid2_PAMatrixDef.hpp.

References applyWorkspacePerCell().

◆ apply()

template<typename DeviceType, class Scalar>
template<typename OutputViewType, typename InputViewType>
void Intrepid2::PAMatrix< DeviceType, Scalar >::apply ( const OutputViewType & outputVector,
const InputViewType & inputVector,
const Kokkos::View< Scalar *, DeviceType > & workspace,
const bool sumInto = false,
const int worksetSizeIn = 0 ) const

Applies the matrix to inputVector, placing the result in outputVector, without explicit assembly and storage of the matrix itself.

Parameters
outputVector[out] - the result of applying the matrix to the input vector
inputVector[in] - the vector to which the matrix will applied
workspace[in] - memory allocated by allocateWorkspace(), called with arguments (C,N) or, if worksetSize is nonzero, (worksetSize,N).
sumInto[in] - if true, the result is added to outputVector.
worksetSize[in] - the number of cells to apply to at a time. If unspecified, applies to all cells.

outputVector and inputVector may have shapes (C,F1) and (C,F2), representing single vectors, or shapes (C,F1,N) and (C,F2,N), representing multi-vectors.

Definition at line 2202 of file Intrepid2_PAMatrixDef.hpp.

References applyUnorientedWorkset(), applyWorkspacePerCell(), hasOrdinalFilter(), Intrepid2::OrientationTools< DeviceType >::modifyBasisByOrientation(), and Intrepid2::OrientationTools< DeviceType >::modifyBasisByOrientationTranspose().

◆ applyUnorientedWorkset()

template<typename DeviceType, class Scalar>
template<typename OutputViewType, typename InputViewType>
void Intrepid2::PAMatrix< DeviceType, Scalar >::applyUnorientedWorkset ( const OutputViewType & output,
const ordinal_type outputCellOffset,
const InputViewType & input,
const ordinal_type inputCellOffset,
const ordinal_type startCell,
const ordinal_type Cw,
const ordinal_type N,
Scalar * workspace1,
Scalar * workspace2 ) const

Applies the unoriented matrix to cells [startCell, startCell+Cw), accumulating into output. Cell c of the workset is cell c+inputCellOffset of input (shape (.,F2[,N])) and cell c+outputCellOffset of output (shape (.,F1[,N])). workspace1 and workspace2 must each hold maxIntermediateSize_ * Cw * N entries.

Definition at line 2082 of file Intrepid2_PAMatrixDef.hpp.

Referenced by apply(), and assembleByApply().

◆ applyWorkspacePerCell()

template<typename DeviceType, class Scalar>
size_t Intrepid2::PAMatrix< DeviceType, Scalar >::applyWorkspacePerCell ( ) const

the workspace size, in entries per cell and vector, required by apply()

Definition at line 2056 of file Intrepid2_PAMatrixDef.hpp.

Referenced by allocateWorkspace(), and apply().

◆ assemble()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::assemble ( Data< Scalar, DeviceType > & integrals,
const PAMatrixAssemblyOptions & options = PAMatrixAssemblyOptions::defaultsWithEnvironmentOverrides() ) const

Fully assembles the matrix, using sum factorization.

Parameters
integrals[out] - Output matrix, with logical shape (C,F1,F2). See allocateMatrixStorage().
options[in] - assembly options; see PAMatrixAssemblyOptions.

For supported structures (scalar point weights and one-dimensional tensor components), the matrix is assembled by direct sum factorization: the point weights are contracted against the per-component products of left and right 1D operators, one component at a time, by GEMMs over all cells of a workset. Passes that share their last-component operators share the last contraction, and the output is written once. With sparse ordinal filters (e.g., Serendipity bases), the last contraction computes only the kept entries. Other structures are assembled by contraction of blocked unit columns, or by apply() to them. Workset sizes are chosen from the workspace budget in the options. Orientations, if any, are applied to the assembled matrix (as by OrientationTools::modifyMatrixByOrientation()).

Definition at line 1760 of file Intrepid2_PAMatrixDef.hpp.

References assembleUnoriented(), Intrepid2::Data< DataScalar, DeviceType >::extent_int(), Intrepid2::Data< DataScalar, DeviceType >::getDataExtent(), Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewRank(), orientAssembledMatrix(), and Intrepid2::Data< DataScalar, DeviceType >::rank().

Referenced by extractDiagonal().

◆ assembleByApply()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::assembleByApply ( Data< Scalar, DeviceType > & integrals,
const PAMatrixAssemblyOptions & options ) const

◆ assembleDirect()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::assembleDirect ( Data< Scalar, DeviceType > & integrals,
const PAMatrixAssemblyOptions & options ) const

assembles by direct sum factorization (requires supportsDirectAssembly())

Direct sum-factorized assembly (of the unoriented matrix).

For one integration pass (scalar point weights W, left operators L_r of size F_r x Q_r, right operators R_r of size Q_r x G_r, r = 0..R-1, component 0 fastest in both field and point ordinals), M(c, I, J) = sum_p W(c,p) prod_r L_r(i_r, p_r) R_r(p_r, j_r). With the pair operators P_r(q, (i,j)) = L_r(i,q) R_r(q,j), stage r maps a tensor stored as (p_r, X) to (X, (i_r j_r)) by the GEMM T' = T^T P_r. Starting from W stored as (p_0, ..., p_{R-1}, c), after R-1 stages the tensor is (p_{R-1}, c, (i_0 j_0), ..., (i_{R-2} j_{R-2})).

Passes are grouped by their last-component operator pair (L_{R-1}, R_{R-1}); within a group, the stage-(R-1) inputs are summed, so that each group needs one last-stage contraction. The last stage either

  • (unfiltered, or dense filters) accumulates all groups' (c, ..., (i_{R-1} j_{R-1})) results by GEMM into one buffer, which a single permutation writes to the output; or
  • (sparse ordinal filters, e.g. Serendipity) computes each kept output entry directly as a length-Q_{R-1} dot product against the group's pair operator, skipping the full tensor-product intermediate. Cells are processed in worksets sized to the memory budget in the options.

Definition at line 1043 of file Intrepid2_PAMatrixDef.hpp.

References Intrepid2::PAMatrixAssemblyOptions::Always, Intrepid2::PAMatrixAssemblyOptions::Automatic, Intrepid2::Data< DataScalar, DeviceType >::getDataExtent(), Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewRank(), and Intrepid2::PAMatrixAssemblyOptions::workspaceMB.

Referenced by assembleUnoriented().

◆ assembleUnitColumns()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::assembleUnitColumns ( Data< Scalar, DeviceType > & integrals,
const PAMatrixAssemblyOptions & options ) const

◆ assembleUnoriented()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::assembleUnoriented ( Data< Scalar, DeviceType > & integrals,
const PAMatrixAssemblyOptions & options ) const

◆ cellMeasures()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
const TensorData< Scalar, DeviceType > & Intrepid2::PAMatrix< DeviceType, Scalar >::cellMeasures ( ) const
inline

The cell measures (quadrature weights times Jacobian determinants) from which the matrix was constructed.

Definition at line 214 of file Intrepid2_PAMatrix.hpp.

Referenced by PAMatrix(), and PAMatrix().

◆ extractDiagonal()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::extractDiagonal ( const Data< Scalar, DeviceType > & diagonal) const

Extracts the diagonal of the matrix, placing it in diagonal. If the matrix is not square, returns the portion of the matrix for which i==j.

Parameters
diagonal[out] - Output container with logical shape (C,F), F=min(F1,F2). See allocateDiagonalStorage().

Definition at line 1782 of file Intrepid2_PAMatrixDef.hpp.

References assemble(), Intrepid2::Data< DataScalar, DeviceType >::clear(), Intrepid2::Data< DataScalar, DeviceType >::extent_int(), Intrepid2::Data< DataScalar, DeviceType >::getDataExtent(), Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewRank(), Intrepid2::Data< DataScalar, DeviceType >::getWritableEntry(), hasOrdinalFilter(), and Intrepid2::Data< DataScalar, DeviceType >::rank().

◆ gemmFlopCount()

template<typename DeviceType, class Scalar>
double Intrepid2::PAMatrix< DeviceType, Scalar >::gemmFlopCount ( )
static

Returns the cumulative estimated floating-point operation count for recorded GEMM calls.

Definition at line 2300 of file Intrepid2_PAMatrixDef.hpp.

Referenced by gemmThroughputGFlops().

◆ gemmStatisticsEnabled()

template<typename DeviceType, class Scalar>
bool Intrepid2::PAMatrix< DeviceType, Scalar >::gemmStatisticsEnabled ( )
static

Returns true if GEMM statistics are being recorded.

Definition at line 2294 of file Intrepid2_PAMatrixDef.hpp.

◆ gemmThroughputGFlops()

template<typename DeviceType, class Scalar>
double Intrepid2::PAMatrix< DeviceType, Scalar >::gemmThroughputGFlops ( const double baseFlopCount = 0,
const double baseTimeSeconds = 0 )
static

Returns the GEMM throughput in GFlop/s; baseFlopCount and baseTimeSeconds, if provided, are subtracted from the cumulative counts, to give the throughput since a previous measurement.

Definition at line 2313 of file Intrepid2_PAMatrixDef.hpp.

References gemmFlopCount(), and gemmTimeSeconds().

◆ gemmTimeSeconds()

template<typename DeviceType, class Scalar>
double Intrepid2::PAMatrix< DeviceType, Scalar >::gemmTimeSeconds ( )
static

Returns the cumulative time spent in recorded GEMM calls.

Definition at line 2306 of file Intrepid2_PAMatrixDef.hpp.

Referenced by gemmThroughputGFlops().

◆ hasNontrivialOrientations()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
bool Intrepid2::PAMatrix< DeviceType, Scalar >::hasNontrivialOrientations ( ) const
inline

True if orientations were provided and at least one cell is not aligned to the reference.

Definition at line 229 of file Intrepid2_PAMatrix.hpp.

◆ hasOrdinalFilter()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
bool Intrepid2::PAMatrix< DeviceType, Scalar >::hasOrdinalFilter ( ) const
inline

True if the left or right basis values have an ordinal filter (e.g., for Serendipity bases).

Definition at line 226 of file Intrepid2_PAMatrix.hpp.

Referenced by apply(), assembleByApply(), assembleUnoriented(), and extractDiagonal().

◆ init()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::init ( const TransformedBasisValues< Scalar, DeviceType > basisValuesLeft,
const TensorData< Scalar, DeviceType > cellMeasures,
const TransformedBasisValues< Scalar, DeviceType > basisValuesRight,
const ScalarView< Orientation, DeviceType > orientations )

Definition at line 365 of file Intrepid2_PAMatrixDef.hpp.

◆ leftBasis()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
const BasisPtrType & Intrepid2::PAMatrix< DeviceType, Scalar >::leftBasis ( ) const
inline

The left basis (null if none was provided).

Definition at line 220 of file Intrepid2_PAMatrix.hpp.

◆ leftBasisValues()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
const TransformedBasisValues< Scalar, DeviceType > & Intrepid2::PAMatrix< DeviceType, Scalar >::leftBasisValues ( ) const
inline

The left basis values (with transform) from which the matrix was constructed.

Definition at line 208 of file Intrepid2_PAMatrix.hpp.

◆ orientAssembledMatrix()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::orientAssembledMatrix ( Data< Scalar, DeviceType > & integrals) const

applies orientations in place to an assembled (C,F1,F2) matrix

Definition at line 1748 of file Intrepid2_PAMatrixDef.hpp.

References Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingView(), and Intrepid2::OrientationTools< DeviceType >::modifyMatrixByOrientation().

Referenced by assemble().

◆ orientations()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
const ScalarView< Orientation, DeviceType > & Intrepid2::PAMatrix< DeviceType, Scalar >::orientations ( ) const
inline

The cell orientations (empty if none were provided).

Definition at line 217 of file Intrepid2_PAMatrix.hpp.

Referenced by PAMatrix(), and PAMatrix().

◆ rightBasis()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
const BasisPtrType & Intrepid2::PAMatrix< DeviceType, Scalar >::rightBasis ( ) const
inline

The right basis (null if none was provided).

Definition at line 223 of file Intrepid2_PAMatrix.hpp.

◆ rightBasisValues()

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
const TransformedBasisValues< Scalar, DeviceType > & Intrepid2::PAMatrix< DeviceType, Scalar >::rightBasisValues ( ) const
inline

The right basis values (with transform) from which the matrix was constructed.

Definition at line 211 of file Intrepid2_PAMatrix.hpp.

◆ setGEMMStatisticsEnabled()

template<typename DeviceType, class Scalar>
void Intrepid2::PAMatrix< DeviceType, Scalar >::setGEMMStatisticsEnabled ( const bool enabled)
static

Enables or disables recording of GEMM statistics (off by default).

Definition at line 2288 of file Intrepid2_PAMatrixDef.hpp.

◆ supportsDirectAssembly()

template<typename DeviceType, class Scalar>
bool Intrepid2::PAMatrix< DeviceType, Scalar >::supportsDirectAssembly ( ) const

True if assemble() can use direct sum factorization (or contraction of unit columns) for this matrix's structure: scalar point weights, one-dimensional tensor components, and equal left and right tensor component counts. Otherwise, assemble() applies the matrix to blocked unit columns.

Definition at line 979 of file Intrepid2_PAMatrixDef.hpp.

Referenced by assembleUnoriented(), and Intrepid2::pamatrixAssembleUsesUnitColumnPath().

Member Data Documentation

◆ _basisLeft

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
BasisPtrType Intrepid2::PAMatrix< DeviceType, Scalar >::_basisLeft
private

Definition at line 314 of file Intrepid2_PAMatrix.hpp.

◆ _basisRight

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
BasisPtrType Intrepid2::PAMatrix< DeviceType, Scalar >::_basisRight
private

Definition at line 314 of file Intrepid2_PAMatrix.hpp.

◆ _basisValuesLeft

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
TransformedBasisValues<Scalar,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::_basisValuesLeft
private

Definition at line 312 of file Intrepid2_PAMatrix.hpp.

◆ _basisValuesRight

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
TransformedBasisValues<Scalar,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::_basisValuesRight
private

Definition at line 312 of file Intrepid2_PAMatrix.hpp.

◆ _cellMeasures

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
TensorData<Scalar,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::_cellMeasures
private

Definition at line 311 of file Intrepid2_PAMatrix.hpp.

◆ _composedWeightedTransform

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
Data<Scalar,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::_composedWeightedTransform
private

Definition at line 309 of file Intrepid2_PAMatrix.hpp.

◆ _hasNontrivialOrientations

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
bool Intrepid2::PAMatrix< DeviceType, Scalar >::_hasNontrivialOrientations = false
private

Definition at line 315 of file Intrepid2_PAMatrix.hpp.

◆ _orientations

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
ScalarView<Orientation,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::_orientations
private

Definition at line 313 of file Intrepid2_PAMatrix.hpp.

◆ _pointDataCache

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
std::map<PointDataSpec,View1D> Intrepid2::PAMatrix< DeviceType, Scalar >::_pointDataCache
private

Definition at line 310 of file Intrepid2_PAMatrix.hpp.

◆ componentIntegralGroups_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
std::vector<std::pair<int,int> > Intrepid2::PAMatrix< DeviceType, Scalar >::componentIntegralGroups_
private

Definition at line 319 of file Intrepid2_PAMatrix.hpp.

◆ componentIntegralsToSum_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
std::vector<ComponentSequence> Intrepid2::PAMatrix< DeviceType, Scalar >::componentIntegralsToSum_
private

Definition at line 318 of file Intrepid2_PAMatrix.hpp.

◆ leftOrdinalFilter_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
Kokkos::View<ordinal_type*,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::leftOrdinalFilter_
private

Definition at line 323 of file Intrepid2_PAMatrix.hpp.

◆ maxIntermediateSize_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
size_t Intrepid2::PAMatrix< DeviceType, Scalar >::maxIntermediateSize_ = 0
private

Definition at line 316 of file Intrepid2_PAMatrix.hpp.

◆ numUnfilteredFieldsLeft_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
int Intrepid2::PAMatrix< DeviceType, Scalar >::numUnfilteredFieldsLeft_ = 0
private

Definition at line 324 of file Intrepid2_PAMatrix.hpp.

◆ numUnfilteredFieldsRight_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
int Intrepid2::PAMatrix< DeviceType, Scalar >::numUnfilteredFieldsRight_ = 0
private

Definition at line 324 of file Intrepid2_PAMatrix.hpp.

◆ rightOrdinalFilter_

template<typename DeviceType = Kokkos::DefaultExecutionSpace::device_type, typename Scalar = double>
Kokkos::View<ordinal_type*,DeviceType> Intrepid2::PAMatrix< DeviceType, Scalar >::rightOrdinalFilter_
private

Definition at line 323 of file Intrepid2_PAMatrix.hpp.


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