56#ifndef __INTREPID2_ORIENTATIONTOOLS_DEF_COEFF_MATRIX_HGRAD_HPP__
57#define __INTREPID2_ORIENTATIONTOOLS_DEF_COEFF_MATRIX_HGRAD_HPP__
60#if defined (__clang__) && !defined (__INTEL_COMPILER)
61#pragma clang system_header
69#ifdef HAVE_INTREPID2_DEBUG
70template<
typename subcellBasisType,
71typename cellBasisType>
74check_getCoeffMatrix_HGRAD(
const subcellBasisType& subcellBasis,
75 const cellBasisType& cellBasis,
76 const ordinal_type subcellId,
77 const ordinal_type subcellOrt) {
80 const shards::CellTopology cellTopo = cellBasis.getBaseCellTopology();
81 const shards::CellTopology subcellTopo = subcellBasis.getBaseCellTopology();
83 const ordinal_type cellDim = cellTopo.getDimension();
84 const ordinal_type subcellDim = subcellTopo.getDimension();
86 INTREPID2_TEST_FOR_EXCEPTION( subcellDim >= cellDim,
88 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HGRAD): " \
89 "cellDim must be greater than subcellDim.");
91 const auto subcellBaseKey = subcellTopo.getBaseKey();
93 INTREPID2_TEST_FOR_EXCEPTION( subcellBaseKey != shards::Line<>::key &&
94 subcellBaseKey != shards::Quadrilateral<>::key &&
95 subcellBaseKey != shards::Triangle<>::key,
97 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HGRAD): " \
98 "subcellBasis must have line, quad, or triangle topology.");
106 const bool cellBasisIsHGRAD = cellBasis.getFunctionSpace() == FUNCTION_SPACE_HGRAD;
107 const bool subcellBasisIsHGRAD = subcellBasis.getFunctionSpace() == FUNCTION_SPACE_HGRAD;
108 if (cellBasisIsHGRAD) {
109 INTREPID2_TEST_FOR_EXCEPTION( !subcellBasisIsHGRAD,
111 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HGRAD): " \
112 "subcellBasis function space is not consistent to cellBasis.");
115 INTREPID2_TEST_FOR_EXCEPTION( subcellBasis.getDegree() != cellBasis.getDegree(),
117 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HGRAD): " \
118 "subcellBasis has a different polynomial degree from cellBasis' degree.");
124template<
typename OutputViewType,
125typename subcellBasisHostType,
126typename cellBasisHostType>
136#ifdef HAVE_INTREPID2_DEBUG
141 using value_type =
typename OutputViewType::non_const_value_type;
149 const ordinal_type cellDim =
cellTopo.getDimension();
166 ">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HGRAD): " \
167 "Lattice size should be equal to the onber of subcell internal DoFs");
196 Kokkos::DynRankView<value_type,Kokkos::LayoutLeft,host_device_type>
214 Teuchos::LAPACK<ordinal_type,value_type>
lapack;
215 ordinal_type
info = 0;
217 Kokkos::DynRankView<ordinal_type,Kokkos::LayoutLeft,host_device_type>
pivVec(
"pivVec",
ndofSubcell);
227 std::stringstream
ss;
228 ss <<
">>> ERROR (Intrepid::OrientationTools::getCoeffMatrix_HGRAD): "
229 <<
"LAPACK return with error code: "
231 INTREPID2_TEST_FOR_EXCEPTION(
true, std::runtime_error,
ss.str().c_str() );
237 const double eps = tolerence();
272 auto tmp = Kokkos::create_mirror_view_and_copy(
typename OutputViewType::device_type::memory_space(),
PhiMat);
static ConstViewType get(const ordinal_type subcellDim, const unsigned parentCellKey)
Returns a Kokkos view with the coefficients of the parametrization maps for the edges or faces of a r...