Intrepid2
Enumerations | Functions
Intrepid2_Utils_ExtData.hpp File Reference

Header file for external data utility functions. More...

#include "Intrepid2_ConfigDefs.hpp"
#include "Intrepid2_Types.hpp"
#include "Teuchos_oblackholestream.hpp"
#include "Teuchos_RCP.hpp"
#include "Intrepid2_Utils_ExtDataDef.hpp"

Go to the source code of this file.

Enumerations

enum  Intrepid2::TypeOfExactData { INTREPID2_UTILS_FRACTION = 0 , INTREPID2_UTILS_SCALAR }
 Declarations of templated utility functions. More...
 

Functions

template<typename ValueType , class ... testMatProperties>
ordinal_type Intrepid2::compareToAnalytic (std::ifstream &inputFile, const Kokkos::DynRankView< ValueType, testMatProperties... > testMat, const ValueType reltol, const ordinal_type iprint, const TypeOfExactData analyticDataType=INTREPID2_UTILS_FRACTION)
 Compares the values in the test matrix testMat to precomputed analytic values stored in a file, where the input matrix is an array of arrays.
 
template<typename ValueType , class ... testMatProperties>
void Intrepid2::getAnalytic (Kokkos::DynRankView< ValueType, testMatProperties... > testMat, std::ifstream &inputFile, const TypeOfExactData analyticDataType=INTREPID2_UTILS_FRACTION)
 Loads analytic values stored in a file into the matrix testMat, where the output matrix is an array of arrays.
 

Detailed Description

Header file for external data utility functions.

Author
Created by P. Bochev and D. Ridzal and Kyungjoo Kim.

Definition in file Intrepid2_Utils_ExtData.hpp.

Enumeration Type Documentation

◆ TypeOfExactData

Declarations of templated utility functions.

Note:

  • NOT compiled on device (host only)

Definition at line 65 of file Intrepid2_Utils_ExtData.hpp.

Function Documentation

◆ compareToAnalytic()

template<typename ValueType , class ... testMatProperties>
ordinal_type Intrepid2::compareToAnalytic ( std::ifstream & inputFile,
const Kokkos::DynRankView< ValueType, testMatProperties... > testMat,
const ValueType reltol,
const ordinal_type iprint,
const TypeOfExactData analyticDataType = INTREPID2_UTILS_FRACTION )

Compares the values in the test matrix testMat to precomputed analytic values stored in a file, where the input matrix is an array of arrays.

Parameters
inputFile[in] - input file
testMat[in] - test matrix
reltol[in] - relative tolerance for equality comparisons
iprint[in] - if 0, no output; if 1, details are printed
analyticDataType[in] - type of analytic data for comparison:
  • if INTREPID2_UTILS_FRACTION, analytic fractions are parsed and computed
  • if INTREPID2_UTILS_SCALAR, high-precision scalar data is read
Returns
0 if pass; error code otherwise

Definition at line 61 of file Intrepid2_Utils_ExtDataDef.hpp.

References Intrepid2::compareToAnalytic().

Referenced by Intrepid2::compareToAnalytic().

◆ getAnalytic()

template<typename ValueType , class ... testMatProperties>
void Intrepid2::getAnalytic ( Kokkos::DynRankView< ValueType, testMatProperties... > testMat,
std::ifstream & inputFile,
const TypeOfExactData analyticDataType = INTREPID2_UTILS_FRACTION )

Loads analytic values stored in a file into the matrix testMat, where the output matrix is an array of arrays.

Parameters
testMat[in] - test matrix
inputFile[in] - input file
analyticDataType[in] - type of analytic data for comparison:
  • if INTREPID2_UTILS_FRACTION, analytic fractions are parsed and computed
  • if INTREPID2_UTILS_SCALAR, high-precision scalar data is read

Definition at line 143 of file Intrepid2_Utils_ExtDataDef.hpp.

References Intrepid2::getAnalytic().

Referenced by Intrepid2::getAnalytic().