18 #include "Epetra_Export.h"
24 #include "Thyra_EpetraThyraWrappers.hpp"
25 #include "Thyra_LinearOpBase.hpp"
26 #include "Thyra_SpmdVectorBase.hpp"
27 #include "Thyra_SpmdVectorSpaceBase.hpp"
28 #include "Thyra_VectorBase.hpp"
29 #include "Thyra_VectorStdOps.hpp"
47 using Thyra::create_Vector;
48 using Thyra::create_VectorSpace;
80 using std::invalid_argument;
81 using std::logic_error;
83 using Thyra::get_Epetra_Vector;
85 "EpetraVector_Write_GlobalEvaluationData::ghostToGlobal(): Owned " \
86 "vector has not been set; can't perform the halo exchange!")
106 "EpetraVector_Write_GlobalEvaluationData::ghostToGlobal(): " \
107 "Invalid CombineMode. Valid modes are CM_Sum, CM_Max, CM_Min, " \
126 using std::logic_error;
127 using Thyra::put_scalar;
129 "EpetraVector_Write_GlobalEvaluationData has not been initialized; " \
130 "cannot call \"initializeData()\"!")
145 using std::logic_error;
146 using Thyra::create_Vector;
148 "EpetraVector_Write_GlobalEvaluationData::setOwnedVector_Epetra(): " \
149 "This object hasn't yet been initialized.")
163 using std::logic_error;
165 "EpetraVector_Write_GlobalEvaluationData::setGhostedVector_Epetra(): " \
166 "This object hasn't yet been initialized.")
168 "EpetraVector_Write_GlobalEvaluationData::setGhostedVector_Epetra(): " \
169 "The ghosted vector is just a null RCP.")
184 using std::logic_error;
186 "EpetraVector_Write_GlobalEvaluationData::setOwnedVector(): This " \
187 "object hasn't yet been initialized.")
201 using std::logic_error;
203 "EpetraVector_Write_GlobalEvaluationData::getOwnedVector(): This " \
204 "object hasn't yet been initialized.")
217 using std::logic_error;
218 using Thyra::create_Vector;
220 "EpetraVector_Write_GlobalEvaluationData::getGhostedVector(): This " \
221 "object hasn't yet been initialized.")
223 "EpetraVector_Write_GlobalEvaluationData::getGhostedVector(): The " \
224 "ghosted vector is just a null RCP.")
236 std::ostream& os)
const
239 const string tab(
" ");
241 os << tab <<
"EpetraVector_Write_GlobalEvaluationData\n"
void setOwnedVector(const Teuchos::RCP< Thyra::VectorBase< double >> &ownedVector)
Set the owned vector (Thyra version).
VectorToViewTraits< VectorType >::View getView(typename VectorToViewTraits< VectorType >::ThyraVector &v)
void setOwnedVector_Epetra(const Teuchos::RCP< Epetra_Vector > &ownedVector)
Set the owned vector (Epetra version).
Teuchos::RCP< Thyra::VectorBase< double > > ownedVector_
The owned vector.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void initialize(const Teuchos::RCP< const Epetra_Export > &exporter, const Teuchos::RCP< const Epetra_Map > &ghostedMap, const Teuchos::RCP< const Epetra_Map > &ownedMap)
Initialize this object with some Epetra communication objects.
Teuchos::RCP< Thyra::VectorBase< double > > getOwnedVector() const
Get the owned vector (Thyra version).
VectorToViewTraits< Epetra_Vector >::View getView< Epetra_Vector >(typename VectorToViewTraits< Epetra_Vector >::ThyraVector &v)
Teuchos::RCP< const Epetra_Map > ownedMap_
The map corresponding to the owned vector.
void print(std::ostream &os) const
Print the object.
Teuchos::RCP< Epetra_Vector > getGhostedVector_Epetra() const
Get the ghosted vector (Epetra version).
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ownedSpace_
The vector space corresponding to the owned vector.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ghostedSpace_
The vector space corresponding to the ghosted vector.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
bool isInitialized_
A flag indicating whether or not the object has been initialized.
Teuchos::RCP< Epetra_Vector > ghostedVector_
The ghosted vector.
virtual void ghostToGlobal(int mem)
Communicate the ghosted data to the owned vector.
Teuchos::RCP< const Epetra_Map > ghostedMap_
The map corresponding to the ghosted vector.
virtual void initializeData()
Clear out the ghosted vector. // JMG: Is this right?
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get the ghosted vector (Thyra version).
Teuchos::RCP< const Epetra_Export > exporter_
The exporter used to communicate between the owned and ghosted vectors.
CombineMode getCombineMode() const
Get the combine mode, to be used by sub classes.