52 using Teuchos::rcp_dynamic_cast;
61 std::vector<std::string> elementBlockIds;
62 std::vector<shards::CellTopology> elementBlockTopologies;
67 TEUCHOS_TEST_FOR_EXCEPTION(numElementBlocks <= 0 &&
68 numElementBlocks !=
static_cast<int>(elementBlockIds.size()) &&
69 numElementBlocks !=
static_cast<int>(elementBlockTopologies.size()),
71 "panzer::buildIntrepidOrientation: Number of element blocks does not match to element block meta data");
74 const auto cellTopo = elementBlockTopologies.at(0);
75 const int numVertexPerCell = cellTopo.getVertexCount();
82 for (
int i=0;i<numElementBlocks;++i) {
86 orientation.resize(total_elems);
88 for (
int i=0;i<numElementBlocks;++i) {
90 const auto &elementBlock = connMgr.
getElementBlock(elementBlockIds.at(i));
92 const int numElementsPerBlock = elementBlock.size();
95 for (
int c=0;c<numElementsPerBlock;++c) {
96 const int localCellId = elementBlock.at(c);
97 Kokkos::View<const panzer::GlobalOrdinal*,Kokkos::HostSpace>
99 orientation[localCellId] = (Intrepid2::Orientation::getOrientation(cellTopo, nodes));
107 using Teuchos::rcp_dynamic_cast;
111 auto orientation = rcp(
new std::vector<Intrepid2::Orientation>);
114 RCP<const GlobalIndexer> ugi
115 = rcp_dynamic_cast<const GlobalIndexer>(globalIndexer);
117 if (ugi!=Teuchos::null) {
118 const auto connMgr = ugi->getConnManager()->noConnectivityClone();
120 TEUCHOS_TEST_FOR_EXCEPTION(connMgr == Teuchos::null,std::logic_error,
121 "panzer::buildIntrepidOrientation: ConnManager is null!");
128 TEUCHOS_TEST_FOR_EXCEPTION(
true,std::logic_error,
129 "panzer::buildIntrepidOrientation: Could not cast GlobalIndexer");