Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > Class Template Reference

#include <Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp>

Inheritance diagram for panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >:
Inheritance graph
[legend]

Public Types

typedef Tpetra::Vector
< ScalarT, LocalOrdinalT,
GlobalOrdinalT, NodeT > 
VectorType
 
typedef Tpetra::Map
< LocalOrdinalT,
GlobalOrdinalT, NodeT > 
MapType
 
typedef Tpetra::Import
< LocalOrdinalT,
GlobalOrdinalT, NodeT > 
ImportType
 

Public Member Functions

 TpetraVector_ReadOnly_GlobalEvaluationData ()
 Default constructor. More...
 
 TpetraVector_ReadOnly_GlobalEvaluationData (const TpetraVector_ReadOnly_GlobalEvaluationData &src)
 
 TpetraVector_ReadOnly_GlobalEvaluationData (const Teuchos::RCP< const ImportType > &importer, const Teuchos::RCP< const MapType > &ghostedMap, const Teuchos::RCP< const MapType > &ownedMap)
 
void useConstantValues (const std::vector< GlobalOrdinalT > &indices, double value)
 
void initialize (const Teuchos::RCP< const ImportType > &importer, const Teuchos::RCP< const MapType > &ghostedMap, const Teuchos::RCP< const MapType > &ownedMap)
 
virtual void globalToGhost (int mem)
 
virtual void initializeData ()
 Clear out the ghosted vector. More...
 
virtual void ghostToGlobal (int)
 For this class this method does nothing. More...
 
virtual bool requiresDirichletAdjustment () const
 Nothing to do (its read only) More...
 
void setOwnedVector_Tpetra (const Teuchos::RCP< const VectorType > &ownedVector)
 Set the owned vector (Tpetra version) More...
 
Teuchos::RCP< const VectorTypegetOwnedVector_Tpetra () const
 Get the owned vector (Tpetra version) More...
 
Teuchos::RCP< VectorTypegetGhostedVector_Tpetra () const
 Get the ghosted vector (Tpetra version) More...
 
void setOwnedVector (const Teuchos::RCP< const Thyra::VectorBase< double > > &ownedVector)
 Set the owned vector (Thyra version) More...
 
Teuchos::RCP< const
Thyra::VectorBase< double > > 
getOwnedVector () const
 Get the owned vector (Thyra version) More...
 
Teuchos::RCP
< Thyra::VectorBase< double > > 
getGhostedVector () const
 Get the ghosted vector (Thyra version) More...
 
bool isInitialized () const
 Is this object initialized. More...
 
void print (std::ostream &os) const
 Diagnostic function. More...
 
- Public Member Functions inherited from panzer::ReadOnlyVector_GlobalEvaluationData
virtual ~ReadOnlyVector_GlobalEvaluationData ()
 Virtual d. More...
 
const double & operator[] (const int &lid) const
 Element access. More...
 
- Public Member Functions inherited from panzer::GlobalEvaluationData
virtual ~GlobalEvaluationData ()=0
 

Private Types

typedef std::pair< std::vector
< GlobalOrdinalT >, double > 
FilteredGlobalPair
 
typedef std::pair< std::vector
< LocalOrdinalT >, double > 
FilteredLocalPair
 

Private Attributes

bool isInitialized_
 
Teuchos::RCP< const MapTypeghostedMap_
 
Teuchos::RCP< const MapTypeownedMap_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< double > > 
ghostedSpace_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< double > > 
ownedSpace_
 
Teuchos::RCP< const ImportTypeimporter_
 
Teuchos::RCP< VectorTypeghostedVector_
 
Teuchos::RCP< const VectorTypeownedVector_
 
std::vector< FilteredGlobalPairglobalFilteredPairs_
 
std::vector< FilteredLocalPairfilteredPairs_
 

Additional Inherited Members

- Protected Attributes inherited from panzer::ReadOnlyVector_GlobalEvaluationData
panzer::kokkos_utils::VectorToViewTraits
< const Epetra_Vector >::View 
ownedView_
 The Kokkos::View of the owned vector. More...
 
panzer::kokkos_utils::VectorToViewTraits
< Epetra_Vector >::View 
ghostedView_
 The Kokkos::View of the ghosted vector. More...
 

Detailed Description

template<typename ScalarT, typename LocalOrdinalT, typename GlobalOrdinalT, typename NodeT = panzer::TpetraNodeType>
class panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >

This class provides a boundary exchange communication mechanism for vectors. Not this provides a "read only" (RO) interface for parameters (so vectors are write protected).

Definition at line 65 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Member Typedef Documentation

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
typedef Tpetra::Vector<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::VectorType
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
typedef Tpetra::Map<LocalOrdinalT,GlobalOrdinalT,NodeT> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::MapType
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
typedef Tpetra::Import<LocalOrdinalT,GlobalOrdinalT,NodeT> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ImportType
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
typedef std::pair<std::vector<GlobalOrdinalT>,double> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::FilteredGlobalPair
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
typedef std::pair<std::vector<LocalOrdinalT>,double> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::FilteredLocalPair
private

