28 const Teuchos::ParameterList& p)
30 dof_name_ = (p.get< std::string >(
"DOF Name"));
32 if(p.isType< Teuchos::RCP<PureBasis> >(
"Basis"))
33 basis_ = p.get< Teuchos::RCP<PureBasis> >(
"Basis");
35 basis_ = p.get< Teuchos::RCP<const PureBasis> >(
"Basis");
37 pointRule_ = p.get<Teuchos::RCP<const PointRule> >(
"Point Rule");
39 Teuchos::RCP<PHX::DataLayout> basis_layout =
basis_->functional;
40 Teuchos::RCP<PHX::DataLayout> vector_layout_vector =
basis_->functional_grad;
43 TEUCHOS_ASSERT(
basis_->isVectorBasis());
46 std::string orientationFieldName =
basis_->name() +
" Orientation";
58 this->setName(
"Gather Tangents");
68 orientations_ = Kokkos::View<Intrepid2::Orientation*>(
"orientations_",orientations->size());
69 auto orientations_host = Kokkos::create_mirror_view(
orientations_);
70 for (
size_t i=0; i < orientations->size(); ++i)
71 orientations_host(i) = (*orientations)[i];
75 const shards::CellTopology & parentCell = *
basis_->getCellTopology();
76 const int edgeDim = 1;
77 edgeParam_ = Intrepid2::RefSubcellParametrization<PHX::Device>::get(edgeDim, parentCell.getKey());
80 keys_ = Kokkos::View<unsigned int*>(
"parentCell.keys",numEdges);
81 auto keys_host = Kokkos::create_mirror_view(
keys_);
82 for (
int i=0; i < numEdges; ++i)
83 keys_host(i) = parentCell.getKey(edgeDim,i);
84 Kokkos::deep_copy(
keys_,keys_host);
96 const shards::CellTopology & parentCell = *
basis_->getCellTopology();
97 const int cellDim = parentCell.getDimension();
101 const auto worksetJacobians =
pointValues_.jac.get_view();
109 Kokkos::parallel_for(
"panzer::GatherTangets",workset.
num_cells,KOKKOS_LAMBDA(
const int c){
110 int edgeOrts[12] = {};
111 orientations(cell_local_ids(c)).getEdgeOrientation(edgeOrts, numEdges);
113 auto workspace = Kokkos::subview(workspace_tmp,c,Kokkos::ALL(),Kokkos::ALL());
114 for(
int pt = 0; pt < numEdges; pt++) {
115 auto phyEdgeTan = Kokkos::subview(gatherFieldTangents, c, pt, Kokkos::ALL());
116 auto ortEdgeTan = Kokkos::subview(workspace_tmp,c,0,Kokkos::ALL());
118 Intrepid2::Impl::OrientationTools::getRefSubcellTangents(
125 auto J = Kokkos::subview(worksetJacobians, c, pt, Kokkos::ALL(), Kokkos::ALL());
126 Intrepid2::Kernels::Serial::matvec_product(phyEdgeTan, J, ortEdgeTan);