1 #include "Thyra_VectorBase.hpp" 2 #include "Thyra_DefaultProductVector.hpp" 3 #include "Thyra_DefaultProductVectorSpace.hpp" 13 : isInitialized_(false)
19 : isInitialized_(false)
28 : isInitialized_(false)
30 initialize(ghostedSpace, ownedSpace, gedBlocks);
39 using Teuchos::rcp_dynamic_cast;
42 for(std::size_t i=0;i<gedBlocks.size();i++) {
44 "BlockedVector_ReadOnly_GlobalEvaluationData::initialize: GED block is " << i <<
" is not initialized.");
52 "BlockedVector_ReadOnly_GED::initialize: ghosted space must be a Thyra::DefaultProductVectorSpace");
62 "BlockedVector_ReadOnly_GED has not been initialized, cannot call \"globalToGhost\"!");
73 "BlockedVector_ReadOnly_GED has not been initialized, cannot call \"initializeData\"!");
88 "BlockedVector_ReadOnly_GED owned vector as the wrong number of blocks!");
106 "BlockedVector_ReadOnly_GED has not been initialized, cannot call \"getGhostedVector\"!");
109 std::vector<Teuchos::RCP<Thyra::VectorBase<double> > > blocks;
111 blocks.push_back(
gedBlocks_[i]->getGhostedVector());
114 const std::vector<Teuchos::RCP<Thyra::VectorBase<double> > > & blocks_c = blocks;
115 return Thyra::defaultProductVector(
ghostedSpace_,Teuchos::arrayViewFromVector(blocks_c));
Teuchos::RCP< const Thyra::VectorBase< double > > ownedVector_
virtual bool isInitialized() const
Is this object initialized.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
BlockedVector_ReadOnly_GlobalEvaluationData()
virtual Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get the ghosted vector.
virtual void setOwnedVector(const Teuchos::RCP< const Thyra::VectorBase< double > > &ownedVector)
Set the owned vector.
std::vector< Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > > gedBlocks_
PHX::MDField< ScalarT > vector
virtual void initializeData()
Initialize internal data for communication (clear the ghosted vector)
void initialize(const Teuchos::RCP< const Thyra::VectorSpaceBase< double > > &ghostedSpace, const Teuchos::RCP< const Thyra::VectorSpaceBase< double > > &ownedSpace, const std::vector< Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > > &gedBlocks)
virtual void globalToGhost(int mem)
Teuchos::RCP< const Thyra::DefaultProductVectorSpace< double > > ghostedSpace_
virtual Teuchos::RCP< const Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector.