Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
panzer::ArrayToFieldVector Class Reference

#include <Panzer_GlobalIndexer_Utilities.hpp>

Public Member Functions

 ArrayToFieldVector (const Teuchos::RCP< const GlobalIndexer > &ugi)
 
template<typename ScalarT , typename ArrayT >
Teuchos::RCP
< Tpetra::MultiVector< ScalarT,
int, panzer::GlobalOrdinal,
panzer::TpetraNodeType > > 
getGhostedDataVector (const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
 
template<typename ScalarT , typename ArrayT >
Teuchos::RCP
< Tpetra::MultiVector< ScalarT,
int, panzer::GlobalOrdinal,
panzer::TpetraNodeType > > 
getDataVector (const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
 
Teuchos::RCP< const
Tpetra::Map< int,
panzer::GlobalOrdinal,
panzer::TpetraNodeType > > 
getFieldMap (const std::string &fieldName) const
 
Teuchos::RCP< const
Tpetra::Map< int,
panzer::GlobalOrdinal,
panzer::TpetraNodeType > > 
getFieldMap (int fieldNum) const
 

Protected Types

using IntVector = Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType >
 
using Map = Tpetra::Map< int, panzer::GlobalOrdinal, panzer::TpetraNodeType >
 

Protected Member Functions

void buildFieldVector (const Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > &source) const
 build unghosted field vector from ghosted field vector More...
 

Protected Attributes

Teuchos::RCP< const GlobalIndexerugi_
 DOF mapping. More...
 
Teuchos::RCP< const IntVectorgh_reducedFieldVector_
 
Teuchos::RCP< const IntVectorgh_fieldVector_
 ghosted reduced field vector More...
 
std::map< int, Teuchos::RCP
< const Map > > 
gh_reducedFieldMaps_
 ghosted field vector More...
 
std::map< int, Teuchos::RCP
< const Map > > 
gh_fieldMaps_
 Maps for each field (as needed) More...
 
Teuchos::RCP< const IntVectorfieldVector_
 Maps for each field (as needed) More...
 
std::map< int, Teuchos::RCP
< const Map > > 
fieldMaps_
 (unghosted) field vector (as needed) More...
 

Private Member Functions

 ArrayToFieldVector ()
 Maps for each field (as needed) More...
 
 ArrayToFieldVector (const ArrayToFieldVector &)
 

Detailed Description

This class assists in mapping arrays of field data to field vectors.

Definition at line 256 of file Panzer_GlobalIndexer_Utilities.hpp.

Member Typedef Documentation

using panzer::ArrayToFieldVector::IntVector = Tpetra::Vector<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType>
protected

Definition at line 304 of file Panzer_GlobalIndexer_Utilities.hpp.

using panzer::ArrayToFieldVector::Map = Tpetra::Map<int,panzer::GlobalOrdinal,panzer::TpetraNodeType>
protected

Definition at line 305 of file Panzer_GlobalIndexer_Utilities.hpp.

Constructor & Destructor Documentation

panzer::ArrayToFieldVector::ArrayToFieldVector ( const Teuchos::RCP< const GlobalIndexer > &  ugi)

Construct information for the unique global indexer. Notice that this requires global communication.

Definition at line 277 of file Panzer_GlobalIndexer_Utilities.cpp.

panzer::ArrayToFieldVector::ArrayToFieldVector ( )
private

Maps for each field (as needed)

panzer::ArrayToFieldVector::ArrayToFieldVector ( const ArrayToFieldVector )
private

Member Function Documentation

template<typename ScalarT , typename ArrayT >
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > panzer::ArrayToFieldVector::getGhostedDataVector ( const std::string &  fieldName,
const std::map< std::string, ArrayT > &  data 
) const

Get a Tpetra vector containing the data ordered according to the ordering from UGI::getOwnedAndGhostedIndices.

Parameters
[in]fieldNameName of field this data is from
[in]dataArray of data
Returns
Returns a vector populated with the data. This vector is related to the UGI::getOwnedAndGhostedIndices.

Definition at line 90 of file Panzer_GlobalIndexer_Utilities_impl.hpp.

template<typename ScalarT , typename ArrayT >
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > panzer::ArrayToFieldVector::getDataVector ( const std::string &  fieldName,
const std::map< std::string, ArrayT > &  data 
) const

Get a Tpetra vector containing the data ordered according to the ordering from UGI::getOwnedIndices.

Parameters
[in]fieldNameName of field this data is from
[in]dataArray of data
Returns
Returns a vector populated with the data. This vector is related to the UGI::getOwnedIndices.

Definition at line 161 of file Panzer_GlobalIndexer_Utilities_impl.hpp.

Teuchos::RCP< const Tpetra::Map< int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > panzer::ArrayToFieldVector::getFieldMap ( const std::string &  fieldName) const

Build a map that contains only global IDs associated with a particular field. This serves to go from a unique vector of all fields, to a vector containing the uniquely owned global ids for a single field.

Definition at line 303 of file Panzer_GlobalIndexer_Utilities.cpp.

Teuchos::RCP< const Tpetra::Map< int, panzer::GlobalOrdinal, panzer::TpetraNodeType > > panzer::ArrayToFieldVector::getFieldMap ( int  fieldNum) const

Build a map that contains only global IDs associated with a particular field. This serves to go from a unique vector of all fields, to a vector containing the uniquely owned global ids for a single field.

Definition at line 309 of file Panzer_GlobalIndexer_Utilities.cpp.

void panzer::ArrayToFieldVector::buildFieldVector ( const Tpetra::Vector< int, int, panzer::GlobalOrdinal, panzer::TpetraNodeType > &  source) const
protected

build unghosted field vector from ghosted field vector

Definition at line 285 of file Panzer_GlobalIndexer_Utilities.cpp.

Member Data Documentation

Teuchos::RCP<const GlobalIndexer> panzer::ArrayToFieldVector::ugi_
protected

DOF mapping.

Definition at line 311 of file Panzer_GlobalIndexer_Utilities.hpp.

Teuchos::RCP<const IntVector> panzer::ArrayToFieldVector::gh_reducedFieldVector_
protected

Definition at line 313 of file Panzer_GlobalIndexer_Utilities.hpp.

Teuchos::RCP<const IntVector> panzer::ArrayToFieldVector::gh_fieldVector_
protected

ghosted reduced field vector

Definition at line 314 of file Panzer_GlobalIndexer_Utilities.hpp.

std::map<int,Teuchos::RCP<const Map> > panzer::ArrayToFieldVector::gh_reducedFieldMaps_
mutableprotected

ghosted field vector

Definition at line 316 of file Panzer_GlobalIndexer_Utilities.hpp.

std::map<int,Teuchos::RCP<const Map> > panzer::ArrayToFieldVector::gh_fieldMaps_
mutableprotected

Maps for each field (as needed)

Definition at line 317 of file Panzer_GlobalIndexer_Utilities.hpp.

Teuchos::RCP<const IntVector> panzer::ArrayToFieldVector::fieldVector_
mutableprotected

Maps for each field (as needed)

Definition at line 319 of file Panzer_GlobalIndexer_Utilities.hpp.

std::map<int,Teuchos::RCP<const Map> > panzer::ArrayToFieldVector::fieldMaps_
mutableprotected

(unghosted) field vector (as needed)

Definition at line 320 of file Panzer_GlobalIndexer_Utilities.hpp.


The documentation for this class was generated from the following files: