52 template<
class EpetraGlobalOrdinal>
55 template<
class EpetraGlobalOrdinal>
58 template<
class EpetraGlobalOrdinal>
61 template<
class EpetraGlobalOrdinal>
64 template<
class EpetraGlobalOrdinal>
67 template<
class EpetraGlobalOrdinal>
70 template<
class EpetraGlobalOrdinal>
73 template<
class EpetraGlobalOrdinal>
76 template<
class EpetraGlobalOrdinal>
79 template<
class EpetraGlobalOrdinal>
82 template<
class EpetraGlobalOrdinal>
85 template<
class EpetraGlobalOrdinal>
88 template<
class EpetraGlobalOrdinal>
91 template<
class EpetraGlobalOrdinal>
96 template<
class EpetraGlobalOrdinal>
101 template<
class EpetraGlobalOrdinal>
105 int * data = vec_->Values();
106 int localLength = vec_->MyLength();
111 template<
class EpetraGlobalOrdinal>
115 int * data = vec_->Values();
116 int localLength = vec_->MyLength();
121 template<
class EpetraGlobalOrdinal>
129 template<
class EpetraGlobalOrdinal>
137 template<
class EpetraGlobalOrdinal>
145 template<
class EpetraGlobalOrdinal>
151 template<
class EpetraGlobalOrdinal>
157 template<
class EpetraGlobalOrdinal>
165 template<
class EpetraGlobalOrdinal>
166 void EpetraIntVectorT<EpetraGlobalOrdinal>::update(
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const int &beta,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &gamma) {
174 template<
class EpetraGlobalOrdinal>
177 template<
class EpetraGlobalOrdinal>
180 template<
class EpetraGlobalOrdinal>
183 template<
class EpetraGlobalOrdinal>
186 template<
class EpetraGlobalOrdinal>
189 template<
class EpetraGlobalOrdinal>
192 template<
class EpetraGlobalOrdinal>
193 void EpetraIntVectorT<EpetraGlobalOrdinal>::multiply(
Teuchos::ETransp transA,
Teuchos::ETransp transB,
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &beta) {
XPETRA_MONITOR(
"EpetraIntVectorT::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1,
Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
195 template<
class EpetraGlobalOrdinal>
201 template<
class EpetraGlobalOrdinal>
204 template<
class EpetraGlobalOrdinal>
207 template<
class EpetraGlobalOrdinal>
210 template<
class EpetraGlobalOrdinal>
213 template<
class EpetraGlobalOrdinal>
216 template<
class EpetraGlobalOrdinal>
221 std::ostringstream oss;
223 oss <<
"{length="<<this->getGlobalLength()
228 template<
class EpetraGlobalOrdinal>
246 template<
class EpetraGlobalOrdinal>
254 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
255 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
259 template<
class EpetraGlobalOrdinal>
267 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
268 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
272 template<
class EpetraGlobalOrdinal>
280 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
281 int err = vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
285 template<
class EpetraGlobalOrdinal>
293 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
294 int err = vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
298 template<
class EpetraGlobalOrdinal>
303 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
305 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: " 306 "The left-hand side (LHS) of the assignment has a different type than " 307 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT " 308 "(which means it wraps an Epetra_IntVector), but the RHS has some " 309 "other type. This probably means that the RHS wraps either an " 310 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " 311 "does not currently implement assignment from a Tpetra object to an " 312 "Epetra object, though this could be added with sufficient interest.");
318 rhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 319 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of " 320 "the assignment) has a null RCP<Epetra_IntVector> inside. Please " 321 "report this bug to the Xpetra developers.");
323 lhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 324 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the " 325 "assignment has a null RCP<Epetra_IntVector> inside. Please report " 326 "this bug to the Xpetra developers.");
332 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 336 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
std::string description() const
Return a simple one-line description of this object.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal > > &graph)
void elementWiseMultiply(int scalarAB, const Vector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, int scalarThis)
Element-wise multiply of a Vector A with a EpetraMultiVector B.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
void reciprocal(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
void update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
void doExport(const DistObject< int, int, GlobalOrdinal > &dest, const Import< int, GlobalOrdinal > &importer, CombineMode CM)
void doImport(const DistObject< int, int, GlobalOrdinal > &source, const Import< int, GlobalOrdinal > &importer, CombineMode CM)
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
EpetraGlobalOrdinal GlobalOrdinal
int meanValue() const
Compute mean (average) value of this Vector.
virtual std::string description() const
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
Exception throws when you call an unimplemented method of Xpetra.
Teuchos::ArrayRCP< const int > getData(size_t j) const
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
Teuchos::ScalarTraits< int >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const
Compute Weighted 2-norm (RMS Norm) of this Vector.
void setSeed(unsigned int seed)
Set seed for Random function.
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
CombineMode
Xpetra::Combine Mode enumerable type.
#define XPETRA_MONITOR(funcName)
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &beta)
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
int maxValue() const
Compute max value of this Vector.