Constructor & Destructor Documentation

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::TpetraVector_ReadOnly_GlobalEvaluationData ( )
inline

Default constructor.

Definition at line 72 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::TpetraVector_ReadOnly_GlobalEvaluationData ( const TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > &  src)
inline
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::TpetraVector_ReadOnly_GlobalEvaluationData ( const Teuchos::RCP< const ImportType > &  importer,
const Teuchos::RCP< const MapType > &  ghostedMap,
const Teuchos::RCP< const MapType > &  ownedMap 
)
inline

Initialize this object with some Tpetra communication objects. This method must be called before an object of this type can be used.

Parameters
[in]importerImporter for doing communication from the owned to the ghosted vector.
[in]ghostedMapMap describing the ghosted vector.
[in]ownedMapMap describing the ghosted vector.

Definition at line 86 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Member Function Documentation

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::useConstantValues ( const std::vector< GlobalOrdinalT > &  indices,
double  value 
)

Choose a few GIDs and instead of zeroing them out in the ghosted vector set them to a specified value. Note that this is only useful for GIDs in the ghosted map that are not in the owned map.

This must be called before initialize. Also note that no attempt to synchronize these values a crossed processor is made. So its up to the user to be consistent.

Definition at line 55 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::initialize ( const Teuchos::RCP< const ImportType > &  importer,
const Teuchos::RCP< const MapType > &  ghostedMap,
const Teuchos::RCP< const MapType > &  ownedMap 
)

Initialize this object with some Tpetra communication objects. This method must be called before an object of this type can be used.

Parameters
[in]importerImporter for doing communication from the owned to the ghosted vector.
[in]ghostedMapMap describing the ghosted vector.
[in]ownedMapMap describing the ghosted vector.

Definition at line 70 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::globalToGhost ( int  mem)
virtual

For this class, this method does the halo exchange for the vector.

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 113 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::initializeData ( )
virtual

Clear out the ghosted vector.

Implements panzer::GlobalEvaluationData.

Definition at line 129 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
virtual void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ghostToGlobal ( int  )
inlinevirtual

For this class this method does nothing.

Reimplemented from panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 121 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
virtual bool panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::requiresDirichletAdjustment ( ) const
inlinevirtual

Nothing to do (its read only)

Implements panzer::GlobalEvaluationData.

Definition at line 124 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::setOwnedVector_Tpetra ( const Teuchos::RCP< const VectorType > &  ownedVector)

Set the owned vector (Tpetra version)

Definition at line 152 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
Teuchos::RCP< const typename TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::VectorType > panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::getOwnedVector_Tpetra ( ) const

Get the owned vector (Tpetra version)

Definition at line 161 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
Teuchos::RCP< typename TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::VectorType > panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::getGhostedVector_Tpetra ( ) const

Get the ghosted vector (Tpetra version)

Definition at line 170 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::setOwnedVector ( const Teuchos::RCP< const Thyra::VectorBase< double > > &  ownedVector)
virtual

Set the owned vector (Thyra version)

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 181 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
Teuchos::RCP< const Thyra::VectorBase< double > > panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::getOwnedVector ( ) const
virtual

Get the owned vector (Thyra version)

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 192 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
Teuchos::RCP< Thyra::VectorBase< double > > panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::getGhostedVector ( ) const
virtual

Get the ghosted vector (Thyra version)

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 202 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
bool panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::isInitialized ( ) const
inlinevirtual

Is this object initialized.

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 145 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData.hpp.

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT >
void panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::print ( std::ostream &  os) const
virtual

Diagnostic function.

Reimplemented from panzer::GlobalEvaluationData.

Definition at line 213 of file Panzer_TpetraVector_ReadOnly_GlobalEvaluationData_impl.hpp.

Member Data Documentation

template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
bool panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::isInitialized_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<const MapType> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ghostedMap_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<const MapType> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ownedMap_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<const Thyra::VectorSpaceBase<double> > panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ghostedSpace_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<const Thyra::VectorSpaceBase<double> > panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ownedSpace_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<const ImportType> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::importer_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<VectorType> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ghostedVector_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
Teuchos::RCP<const VectorType> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::ownedVector_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
std::vector<FilteredGlobalPair> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::globalFilteredPairs_
private
template<typename ScalarT , typename LocalOrdinalT , typename GlobalOrdinalT , typename NodeT = panzer::TpetraNodeType>
std::vector<FilteredLocalPair> panzer::TpetraVector_ReadOnly_GlobalEvaluationData< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >::filteredPairs_
private

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