44 #include "Epetra_Map.h"
45 #include "Epetra_Comm.h"
76 BaseMap_( Source.BaseMap_ ),
77 Offset_( Source.Offset_ )
89 long long IndexOffset = GlobalBlockRow *
Offset_;
97 std::cout <<
"Error in BlockVector::GetBlock: " << i <<
" "
98 << IndexOffset <<
" " <<
BaseMap_.GID64(i) << std::endl;
101 BaseVector[i] = Values_[localIndex];
110 long long IndexOffset = GlobalBlockRow *
Offset_;
117 if (localIndex==-1) {
118 std::cout <<
"Error in BlockVector::GetBlock: " << i <<
" "
119 << IndexOffset <<
" " <<
BaseMap_.GID64(i) << std::endl;
122 (*this)[localIndex] = BaseVector[i];
128 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
130 int* Indices,
int GlobalBlockRow)
132 long long IndexOffset = GlobalBlockRow *
Offset_;
137 for (
int i=0; i<NumIndices; i++) {
138 localIndex = this->
Map().
LID((IndexOffset + Indices[i]));
139 if (localIndex==-1) {
140 std::cout <<
"Error in BlockVector::BlockSumIntoGlobalValues: " << i
141 <<
" " << IndexOffset <<
" " << Indices[i] << std::endl;
144 (*this)[localIndex] += theValues[i];
151 int* Indices,
int GlobalBlockRow)
153 long long IndexOffset = GlobalBlockRow *
Offset_;
158 for (
int i=0; i<NumIndices; i++) {
159 localIndex = this->
Map().
LID((IndexOffset + Indices[i]));
160 if (localIndex==-1) {
161 std::cout <<
"Error in BlockVector::BlockReplaceGlobalValues: " << i
162 <<
" " << IndexOffset <<
" " << Indices[i] << std::endl;
165 (*this)[localIndex] = theValues[i];
172 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
174 long long* Indices,
long long GlobalBlockRow)
176 long long IndexOffset = GlobalBlockRow *
Offset_;
181 for (
int i=0; i<NumIndices; i++) {
182 localIndex = this->
Map().
LID((IndexOffset + Indices[i]));
183 if (localIndex==-1) {
184 std::cout <<
"Error in BlockVector::BlockSumIntoGlobalValues: " << i
185 <<
" " << IndexOffset <<
" " << Indices[i] << std::endl;
188 (*this)[localIndex] += theValues[i];
195 long long* Indices,
long long GlobalBlockRow)
197 long long IndexOffset = GlobalBlockRow *
Offset_;
202 for (
int i=0; i<NumIndices; i++) {
203 localIndex = this->
Map().
LID((IndexOffset + Indices[i]));
204 if (localIndex==-1) {
205 std::cout <<
"Error in BlockVector::BlockReplaceGlobalValues: " << i
206 <<
" " << IndexOffset <<
" " << Indices[i] << std::endl;
209 (*this)[localIndex] = theValues[i];
216 Teuchos::RCP<const Epetra_Vector>
224 Teuchos::RCP<Epetra_Vector>