Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp File Reference
#include "Teuchos_UnitTestHelpers.hpp"
#include "Stokhos_UnitTestHelpers.hpp"
#include "Stokhos_Sacado_Kokkos_UQ_PCE.hpp"
#include "KokkosSparse_CrsMatrix.hpp"
#include "KokkosSparse_spmv.hpp"
#include "Kokkos_CrsMatrix_UQ_PCE.hpp"
#include "Kokkos_CrsMatrix_UQ_PCE_Cuda.hpp"
#include "Stokhos_LegendreBasis.hpp"
#include "Stokhos_CompletePolynomialBasis.hpp"
#include "Stokhos_Sparse3Tensor.hpp"
#include "Kokkos_Core.hpp"
Include dependency graph for Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ScalarTol< Scalar >
 
struct  ScalarTol< float >
 
struct  ScalarTol< double >
 
struct  ReplaceDiagonalValuesKernel< MatrixType >
 
struct  AddDiagonalValuesKernel< MatrixType >
 
struct  AddDiagonalValuesAtomicKernel< MatrixType >
 
struct  Kokkos_MV_Multiply_Op
 
struct  Stokhos_MV_Multiply_Op< Tag >
 

Macros

#define CRSMATRIX_UQ_PCE_TESTS_MATRIXSCALAR(SCALAR)
 
#define CRSMATRIX_UQ_PCE_MEAN_MULTIPLY_TESTS(SCALAR)
 
#define CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR_OP(SCALAR, OP)
 
#define CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR(SCALAR)    CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR_OP( SCALAR, KokkosMultiply )
 
#define CRSMATRIX_UQ_PCE_TESTS_STORAGE(STORAGE)
 
#define CRSMATRIX_UQ_PCE_TESTS_ORDINAL_SCALAR_DEVICE(ORDINAL, SCALAR, DEVICE)
 
#define CRSMATRIX_UQ_PCE_TESTS_DEVICE(DEVICE)    CRSMATRIX_UQ_PCE_TESTS_ORDINAL_SCALAR_DEVICE( int, double, DEVICE )
 

Typedefs

typedef Kokkos_MV_Multiply_Op KokkosMultiply
 

Functions

template<typename IntType >
IntType map_fem_graph_coord (const IntType &N, const IntType &i, const IntType &j, const IntType &k)
 
template<typename ordinal >
ordinal generate_fem_graph (ordinal N, std::vector< std::vector< ordinal > > &graph)
 
template<typename scalar , typename ordinal >
scalar generate_matrix_coefficient (const ordinal nFEM, const ordinal nStoch, const ordinal iRowFEM, const ordinal iColFEM, const ordinal iStoch)
 
template<typename scalar , typename ordinal >
scalar generate_vector_coefficient (const ordinal nFEM, const ordinal nStoch, const ordinal iColFEM, const ordinal iStoch)
 
template<typename kokkos_cijk_type , typename ordinal_type >
kokkos_cijk_type build_cijk (ordinal_type stoch_dim, ordinal_type poly_ord)
 
template<typename array_type , typename scalar_type >
bool compare_rank_2_views (const array_type &y, const array_type &y_exp, const scalar_type rel_tol, const scalar_type abs_tol, Teuchos::FancyOStream &out)
 
template<typename vector_type , typename scalar_type >
bool compareRank1 (const vector_type &y, const vector_type &y_exp, const scalar_type rel_tol, const scalar_type abs_tol, Teuchos::FancyOStream &out)
 
template<typename vector_type , typename scalar_type >
bool compareRank2 (const vector_type &y, const vector_type &y_exp, const scalar_type rel_tol, const scalar_type abs_tol, Teuchos::FancyOStream &out)
 
template<typename MatrixType , typename CijkType >
MatrixType buildDiagonalMatrix (typename MatrixType::ordinal_type nrow, typename MatrixType::ordinal_type pce_size, const CijkType &cijk)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_PCE, ReplaceValues, MatrixScalar)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_PCE, SumIntoValues, MatrixScalar)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_PCE, SumIntoValuesAtomic, MatrixScalar)
 
template<typename PCEType , typename Multiply >
bool test_embedded_pce (const typename PCEType::ordinal_type nGrid, const typename PCEType::ordinal_type stoch_dim, const typename PCEType::ordinal_type poly_ord, KokkosSparse::DeviceConfig dev_config, Multiply multiply_op, Teuchos::FancyOStream &out)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL (Kokkos_CrsMatrix_PCE, Multiply, Scalar, MultiplyOp)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_PCE, MeanMultiplyRank1, Scalar)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL (Kokkos_CrsMatrix_PCE, MeanMultiplyRank2, Scalar)
 

Macro Definition Documentation

◆ CRSMATRIX_UQ_PCE_TESTS_MATRIXSCALAR

#define CRSMATRIX_UQ_PCE_TESTS_MATRIXSCALAR ( SCALAR)
Value:
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_PCE, ReplaceValues, SCALAR ) \
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_PCE, SumIntoValues, SCALAR ) \
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_PCE, SumIntoValuesAtomic, SCALAR )

Definition at line 1041 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ CRSMATRIX_UQ_PCE_MEAN_MULTIPLY_TESTS

#define CRSMATRIX_UQ_PCE_MEAN_MULTIPLY_TESTS ( SCALAR)
Value:
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_PCE, MeanMultiplyRank1, SCALAR ) \
TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( \
Kokkos_CrsMatrix_PCE, MeanMultiplyRank2, SCALAR )

