99 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
106 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
156 template<
typename int_type>
158 bool IndicesGlobal,
bool SumInto) {
164 for (
int i=0; i<NumEntries; i++) {
166 cur_index =
Map().
LID(Indices[i]);
168 cur_index = Indices[i];
170 if (
Map().MyLID((
int) cur_index)) {
175 Values_[entry+BlockOffset] += values[i];
177 Values_[entry+BlockOffset] = values[i];
187 bool IndicesGlobal,
bool SumInto) {
188 if(
Map().GlobalIndicesInt())
189 return TChangeValues<int>(NumEntries, BlockOffset, values, Indices, IndicesGlobal, SumInto);
191 throw ReportError(
"Epetra_Vector::ChangeValues int version called for a vector that is not int.", -1);
194 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
196 bool IndicesGlobal,
bool SumInto) {
197 if(
Map().GlobalIndicesLongLong())
198 return TChangeValues<long long>(NumEntries, BlockOffset, values, Indices, IndicesGlobal, SumInto);
200 throw ReportError(
"Epetra_Vector::ChangeValues long long version called for a vector that is not long long.", -1);
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
int SumIntoGlobalValues(int NumEntries, const double *Values, const int *Indices)
Sum values into a vector with a given indexed list of values, indices are in global index space...
virtual ~Epetra_Vector()
Epetra_Vector destructor.
virtual void SetLabel(const char *const Label)
Epetra_Object Label definition using char *.
#define EPETRA_CHK_ERR(a)
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
int ExtractCopy(double *A, int MyLDA) const
Put multi-vector values into user-provided two-dimensional array.
int ReplaceMyValues(int NumEntries, const double *Values, const int *Indices)
Replace values in a vector with a given indexed list of values, indices are in local index space...
int ChangeValues(int NumEntries, int BlockOffset, const double *Values, const int *Indices, bool IndicesGlobal, bool SumInto)
int ReplaceGlobalValues(int NumEntries, const double *Values, const int *Indices)
Replace values in a vector with a given indexed list of values, indices are in global index space...
int SumIntoMyValues(int NumEntries, const double *Values, const int *Indices)
Sum values into a vector with a given indexed list of values, indices are in local index space...
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
int ExtractView(double **A, int *MyLDA) const
Set user-provided addresses of A and MyLDA.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
Epetra_Vector(const Epetra_BlockMap &Map, bool zeroOut=true)
Basic Epetra_Vector constuctor.
int ExtractCopy(double *V) const
Put vector values into user-provided array.
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
int TChangeValues(int NumEntries, int BlockOffset, const double *Values, const int_type *Indices, bool IndicesGlobal, bool SumInto)
int ExtractView(double **V) const
Set user-provided address of V.
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.