11 #ifndef __Panzer_OrientationContainer_impl_hpp__
12 #define __Panzer_OrientationContainer_impl_hpp__
14 #include "PanzerDiscFE_config.hpp"
20 template <
typename Scalar,
typename Array,
typename LocalOrdinal,
typename GlobalOrdinal>
23 const std::string & fieldName)
24 : globalIndexer_(globalIndexer)
25 , fieldName_(fieldName)
29 template <
typename Scalar,
typename Array,
typename LocalOrdinal,
typename GlobalOrdinal>
33 const std::vector<std::size_t> & cell_local_ids,
34 Array & orientationsArray)
const
36 int fieldNum = globalIndexer_->getFieldNum(fieldName_);
37 const std::vector<int> & elmtOffset = globalIndexer_->getGIDFieldOffsets(blockId,fieldNum);
40 for(std::size_t cellIndex=0;cellIndex<cell_local_ids.size();++cellIndex) {
41 std::vector<double> orientation;
42 std::size_t cellLocalId = cell_local_ids[cellIndex];
44 globalIndexer_->getElementOrientation(cellLocalId,orientation);
47 for(std::size_t basis=0;basis<elmtOffset.size();basis++) {
48 int offset = elmtOffset[basis];
49 orientationsArray(cellIndex,basis) = orientation[offset];
54 template <
typename Scalar,
typename Array>
57 const std::string & fieldName)
59 using Teuchos::rcp_dynamic_cast;
70 if(ugi!=Teuchos::null)
77 typedef panzer::GlobalOrdinal GO;
81 if(ugi!=Teuchos::null)
88 typedef std::pair<int,int> GO;
92 if(ugi!=Teuchos::null)
99 typedef std::pair<int,panzer::GlobalOrdinal> GO;
103 if(ugi!=Teuchos::null)
108 "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)