Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_EpetraVector.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef XPETRA_EPETRAVECTOR_HPP
11#define XPETRA_EPETRAVECTOR_HPP
12
13/* this file is automatically generated - do not edit (see script/epetra.py) */
14
16
17#include "Xpetra_Vector.hpp"
19#include "Xpetra_EpetraMap.hpp" //TMP
20#include "Xpetra_Utils.hpp"
23#include "Xpetra_Exceptions.hpp"
24
25#include <Epetra_Vector.h>
26
27#if defined(XPETRA_ENABLE_DEPRECATED_CODE)
28#ifdef __GNUC__
29#if defined(Xpetra_SHOW_DEPRECATED_WARNINGS)
30#warning "The header file Trilinos/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp is deprecated."
31#endif
32#endif
33#else
34#error "The header file Trilinos/packages/xpetra/src/Vector/Xpetra_EpetraVector.hpp is deprecated."
35#endif
36
37namespace Xpetra {
38
39// TODO: move that elsewhere
40template <class GlobalOrdinal, class Node>
41XPETRA_DEPRECATED Epetra_Vector &toEpetra(Vector<double, int, GlobalOrdinal, Node> &);
42
43template <class GlobalOrdinal, class Node>
44XPETRA_DEPRECATED const Epetra_Vector &toEpetra(const Vector<double, int, GlobalOrdinal, Node> &);
45//
46
47template <class EpetraGlobalOrdinal, class Node>
48class XPETRA_DEPRECATED EpetraVectorT
49 : public virtual Vector<double, int, EpetraGlobalOrdinal, Node>,
50 public EpetraMultiVectorT<EpetraGlobalOrdinal, Node> {
51 typedef double Scalar;
52 typedef int LocalOrdinal;
53 typedef EpetraGlobalOrdinal GlobalOrdinal;
54
55 public:
58
61
64
66 void meanValue(const Teuchos::ArrayView<Scalar> &means) const {}
67
69 void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {}
70
72 void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value) {}
73
75 void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {}
76
78 void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value) {}
79
82
84
85
87 explicit EpetraVectorT(const RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > &map, bool zeroOut = true)
88 : EpetraMultiVectorT<GlobalOrdinal, Node>(map, 1, zeroOut){};
89
90 // Commenting out since no definition provided in cpp.
92 // EpetraVectorT(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source);
93
95 virtual ~EpetraVectorT() {}
96
98
100
101
103 void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value){};
104
106 void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value){};
107
109 void replaceLocalValue(LocalOrdinal myRow, const Scalar &value){};
110
112 void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value){};
113
115
117
118
121
124
127
130
132 // Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const;
133
136
138
140
141
143 std::string description() const { return std::string(""); }
144
147
149
151
152
155 : EpetraMultiVectorT<GlobalOrdinal, Node>(vec) { // TODO: removed const of Epetra::Vector
157 "Xpetra::EpetraVector only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
158 }
159
161 Epetra_Vector *getEpetra_Vector() const { return NULL; /*return (*this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector())(0);*/ }
162 // RCP<Epetra_Vector> getEpetra_Vector() const { return this->EpetraMultiVectorT<GlobalOrdinal>::getEpetra_MultiVector()->getVectorNonConst(0); }
163
169
171
172 private:
173 // This private member is only used by the constructor EpetraVectorT(const RCP<EpetraMultiVectorT<GlobalOrdinal> > &mv, size_t j). The actual private member holding the Epetra vector (vec_) is in the base class (Xpetra:EpetraMultiVectorT)
174 // TODO remove this...
176
177}; // EpetraVectorT class
178
179// specialization on GO=int and Node=Serial
180#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
181template <>
183 : public virtual Vector<double, int, int, EpetraNode>, public EpetraMultiVectorT<int, EpetraNode> {
184 typedef double Scalar;
185 typedef int LocalOrdinal;
186 typedef int GlobalOrdinal;
188
189 public:
190 using EpetraMultiVectorT<GlobalOrdinal, Node>::dot; // overloading, not hiding
191 using EpetraMultiVectorT<GlobalOrdinal, Node>::norm1; // overloading, not hiding
192 using EpetraMultiVectorT<GlobalOrdinal, Node>::norm2; // overloading, not hiding
193 using EpetraMultiVectorT<GlobalOrdinal, Node>::normInf; // overloading, not hiding
194 using EpetraMultiVectorT<GlobalOrdinal, Node>::meanValue; // overloading, not hiding
195 using EpetraMultiVectorT<GlobalOrdinal, Node>::replaceGlobalValue; // overloading, not hiding
196 using EpetraMultiVectorT<GlobalOrdinal, Node>::sumIntoGlobalValue; // overloading, not hiding
197 using EpetraMultiVectorT<GlobalOrdinal, Node>::replaceLocalValue; // overloading, not hiding
198 using EpetraMultiVectorT<GlobalOrdinal, Node>::sumIntoLocalValue; // overloading, not hiding
199
201
202
204 explicit EpetraVectorT(const Teuchos::RCP<const Map<int, GlobalOrdinal, Node> > &map, bool zeroOut = true)
205 : EpetraMultiVectorT<GlobalOrdinal, Node>(map, 1, zeroOut) {}
206
207 // Commenting out since no definition provided in cpp.
209 // EpetraVectorT(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source);
210
212 virtual ~EpetraVectorT() {}
213
215
217
218
220 void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value) {
221 XPETRA_MONITOR("EpetraVectorT::replaceGlobalValue");
222 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->ReplaceGlobalValue(globalRow, 0, value);
223 }
224
226 void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value) {
227 XPETRA_MONITOR("EpetraVectorT::sumIntoGlobalValue");
228 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->SumIntoGlobalValue(globalRow, 0, value);
229 }
230
232 void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) {
233 XPETRA_MONITOR("EpetraVectorT::replaceLocalValue");
234 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->ReplaceMyValue(myRow, 0, value);
235 }
236
238 void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) {
239 XPETRA_MONITOR("EpetraVectorT::sumIntoLocalValue");
240 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->SumIntoMyValue(myRow, 0, value);
241 }
242
244
246
247
250 XPETRA_MONITOR("EpetraVectorT::dot");
251
252 XPETRA_DYNAMIC_CAST(const EpetraVectorT, a, tA, "This Xpetra::EpetraVectorT method only accept Xpetra::EpetraVectorT as input arguments.");
253 // return getEpetra_Vector()->Dot(*tA.getEpetra_Vector());
254
255 // other way: use the MultiVector Dot instead of VectorDot:
256 double r;
257 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->Epetra_MultiVector::Dot(*tA.getEpetra_MultiVector(), &r);
258 return r;
259 }
260
263 XPETRA_MONITOR("EpetraVectorT::norm1");
264 Scalar r;
266 return r;
267 }
268
271 XPETRA_MONITOR("EpetraVectorT::norm2");
272 Scalar r;
274 return r;
275 }
276
279 XPETRA_MONITOR("EpetraVectorT::normInf");
280 Scalar r;
282 return r;
283 }
284
286 // Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const;
287
290 XPETRA_MONITOR("EpetraVectorT::meanValue");
291 Scalar r;
293 return r;
294 }
295
297
299
300
302 std::string description() const {
303 XPETRA_MONITOR("EpetraVectorT::description");
304 // This implementation come from Epetra_Vector_def.hpp (without modification)
305 std::ostringstream oss;
307 oss << "{length=" << this->getGlobalLength()
308 << "}";
309 return oss.str();
310 }
311
314 XPETRA_MONITOR("EpetraVectorT::describe");
315
316 if (verbLevel > Teuchos::VERB_NONE) {
317 getEpetra_Vector()->Print(out);
318 }
319 }
321
323
324
327 : EpetraMultiVectorT<GlobalOrdinal, Node>(vec) {} // TODO: removed const of Epetra::Vector
328
331 // RCP<Epetra_Vector> getEpetra_Vector() const { return this->EpetraMultiVectorT<GlobalOrdinal>::getEpetra_MultiVector()->getVectorNonConst(0); }
332
337 : EpetraMultiVectorT<GlobalOrdinal, Node>(rcp((*mv)(j), false))
338 , // view of the vector number j. false == I do not own the data.
339 internalRefToBaseMV_(mv) // keep an internal reference to the initial MultiVector to avoid desallocation of the view.
340 {
341 // The view of the internal data of 'mv' is only valid until the destruction of 'mv'.
342 // The new vector hold an internal reference to 'mv' in order to keep the view valid after disappearance of 'mv' references in user code.
343 // This implements the logic of subArray rcp (as required by the Tpetra interface).
344 }
345
347
348 private:
349 // This private member is only used by the constructor EpetraVectorT(const RCP<EpetraMultiVectorT<GlobalOrdinal> > &mv, size_t j). The actual private member holding the Epetra vector (vec_) is in the base class (Xpetra:EpetraMultiVectorT)
351};
352#endif
353
354// specialization on GO=long long and Node=Serial
355#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
356template <>
357class EpetraVectorT<long long, EpetraNode>
358 : public virtual Vector<double, int, long long, EpetraNode>, public EpetraMultiVectorT<long long, EpetraNode> {
359 typedef double Scalar;
360 typedef int LocalOrdinal;
361 typedef long long GlobalOrdinal;
363
364 public:
365 using EpetraMultiVectorT<GlobalOrdinal, Node>::dot; // overloading, not hiding
366 using EpetraMultiVectorT<GlobalOrdinal, Node>::norm1; // overloading, not hiding
367 using EpetraMultiVectorT<GlobalOrdinal, Node>::norm2; // overloading, not hiding
368 using EpetraMultiVectorT<GlobalOrdinal, Node>::normInf; // overloading, not hiding
369 using EpetraMultiVectorT<GlobalOrdinal, Node>::meanValue; // overloading, not hiding
370 using EpetraMultiVectorT<GlobalOrdinal, Node>::replaceGlobalValue; // overloading, not hiding
371 using EpetraMultiVectorT<GlobalOrdinal, Node>::sumIntoGlobalValue; // overloading, not hiding
372 using EpetraMultiVectorT<GlobalOrdinal, Node>::replaceLocalValue; // overloading, not hiding
373 using EpetraMultiVectorT<GlobalOrdinal, Node>::sumIntoLocalValue; // overloading, not hiding
374
376
377
379 explicit EpetraVectorT(const Teuchos::RCP<const Map<int, GlobalOrdinal, Node> > &map, bool zeroOut = true)
380 : EpetraMultiVectorT<GlobalOrdinal, Node>(map, 1, zeroOut) {}
381
382 // Commenting out since no definition provided in cpp.
384 // EpetraVectorT(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source);
385
387 virtual ~EpetraVectorT() {}
388
390
392
393
395 void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value) {
396 XPETRA_MONITOR("EpetraVectorT::replaceGlobalValue");
397 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->ReplaceGlobalValue(globalRow, 0, value);
398 }
399
401 void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value) {
402 XPETRA_MONITOR("EpetraVectorT::sumIntoGlobalValue");
403 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->SumIntoGlobalValue(globalRow, 0, value);
404 }
405
407 void replaceLocalValue(LocalOrdinal myRow, const Scalar &value) {
408 XPETRA_MONITOR("EpetraVectorT::replaceLocalValue");
409 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->ReplaceMyValue(myRow, 0, value);
410 }
411
413 void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value) {
414 XPETRA_MONITOR("EpetraVectorT::sumIntoLocalValue");
415 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->SumIntoMyValue(myRow, 0, value);
416 }
417
419
421
422
425 XPETRA_MONITOR("EpetraVectorT::dot");
426
427 XPETRA_DYNAMIC_CAST(const EpetraVectorT, a, tA, "This Xpetra::EpetraVectorT method only accept Xpetra::EpetraVectorT as input arguments.");
428 // return getEpetra_Vector()->Dot(*tA.getEpetra_Vector());
429
430 // other way: use the MultiVector Dot instead of VectorDot:
431 double r;
432 this->EpetraMultiVectorT<GlobalOrdinal, Node>::getEpetra_MultiVector()->Epetra_MultiVector::Dot(*tA.getEpetra_MultiVector(), &r);
433 return r;
434 }
435
438 XPETRA_MONITOR("EpetraVectorT::norm1");
439 Scalar r;
441 return r;
442 }
443
446 XPETRA_MONITOR("EpetraVectorT::norm2");
447 Scalar r;
449 return r;
450 }
451
454 XPETRA_MONITOR("EpetraVectorT::normInf");
455 Scalar r;
457 return r;
458 }
459
461 // Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const;
462
465 XPETRA_MONITOR("EpetraVectorT::meanValue");
466 Scalar r;
468 return r;
469 }
470
472
474
475
477 std::string description() const {
478 XPETRA_MONITOR("EpetraVectorT::description");
479 // This implementation come from Epetra_Vector_def.hpp (without modification)
480 std::ostringstream oss;
482 oss << "{length=" << this->getGlobalLength()
483 << "}";
484 return oss.str();
485 }
486
489 XPETRA_MONITOR("EpetraVectorT::describe");
490
491 if (verbLevel > Teuchos::VERB_NONE) {
492 getEpetra_Vector()->Print(out);
493 }
494 }
496
498
499
502 : EpetraMultiVectorT<GlobalOrdinal, Node>(vec) {} // TODO: removed const of Epetra::Vector
503
506 // RCP<Epetra_Vector> getEpetra_Vector() const { return this->EpetraMultiVectorT<GlobalOrdinal>::getEpetra_MultiVector()->getVectorNonConst(0); }
507
512 : EpetraMultiVectorT<GlobalOrdinal, Node>(rcp((*mv)(j), false))
513 , // view of the vector number j. false == I do not own the data.
514 internalRefToBaseMV_(mv) // keep an internal reference to the initial MultiVector to avoid desallocation of the view.
515 {
516 // The view of the internal data of 'mv' is only valid until the destruction of 'mv'.
517 // The new vector hold an internal reference to 'mv' in order to keep the view valid after disappearance of 'mv' references in user code.
518 // This implements the logic of subArray rcp (as required by the Tpetra interface).
519 }
520
522
523 private:
524 // This private member is only used by the constructor EpetraVectorT(const RCP<EpetraMultiVectorT<GlobalOrdinal> > &mv, size_t j). The actual private member holding the Epetra vector (vec_) is in the base class (Xpetra:EpetraMultiVectorT)
526};
527#endif
528
529} // namespace Xpetra
530
531#endif // XPETRA_EPETRAVECTOR_HPP
#define XPETRA_MONITOR(funcName)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
virtual void Print(std::ostream &os) const
static const EVerbosityLevel verbLevel_default
virtual std::string description() const
RCP< Epetra_MultiVector > getEpetra_MultiVector() const
Get the underlying Epetra multivector.
global_size_t getGlobalLength() const
Global number of rows in the multivector.
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm1() const
Return 1-norm of this Vector.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
std::string description() const
Return a simple one-line description of this object.
Epetra_Vector * getEpetra_Vector() const
Get the underlying Epetra vector.
Scalar meanValue() const
Compute Weighted 2-norm (RMS Norm) of this Vector.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm2() const
Compute 2-norm of this Vector.
Scalar dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
Computes dot product of this Vector against input Vector x.
Teuchos::ScalarTraits< Scalar >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
const RCP< const Epetra_MultiVector > internalRefToBaseMV_
virtual ~EpetraVectorT()
Vector copy constructor.
EpetraVectorT(const Teuchos::RCP< Epetra_Vector > &vec)
EpetraMultiVectorT constructor to wrap a Epetra_Vector object.
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.
EpetraVectorT(const Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
EpetraVectorT(const RCP< Epetra_MultiVector > &mv, size_t j)
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
EpetraVectorT(const RCP< Epetra_MultiVector > &mv, size_t j)
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
const RCP< const Epetra_MultiVector > internalRefToBaseMV_
EpetraVectorT(const Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
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.
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.
Scalar meanValue() const
Compute Weighted 2-norm (RMS Norm) of this Vector.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
Teuchos::ScalarTraits< Scalar >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
Epetra_Vector * getEpetra_Vector() const
Get the underlying Epetra vector.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm1() const
Return 1-norm of this Vector.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm2() const
Compute 2-norm of this Vector.
EpetraVectorT(const Teuchos::RCP< Epetra_Vector > &vec)
EpetraMultiVectorT constructor to wrap a Epetra_Vector object.
Scalar dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
Computes dot product of this Vector against input Vector x.
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
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.
Scalar dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
Computes dot product of this Vector against input Vector x.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
void meanValue(const Teuchos::ArrayView< Scalar > &means) const
Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined...
EpetraGlobalOrdinal GlobalOrdinal
Teuchos::ScalarTraits< Scalar >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm1() const
Return 1-norm of this Vector.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
EpetraVectorT(const Teuchos::RCP< Epetra_Vector > &vec)
EpetraMultiVectorT constructor to wrap a Epetra_Vector object.
Scalar meanValue() const
Compute Weighted 2-norm (RMS Norm) of this Vector.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
EpetraVectorT(const RCP< Epetra_MultiVector > &mv, size_t j)
Teuchos::ScalarTraits< Scalar >::magnitudeType norm2() const
Compute 2-norm of this Vector.
std::string description() const
Return a simple one-line description of this object.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
const RCP< const Epetra_MultiVector > internalRefToBaseMV_
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
Epetra_Vector * getEpetra_Vector() const
Get the underlying Epetra vector.
EpetraVectorT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
virtual ~EpetraVectorT()
Vector copy constructor.
void dot(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const
Compute the dot product of each corresponding pair of vectors (columns) in A and B.
Exception throws to report errors in the internal logical of the program.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
static magnitudeType magnitude(T a)