60 const Teuchos::ParameterList& p)
62 dof_name = (p.get< std::string >(
"DOF Name"));
64 if(p.isType< Teuchos::RCP<PureBasis> >(
"Basis"))
65 basis = p.get< Teuchos::RCP<PureBasis> >(
"Basis");
67 basis = p.get< Teuchos::RCP<const PureBasis> >(
"Basis");
69 pointRule = p.get<Teuchos::RCP<const PointRule> >(
"Point Rule");
71 Teuchos::RCP<PHX::DataLayout> basis_layout =
basis->functional;
72 Teuchos::RCP<PHX::DataLayout> vector_layout_vector =
basis->functional_grad;
75 TEUCHOS_ASSERT(
basis->isVectorBasis());
78 std::string orientationFieldName =
basis->name() +
" Orientation";
90 this->setName(
"Gather Normals");
121 const shards::CellTopology & parentCell = *
basis->getCellTopology();
122 int cellDim = parentCell.getDimension();
123 int sideDim = parentCell.getDimension()-1;
127 auto refEdges = Kokkos::createDynRankView(
gatherFieldNormals.get_static_view(),
"ref_edges", sideDim, cellDim);
128 auto phyEdges = Kokkos::createDynRankView(
gatherFieldNormals.get_static_view(),
"phy_edges", sideDim, cellDim);
131 const auto worksetJacobians =
pointValues.jac.get_view();
135 for(index_t c=0;c<workset.
num_cells;c++) {
136 int faceOrts[6] = {};
139 for(
int pt = 0; pt < numFaces; pt++) {
140 auto ortEdgeTan_U = Kokkos::subview(refEdges, 0, Kokkos::ALL());
141 auto ortEdgeTan_V = Kokkos::subview(refEdges, 1, Kokkos::ALL());
143 Intrepid2::Impl::OrientationTools::getRefSubcellTangents(refEdges,
145 parentCell.getKey(sideDim,pt),
149 auto phyEdgeTan_U = Kokkos::subview(phyEdges, 0, Kokkos::ALL());
150 auto phyEdgeTan_V = Kokkos::subview(phyEdges, 1, Kokkos::ALL());
151 auto J = Kokkos::subview(worksetJacobians, c, pt, Kokkos::ALL(), Kokkos::ALL());
153 Intrepid2::Kernels::Serial::matvec_product(phyEdgeTan_U, J, ortEdgeTan_U);
154 Intrepid2::Kernels::Serial::matvec_product(phyEdgeTan_V, J, ortEdgeTan_V);
157 gatherFieldNormals(c,pt,0) = (phyEdgeTan_U(1)*phyEdgeTan_V(2) - phyEdgeTan_U(2)*phyEdgeTan_V(1));
158 gatherFieldNormals(c,pt,1) = (phyEdgeTan_U(2)*phyEdgeTan_V(0) - phyEdgeTan_U(0)*phyEdgeTan_V(2));
159 gatherFieldNormals(c,pt,2) = (phyEdgeTan_U(0)*phyEdgeTan_V(1) - phyEdgeTan_U(1)*phyEdgeTan_V(0));