43#ifndef __Panzer_GlobalIndexer_Utilities_decl_hpp__
44#define __Panzer_GlobalIndexer_Utilities_decl_hpp__
49#include <unordered_map>
52#include <Tpetra_Vector.hpp>
53#include <Tpetra_MultiVector.hpp>
63std::vector<Teuchos::RCP<const GlobalIndexer>>
64nc2c_vector(
const std::vector<Teuchos::RCP<GlobalIndexer>> & ugis);
76 const std::vector<Teuchos::RCP<GlobalIndexer>> & ugis);
88 const std::vector<Teuchos::RCP<const GlobalIndexer>> & ugis);
104 const std::vector<Teuchos::RCP<GlobalIndexer>> & ugis,
105 std::vector<int> & blockOffsets);
121 const std::vector<Teuchos::RCP<const GlobalIndexer>> & ugis,
122 std::vector<int> & blockOffsets);
148Teuchos::RCP<Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
161Teuchos::RCP<const Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
163 const Teuchos::RCP<
const Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> > & reducedVec=Teuchos::null);
179 std::vector<int> & fieldNumbers,
180 const Teuchos::RCP<
const Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> > & reducedVec=Teuchos::null);
194template <
typename ScalarT,
typename ArrayT>
196 const GlobalIndexer & ugi,
198 Tpetra::MultiVector<ScalarT,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> & dataVector);
209Teuchos::RCP<const Tpetra::Map<int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
210getFieldMap(
int fieldNum,
const Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> & fieldVector);
213namespace orientation_helpers {
243 const std::vector<panzer::GlobalOrdinal> & topology,
244 const FieldPattern & fieldPattern,
245 std::vector<signed char> & orientation);
279 const std::vector<panzer::GlobalOrdinal> & topology,
280 const FieldPattern & fieldPattern,
281 std::vector<signed char> & orientation);
304 template <
typename ScalarT,
typename ArrayT>
305 Teuchos::RCP<Tpetra::MultiVector<ScalarT,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
306 getGhostedDataVector(
const std::string & fieldName,
const std::map<std::string,ArrayT> & data)
const;
317 template <
typename ScalarT,
typename ArrayT>
318 Teuchos::RCP<Tpetra::MultiVector<ScalarT,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
319 getDataVector(
const std::string & fieldName,
const std::map<std::string,ArrayT> & data)
const;
325 Teuchos::RCP<const Tpetra::Map<int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
332 Teuchos::RCP<const Tpetra::Map<int,panzer::GlobalOrdinal,panzer::TpetraNodeType> >
336 using IntVector = Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType>;
337 using Map = Tpetra::Map<int,panzer::GlobalOrdinal,panzer::TpetraNodeType>;
340 void buildFieldVector(
const Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> & source)
const;
343 Teuchos::RCP<const GlobalIndexer>
ugi_;
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > getGhostedDataVector(const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
Teuchos::RCP< const GlobalIndexer > ugi_
DOF mapping.
ArrayToFieldVector(const ArrayToFieldVector &)
std::map< int, Teuchos::RCP< const Map > > fieldMaps_
(unghosted) field vector (as needed)
Teuchos::RCP< const IntVector > gh_reducedFieldVector_
std::map< int, Teuchos::RCP< const Map > > gh_fieldMaps_
Maps for each field (as needed)
Teuchos::RCP< const IntVector > gh_fieldVector_
ghosted reduced field vector
std::map< int, Teuchos::RCP< const Map > > gh_reducedFieldMaps_
ghosted field vector
Teuchos::RCP< const IntVector > fieldVector_
Maps for each field (as needed)
Tpetra::Map< int, panzer::GlobalOrdinal, panzer::TpetraNodeType > Map
Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > IntVector
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > getDataVector(const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
ArrayToFieldVector()
Maps for each field (as needed)
void buildFieldVector(const Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > &source) const
build unghosted field vector from ghosted field vector
Teuchos::RCP< const Tpetra::Map< int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > getFieldMap(const std::string &fieldName) const
void computeCellEdgeOrientations(const std::vector< std::pair< int, int > > &topEdgeIndices, const std::vector< panzer::GlobalOrdinal > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
void computePatternEdgeIndices(const FieldPattern &pattern, std::vector< std::pair< int, int > > &edgeIndices)
void computeCellFaceOrientations(const std::vector< std::vector< int > > &topFaceIndices, const std::vector< panzer::GlobalOrdinal > &topology, const FieldPattern &fieldPattern, std::vector< signed char > &orientation)
void computePatternFaceIndices(const FieldPattern &pattern, std::vector< std::vector< int > > &faceIndices)
Teuchos::RCP< const Tpetra::Map< int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > getFieldMap(int fieldNum, const Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > &fieldTVector)
std::vector< Teuchos::RCP< const GlobalIndexer > > nc2c_vector(const std::vector< Teuchos::RCP< GlobalIndexer > > &ugis)
void printMeshTopology(std::ostream &os, const panzer::GlobalIndexer &ugi)
void computeBlockOffsets(const std::string &blockId, const std::vector< Teuchos::RCP< GlobalIndexer > > &ugis, std::vector< int > &blockOffsets)
void buildGhostedFieldVector(const GlobalIndexer &ugi, std::vector< int > &fieldNumbers, const Teuchos::RCP< const Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > &reducedVec)
std::string printUGILoadBalancingInformation(const GlobalIndexer &ugi)
int getFieldBlock(const std::string &fieldName, const std::vector< Teuchos::RCP< const GlobalIndexer > > &ugis)
Teuchos::RCP< Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > buildGhostedFieldReducedVector(const GlobalIndexer &ugi)
void updateGhostedDataReducedVector(const std::string &fieldName, const std::string blockId, const GlobalIndexer &ugi, const ArrayT &data, Tpetra::MultiVector< ScalarT, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > &dataVector)