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< LocalOrdinalT, GlobalOrdinalT, Node > Class Template Reference

#include <Panzer_UniqueGlobalIndexer_Utilities.hpp>

Public Member Functions

 ArrayToFieldVector (const Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &ugi)
 
template<typename ScalarT , typename ArrayT >
Teuchos::RCP
< Tpetra::MultiVector< ScalarT,
int, GlobalOrdinalT, Node > > 
getGhostedDataVector (const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
 
template<typename ScalarT , typename ArrayT >
Teuchos::RCP
< Tpetra::MultiVector< ScalarT,
int, GlobalOrdinalT, Node > > 
getDataVector (const std::string &fieldName, const std::map< std::string, ArrayT > &data) const
 
Teuchos::RCP< const
Tpetra::Map< int,
GlobalOrdinalT, Node > > 
getFieldMap (const std::string &fieldName) const
 
Teuchos::RCP< const
Tpetra::Map< int,
GlobalOrdinalT, Node > > 
getFieldMap (int fieldNum) const
 

Protected Types

typedef Tpetra::Vector< int,
int, GlobalOrdinalT, Node > 
IntVector
 
typedef Tpetra::Map< int,
GlobalOrdinalT, Node > 
Map
 

Protected Member Functions

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

Protected Attributes

Teuchos::RCP< const
UniqueGlobalIndexer
< LocalOrdinalT,
GlobalOrdinalT > > 
ugi_
 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

template<typename LocalOrdinalT, typename GlobalOrdinalT, typename Node>
class panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >

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

Definition at line 318 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

Member Typedef Documentation

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
typedef Tpetra::Vector<int,int,GlobalOrdinalT,Node> panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::IntVector
protected

Definition at line 366 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
typedef Tpetra::Map<int,GlobalOrdinalT,Node> panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::Map
protected

Definition at line 367 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

Constructor & Destructor Documentation

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::ArrayToFieldVector ( const Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &  ugi)

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

Definition at line 512 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::ArrayToFieldVector ( )
private

Maps for each field (as needed)

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::ArrayToFieldVector ( const ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node > &  )
private

Member Function Documentation

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
template<typename ScalarT , typename ArrayT >
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, GlobalOrdinalT, Node > > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::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 523 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
template<typename ScalarT , typename ArrayT >
Teuchos::RCP< Tpetra::MultiVector< ScalarT, int, GlobalOrdinalT, Node > > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::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 595 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
Teuchos::RCP< const Tpetra::Map< int, GlobalOrdinalT, Node > > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::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 644 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
Teuchos::RCP< const Tpetra::Map< int, GlobalOrdinalT, Node > > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::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 652 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
void panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::buildFieldVector ( const Tpetra::Vector< int, int, GlobalOrdinalT, Node > &  source) const
protected

build unghosted field vector from ghosted field vector

Definition at line 624 of file Panzer_UniqueGlobalIndexer_Utilities_impl.hpp.

Member Data Documentation

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,GlobalOrdinalT> > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::ugi_
protected

DOF mapping.

Definition at line 373 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
Teuchos::RCP<const IntVector> panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::gh_reducedFieldVector_
protected

Definition at line 375 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
Teuchos::RCP<const IntVector> panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::gh_fieldVector_
protected

ghosted reduced field vector

Definition at line 376 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
std::map<int,Teuchos::RCP<const Map> > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::gh_reducedFieldMaps_
mutableprotected

ghosted field vector

Definition at line 378 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
std::map<int,Teuchos::RCP<const Map> > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::gh_fieldMaps_
mutableprotected

Maps for each field (as needed)

Definition at line 379 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
Teuchos::RCP<const IntVector> panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::fieldVector_
mutableprotected

Maps for each field (as needed)

Definition at line 381 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.

template<typename LocalOrdinalT , typename GlobalOrdinalT , typename Node >
std::map<int,Teuchos::RCP<const Map> > panzer::ArrayToFieldVector< LocalOrdinalT, GlobalOrdinalT, Node >::fieldMaps_
mutableprotected

(unghosted) field vector (as needed)

Definition at line 382 of file Panzer_UniqueGlobalIndexer_Utilities.hpp.


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