56#ifndef __INTREPID2_ORIENTATIONTOOLS_DEF_COEFF_MATRIX_HVOL_HPP__
57#define __INTREPID2_ORIENTATIONTOOLS_DEF_COEFF_MATRIX_HVOL_HPP__
60#if defined (__clang__) && !defined (__INTEL_COMPILER)
61#pragma clang system_header
69#ifdef HAVE_INTREPID2_DEBUG
70template<
typename cellBasisType>
73check_getCoeffMatrix_HVOL(
const cellBasisType& cellBasis,
74 const ordinal_type cellOrt) {
77 const shards::CellTopology cellTopo = cellBasis.getBaseCellTopology();
78 const ordinal_type cellDim = cellTopo.getDimension();
80 INTREPID2_TEST_FOR_EXCEPTION( cellDim > 2,
82 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HVOL): " \
83 "HVOL orientation supported only for (side) cells with dimension less than 3.");
85 const auto cellBaseKey = cellTopo.getBaseKey();
87 INTREPID2_TEST_FOR_EXCEPTION( cellBaseKey != shards::Line<>::key &&
88 cellBaseKey != shards::Quadrilateral<>::key &&
89 cellBaseKey != shards::Triangle<>::key,
91 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HVOL): " \
92 "cellBasis must have line, quad, or triangle topology.");
100 INTREPID2_TEST_FOR_EXCEPTION( cellBasis.getFunctionSpace() != FUNCTION_SPACE_HVOL,
102 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HVOL): " \
103 "cellBasis function space is not HVOL.");
109template<
typename OutputViewType,
110typename cellBasisHostType>
118#ifdef HAVE_INTREPID2_DEBUG
123 using value_type =
typename OutputViewType::non_const_value_type;
130 const ordinal_type cellDim =
cellTopo.getDimension();
173 Kokkos::DynRankView<value_type,Kokkos::LayoutLeft,host_device_type>
179 Kokkos::DynRankView<value_type,host_device_type>
jac(
"jacobian",cellDim,cellDim);
198 Teuchos::LAPACK<ordinal_type,value_type>
lapack;
199 ordinal_type
info = 0;
201 Kokkos::DynRankView<ordinal_type,Kokkos::LayoutLeft,host_device_type>
pivVec(
"pivVec",
cardinality);
211 std::stringstream
ss;
212 ss <<
">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HVOL): "
213 <<
"LAPACK return with error code: "
215 INTREPID2_TEST_FOR_EXCEPTION(
true, std::runtime_error,
ss.str().c_str() );
221 const double eps = tolerence();
256 auto tmp = Kokkos::create_mirror_view_and_copy(
typename OutputViewType::device_type::memory_space(),
PhiMat);