89 int * data =
vec_->Values();
90 int localLength =
vec_->MyLength();
98 int * data =
vec_->Values();
99 int localLength =
vec_->MyLength();
134 void EpetraIntVector::update(
const int &alpha,
const MultiVector<int,int,int> &A,
const int &beta,
const MultiVector<int,int,int> &B,
const int &gamma) {
154 void EpetraIntVector::multiply(
Teuchos::ETransp transA,
Teuchos::ETransp transB,
const int &alpha,
const MultiVector<int,int,int> &A,
const MultiVector<int,int,int> &B,
const int &beta) {
XPETRA_MONITOR(
"EpetraIntVector::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1,
Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
176 std::ostringstream oss;
208 XPETRA_DYNAMIC_CAST(
const EpetraImport, importer, tImporter,
"Xpetra::EpetraIntVector::doImport only accept Xpetra::EpetraImport as input arguments.");
210 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
211 int err =
vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
220 XPETRA_DYNAMIC_CAST(
const EpetraImport, importer, tImporter,
"Xpetra::EpetraIntVector::doImport only accept Xpetra::EpetraImport as input arguments.");
222 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
223 int err =
vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
232 XPETRA_DYNAMIC_CAST(
const EpetraExport, exporter, tExporter,
"Xpetra::EpetraIntVector::doImport only accept Xpetra::EpetraImport as input arguments.");
234 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
235 int err =
vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
244 XPETRA_DYNAMIC_CAST(
const EpetraExport, exporter, tExporter,
"Xpetra::EpetraIntVector::doImport only accept Xpetra::EpetraImport as input arguments.");
246 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
247 int err =
vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
void reciprocal(const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,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.
void elementWiseMultiply(int scalarAB, const Vector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &B, int scalarThis)
Element-wise multiply of a Vector A with a EpetraMultiVector 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.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void update(const int &alpha, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const int &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
std::string description() const
Return a simple one-line description of this object.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::ArrayRCP< const int > getData(size_t j) const
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
void doExport(const DistObject< int, int, int > &dest, const Import< int, int > &importer, CombineMode CM)
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &B, const int &beta)
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, int > > &graph)
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
int dot(const Vector< int, int, int > &a) const
TODO missing comment.
void setSeed(unsigned int seed)
Set seed for Random function.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
virtual std::string description() const
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
Exception throws when you call an unimplemented method of Xpetra.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
void doImport(const DistObject< int, int, int > &source, const Import< int, int > &importer, CombineMode CM)
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
int maxValue() const
Compute max value of this Vector.
void abs(const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
int meanValue() const
Compute mean (average) value of this Vector.
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
CombineMode
Xpetra::Combine Mode enumerable type.
Teuchos::ScalarTraits< int >::magnitudeType normWeighted(const Vector< int, int, int > &weights) const
Compute Weighted 2-norm (RMS Norm) of this Vector.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
#define XPETRA_MONITOR(funcName)
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
RCP< Epetra_IntVector > vec_