43 #ifndef __Panzer_OrientationContainer_impl_hpp__
44 #define __Panzer_OrientationContainer_impl_hpp__
46 #include "PanzerDiscFE_config.hpp"
52 template <
typename Scalar,
typename Array,
typename LocalOrdinal,
typename GlobalOrdinal>
55 const std::string & fieldName)
56 : globalIndexer_(globalIndexer)
57 , fieldName_(fieldName)
61 template <
typename Scalar,
typename Array,
typename LocalOrdinal,
typename GlobalOrdinal>
65 const std::vector<std::size_t> & cell_local_ids,
66 Array & orientationsArray)
const
68 int fieldNum = globalIndexer_->getFieldNum(fieldName_);
69 const std::vector<int> & elmtOffset = globalIndexer_->getGIDFieldOffsets(blockId,fieldNum);
72 for(std::size_t cellIndex=0;cellIndex<cell_local_ids.size();++cellIndex) {
73 std::vector<double> orientation;
74 std::size_t cellLocalId = cell_local_ids[cellIndex];
76 globalIndexer_->getElementOrientation(cellLocalId,orientation);
79 for(std::size_t basis=0;basis<elmtOffset.size();basis++) {
80 int offset = elmtOffset[basis];
81 orientationsArray(cellIndex,basis) = orientation[offset];
86 template <
typename Scalar,
typename Array>
89 const std::string & fieldName)
91 using Teuchos::rcp_dynamic_cast;
102 if(ugi!=Teuchos::null)
109 typedef panzer::GlobalOrdinal GO;
113 if(ugi!=Teuchos::null)
120 typedef std::pair<int,int> GO;
124 if(ugi!=Teuchos::null)
131 typedef std::pair<int,panzer::GlobalOrdinal> GO;
135 if(ugi!=Teuchos::null)
140 "panzer::buildOrientationContainer: Could not cast GlobalIndexer");
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< const panzer::OrientationContainerBase< Scalar, Array > > buildOrientationContainer(const Teuchos::RCP< const panzer::GlobalIndexer > &globalIndexer, const std::string &fieldName)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual void getOrientations(const std::string &blockId, const std::vector< std::size_t > &cell_local_ids, Array &orientations) const
OrientationContainer(const Teuchos::RCP< const panzer::GlobalIndexer > &globalIndexer, const std::string &fieldName)