43 #ifndef __Panzer_UniqueGlobalIndexer_Utilities_decl_hpp__
44 #define __Panzer_UniqueGlobalIndexer_Utilities_decl_hpp__
49 #include <unordered_map>
52 #include <Tpetra_Vector.hpp>
53 #include <Tpetra_MultiVector.hpp>
63 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
64 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> > >
76 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
78 const std::vector<
Teuchos::RCP<UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> > > & ugis);
89 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
91 const std::vector<
Teuchos::RCP<
const UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> > > & ugis);
106 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
108 const std::vector<
Teuchos::RCP<UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> > > & ugis,
109 std::vector<int> & blockOffsets);
124 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
126 const std::vector<
Teuchos::RCP<
const UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> > > & ugis,
127 std::vector<int> & blockOffsets);
133 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
140 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
155 template <
typename LocalOrdinalT,
typename GlobalOrdinalT,
typename Node>
169 template <
typename LocalOrdinalT,
typename GlobalOrdinalT,
typename Node>
172 const Teuchos::RCP<
const Tpetra::Vector<int,int,GlobalOrdinalT,Node> > & reducedVec=Teuchos::null);
176 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
179 const Teuchos::RCP<
const Tpetra::Vector<int,int,GlobalOrdinalT,panzer::TpetraNodeType> > & reducedVec=Teuchos::null)
180 {
return buildGhostedFieldVector<LocalOrdinalT,GlobalOrdinalT,panzer::TpetraNodeType>(ugi,reducedVec); }
195 template <
typename LocalOrdinalT,
typename GlobalOrdinalT,
typename Node>
197 std::vector<int> & fieldNumbers,
198 const Teuchos::RCP<
const Tpetra::Vector<int,int,GlobalOrdinalT,Node> > & reducedVec=Teuchos::null);
202 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
204 std::vector<int> & fieldNumbers,
205 const Teuchos::RCP<
const Tpetra::Vector<int,int,GlobalOrdinalT,panzer::TpetraNodeType> > & reducedVec=Teuchos::null)
206 { buildGhostedFieldVector<LocalOrdinalT,GlobalOrdinalT,panzer::TpetraNodeType>(ugi,fieldNumbers,reducedVec); }
220 template <
typename ScalarT,
typename ArrayT,
typename LocalOrdinalT,
typename GlobalOrdinalT,
typename Node>
222 const UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> & ugi,
224 Tpetra::MultiVector<ScalarT,int,GlobalOrdinalT,Node> & dataVector);
235 template <
typename GlobalOrdinalT,
typename Node>
237 getFieldMap(
int fieldNum,
const Tpetra::Vector<int,int,GlobalOrdinalT,Node> & fieldVector);
240 namespace orientation_helpers {
269 template <
typename GlobalOrdinalT>
271 const std::vector<GlobalOrdinalT> & topology,
272 const FieldPattern & fieldPattern,
273 std::vector<signed char> & orientation);
306 template <
typename GlobalOrdinalT>
308 const std::vector<GlobalOrdinalT> & topology,
309 const FieldPattern & fieldPattern,
310 std::vector<signed char> & orientation);
317 template <
typename LocalOrdinalT,
typename GlobalOrdinalT,
typename Node>
334 template <
typename ScalarT,
typename ArrayT>
336 getGhostedDataVector(
const std::string & fieldName,
const std::map<std::string,ArrayT> & data)
const;
347 template <
typename ScalarT,
typename ArrayT>
349 getDataVector(
const std::string & fieldName,
const std::map<std::string,ArrayT> & data)
const;
366 typedef Tpetra::Vector<int,int,GlobalOrdinalT,Node>
IntVector;
367 typedef Tpetra::Map<int,GlobalOrdinalT,Node>
Map;
370 void buildFieldVector(
const Tpetra::Vector<int,int,GlobalOrdinalT,Node> & source)
const;
int getFieldBlock(const std::string &fieldName, const std::vector< Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > &ugis)
std::map< int, Teuchos::RCP< const Map > > fieldMaps_
(unghosted) field vector (as needed)
void computeCellEdgeOrientations(const std::vector< std::pair< int, int > > &topEdgeIndices, const std::vector< GlobalOrdinalT > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
Teuchos::RCP< const IntVector > fieldVector_
Maps for each field (as needed)
void computeBlockOffsets(const std::string &blockId, const std::vector< Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > &ugis, std::vector< int > &blockOffsets)
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, GlobalOrdinalT, Node > > getGhostedDataVector(const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
void buildFieldVector(const Tpetra::Vector< int, int, GlobalOrdinalT, Node > &source) const
build unghosted field vector from ghosted field vector
Teuchos::RCP< const Tpetra::Map< int, GlobalOrdinalT, Node > > getFieldMap(const std::string &fieldName) const
std::map< int, Teuchos::RCP< const Map > > gh_fieldMaps_
Maps for each field (as needed)
std::map< int, Teuchos::RCP< const Map > > gh_reducedFieldMaps_
ghosted field vector
Teuchos::RCP< const Tpetra::Map< int, GlobalOrdinalT, Node > > getFieldMap(int fieldNum, const Tpetra::Vector< int, int, GlobalOrdinalT, Node > &fieldVector)
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > nc2c_vector(const std::vector< Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > &ugis)
void updateGhostedDataReducedVector(const std::string &fieldName, const std::string blockId, const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &ugi, const ArrayT &data, Tpetra::MultiVector< ScalarT, int, GlobalOrdinalT, Node > &dataVector)
Teuchos::RCP< const Tpetra::Vector< int, int, GlobalOrdinalT, Node > > buildGhostedFieldVector(const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &ugi, const Teuchos::RCP< const Tpetra::Vector< int, int, GlobalOrdinalT, Node > > &reducedVec=Teuchos::null)
std::string printUGILoadBalancingInformation(const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &ugi)
Teuchos::RCP< const IntVector > gh_fieldVector_
ghosted reduced field vector
void printMeshTopology(std::ostream &os, const panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &ugi)
void computePatternFaceIndices(const FieldPattern &pattern, std::vector< std::vector< int > > &faceIndices)
Teuchos::RCP< Tpetra::Vector< int, int, GlobalOrdinalT, Node > > buildGhostedFieldReducedVector(const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &ugi)
void computeCellFaceOrientations(const std::vector< std::pair< int, int > > &topEdgeIndices, const std::vector< GlobalOrdinalT > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > ugi_
DOF mapping.
Tpetra::Map< int, GlobalOrdinalT, Node > Map
Teuchos::RCP< const IntVector > gh_reducedFieldVector_
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, GlobalOrdinalT, Node > > getDataVector(const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
void computePatternEdgeIndices(const FieldPattern &pattern, std::vector< std::pair< int, int > > &edgeIndices)
Tpetra::Vector< int, int, GlobalOrdinalT, Node > IntVector
ArrayToFieldVector()
Maps for each field (as needed)