Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

#define CRSMATRIX_UQ_PCE_TESTS_MATRIXSCALAR (   SCALAR)
Value:
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 )
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(TEST_GROUP, TEST_NAME, TYPE)

Definition at line 1041 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

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

Definition at line 1048 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

#define CRS_MATRIX_UQ_PCE_MULTIPLY_TESTS_SCALAR_OP (   SCALAR,
  OP 
)
Value:
Kokkos_CrsMatrix_PCE, Multiply, SCALAR, OP )
#define TEUCHOS_UNIT_TEST_TEMPLATE_2_INSTANT(TEST_GROUP, TEST_NAME, TYPE1, TYPE2)

Definition at line 1053 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

#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.

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

Definition at line 1060 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

#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 )

Definition at line 1070 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

Typedef Documentation

Definition at line 1039 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

Function Documentation

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.

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.

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.

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.

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.

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.

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.

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.

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 ( Kokkos_CrsMatrix_PCE  ,
ReplaceValues  ,
MatrixScalar   
)

Definition at line 463 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

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 ( Kokkos_CrsMatrix_PCE  ,
SumIntoValuesAtomic  ,
MatrixScalar   
)

Definition at line 515 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

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 ( Kokkos_CrsMatrix_PCE  ,
Multiply  ,
Scalar  ,
MultiplyOp   
)

Definition at line 700 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.

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 ( Kokkos_CrsMatrix_PCE  ,
MeanMultiplyRank2  ,
Scalar   
)

Definition at line 887 of file Stokhos_KokkosCrsMatrixUQPCEUnitTest.hpp.