Definition at line 1048 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR_OP

#define CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR_OP ( SCALAR,
OP )
Value:
Kokkos_CrsMatrix_PCE, Multiply, SCALAR, OP )
TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(Tpetra_CrsMatrix, MatVec, double, Node) TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(Tpetra_CrsMatrix

Definition at line 1053 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR

#define CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR ( SCALAR)     CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR_OP( SCALAR, KokkosMultiply )

Definition at line 1057 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ CRSMATRIX_UQ_PCE_TESTS_STORAGE

#define CRSMATRIX_UQ_PCE_TESTS_STORAGE ( STORAGE)
Value:
typedef Sacado::UQ::PCE<STORAGE> UQ_PCE_ ## STORAGE; \
CRSMATRIX_UQ_PCE_TESTS_MATRIXSCALAR( UQ_PCE_ ## STORAGE ) \
CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR( UQ_PCE_ ## STORAGE ) \
CRSMATRIX_UQ_PCE_MEAN_MULTIPLY_TESTS( UQ_PCE_ ## STORAGE )

Definition at line 1060 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ CRSMATRIX_UQ_PCE_TESTS_ORDINAL_SCALAR_DEVICE

#define CRSMATRIX_UQ_PCE_TESTS_ORDINAL_SCALAR_DEVICE ( ORDINAL,
SCALAR,
DEVICE )
Value:

Definition at line 1066 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ CRSMATRIX_UQ_PCE_TESTS_DEVICE

#define CRSMATRIX_UQ_PCE_TESTS_DEVICE ( DEVICE)     CRSMATRIX_UQ_PCE_TESTS_ORDINAL_SCALAR_DEVICE( int, double, DEVICE )

Definition at line 1070 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

Typedef Documentation

◆ KokkosMultiply

Definition at line 1039 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

Function Documentation

◆ map_fem_graph_coord()

template<typename IntType >
IntType map_fem_graph_coord ( const IntType & N,
const IntType & i,
const IntType & j,
const IntType & k )
inline

Definition at line 60 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ generate_fem_graph()

template<typename ordinal >
ordinal generate_fem_graph ( ordinal N,
std::vector< std::vector< ordinal > > & graph )
inline

Definition at line 70 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ generate_matrix_coefficient()

template<typename scalar , typename ordinal >
scalar generate_matrix_coefficient ( const ordinal nFEM,
const ordinal nStoch,
const ordinal iRowFEM,
const ordinal iColFEM,
const ordinal iStoch )
inline

Definition at line 104 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ generate_vector_coefficient()

template<typename scalar , typename ordinal >
scalar generate_vector_coefficient ( const ordinal nFEM,
const ordinal nStoch,
const ordinal iColFEM,
const ordinal iStoch )
inline

Definition at line 121 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ build_cijk()

template<typename kokkos_cijk_type , typename ordinal_type >
kokkos_cijk_type build_cijk ( ordinal_type stoch_dim,
ordinal_type poly_ord )

Definition at line 133 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ compare_rank_2_views()

template<typename array_type , typename scalar_type >
bool compare_rank_2_views ( const array_type & y,
const array_type & y_exp,
const scalar_type rel_tol,
const scalar_type abs_tol,
Teuchos::FancyOStream & out )

Definition at line 170 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ compareRank1()

template<typename vector_type , typename scalar_type >
bool compareRank1 ( const vector_type & y,
const vector_type & y_exp,
const scalar_type rel_tol,
const scalar_type abs_tol,
Teuchos::FancyOStream & out )

Definition at line 207 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ compareRank2()

template<typename vector_type , typename scalar_type >
bool compareRank2 ( const vector_type & y,
const vector_type & y_exp,
const scalar_type rel_tol,
const scalar_type abs_tol,
Teuchos::FancyOStream & out )

Definition at line 242 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ buildDiagonalMatrix()

template<typename MatrixType , typename CijkType >
MatrixType buildDiagonalMatrix ( typename MatrixType::ordinal_type nrow,
typename MatrixType::ordinal_type pce_size,
const CijkType & cijk )

Definition at line 286 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [1/5]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_PCE ,
ReplaceValues ,
MatrixScalar  )

Definition at line 463 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [2/5]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_PCE ,
SumIntoValues ,
MatrixScalar  )

Definition at line 489 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [3/5]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_PCE ,
SumIntoValuesAtomic ,
MatrixScalar  )

Definition at line 515 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ test_embedded_pce()

template<typename PCEType , typename Multiply >
bool test_embedded_pce ( const typename PCEType::ordinal_type nGrid,
const typename PCEType::ordinal_type stoch_dim,
const typename PCEType::ordinal_type poly_ord,
KokkosSparse::DeviceConfig dev_config,
Multiply multiply_op,
Teuchos::FancyOStream & out )

Definition at line 542 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL()

TEUCHOS_UNIT_TEST_TEMPLATE_2_DECL ( Kokkos_CrsMatrix_PCE ,
Multiply ,
Scalar ,
MultiplyOp  )

Definition at line 700 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [4/5]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_PCE ,
MeanMultiplyRank1 ,
Scalar  )

Definition at line 736 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL() [5/5]

TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL ( Kokkos_CrsMatrix_PCE ,
MeanMultiplyRank2 ,
Scalar  )

Definition at line 887 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.