Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GlobalIndexer_EpetraUtilities.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef __Panzer_GlobalIndexer_EpetraUtilities_decl_hpp__
12 #define __Panzer_GlobalIndexer_EpetraUtilities_decl_hpp__
13 
14 #include <map>
15 #include <string>
16 
17 #include <unordered_map>
18 
19 #include <Panzer_NodeType.hpp>
20 #include <Epetra_Vector.h>
21 #include <Epetra_IntVector.h>
22 #include <Epetra_MultiVector.h>
23 
24 #include "Panzer_GlobalIndexer.hpp"
25 #include "Panzer_FieldPattern.hpp"
26 
27 namespace panzer {
28 
29 
43 buildGhostedFieldReducedVectorEpetra(const GlobalIndexer & ugi);
44 
56 buildGhostedFieldVectorEpetra(const GlobalIndexer & ugi,
57  const Teuchos::RCP<const Epetra_IntVector> & reducedVec=Teuchos::null);
58 
72 void buildGhostedFieldVectorEpetra(const GlobalIndexer & ugi,
73  std::vector<int> & fieldNumbers,
74  const Teuchos::RCP<const Epetra_IntVector> & reducedVec=Teuchos::null);
75 
88 template <typename ScalarT,typename ArrayT>
89 void updateGhostedDataReducedVectorEpetra(const std::string & fieldName,const std::string blockId,
90  const GlobalIndexer & ugi,
91  const ArrayT & data,
92  Epetra_MultiVector & dataVector);
93 
104 getFieldMapEpetra(int fieldNum,const Epetra_IntVector & fieldVector);
105 
106 
110 public:
115 
125  template <typename ScalarT,typename ArrayT>
127  getGhostedDataVector(const std::string & fieldName,const std::map<std::string,ArrayT> & data) const;
128 
138  template <typename ScalarT,typename ArrayT>
140  getDataVector(const std::string & fieldName,const std::map<std::string,ArrayT> & data) const;
141 
147  getFieldMap(const std::string & fieldName) const;
148 
154  getFieldMap(int fieldNum) const;
155 
156 protected:
160 
162  void buildFieldVector(const Epetra_IntVector & source) const;
163 
166 
169 
170  mutable std::map<int,Teuchos::RCP<const Map>> gh_reducedFieldMaps_;
171  mutable std::map<int,Teuchos::RCP<const Map>> gh_fieldMaps_;
172 
174  mutable std::map<int,Teuchos::RCP<const Map>> fieldMaps_;
175 
176 private:
177  // hide some constructors
180 };
181 
182 
183 } // end namspace panzer
184 
186 
187 #endif
std::map< int, Teuchos::RCP< const Map > > fieldMaps_
(unghosted) field vector (as needed)
Teuchos::RCP< Epetra_MultiVector > getDataVector(const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
Teuchos::RCP< Epetra_IntVector > buildGhostedFieldReducedVectorEpetra(const GlobalIndexer &ugi)
Teuchos::RCP< const IntVector > fieldVector_
Maps for each field (as needed)
Teuchos::RCP< const Epetra_IntVector > buildGhostedFieldVectorEpetra(const GlobalIndexer &ugi, const Teuchos::RCP< const Epetra_IntVector > &reducedVec=Teuchos::null)
Teuchos::RCP< const Epetra_Map > getFieldMap(const std::string &fieldName) const
void buildFieldVector(const Epetra_IntVector &source) const
build unghosted field vector from ghosted field vector
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
Teuchos::RCP< const GlobalIndexer > ugi_
DOF mapping.
Teuchos::RCP< Epetra_MultiVector > getGhostedDataVector(const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
std::map< int, Teuchos::RCP< const Map > > gh_reducedFieldMaps_
ghosted field vector
Teuchos::RCP< const Epetra_BlockMap > getFieldMapEpetra(int fieldNum, const Epetra_IntVector &fieldVector)
ArrayToFieldVectorEpetra()
Maps for each field (as needed)
void updateGhostedDataReducedVectorEpetra(const std::string &fieldName, const std::string blockId, const GlobalIndexer &ugi, const ArrayT &data, Epetra_MultiVector &dataVector)