78 BaseMap_( Source.BaseMap_ ),
79 Offset_( Source.Offset_ )
91 long long IndexOffset = GlobalBlockRow *
Offset_;
99 std::cout <<
"Error in BlockMultiVector::GetBlock: " << i <<
" "
103 for (
int j=0; j<NumVectors(); j++)
104 BaseVector[j][i] = (*
this)[j][localIndex];
113 long long IndexOffset = GlobalBlockRow *
Offset_;
120 if (localIndex==-1) {
121 std::cout <<
"Error in BlockMultiVector::GetBlock: " << i <<
" "
125 for (
int j=0; j<NumVectors(); j++)
126 (*
this)[j][localIndex] = BaseVector[j][i];
137 int numVecs = NumVectors();
138 double **pointers = Pointers();
139 double **block_pointers =
new double*[numVecs];
140 for (
int i=0; i<numVecs; i++)
141 block_pointers[i] = pointers[i]+offset;
145 delete [] block_pointers;
154 int numVecs = NumVectors();
155 double **pointers = Pointers();
156 double **block_pointers =
new double*[numVecs];
157 for (
int i=0; i<numVecs; i++)
158 block_pointers[i] = pointers[i]+offset;
162 delete [] block_pointers;
int ExtractBlockValues(Epetra_MultiVector &BaseVec, long long BlockRow) const
Extract a single block from a Block Vector: block row is global, not a stencil value.
virtual ~BlockMultiVector()
Destructor.
const Epetra_BlockMap & GetBaseMap() const
Return base map.
int NumMyElements() const
long long GID64(int LID) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual const Epetra_BlockMap & Map() const =0
BlockMultiVector(const Epetra_BlockMap &BaseMap, const Epetra_BlockMap &GlobalMap, int NumVectors)
BlockMultiVector constuctor with one block row per processor.
int LoadBlockValues(const Epetra_MultiVector &BaseVec, long long BlockRow)
Load a single block into a Block Vector: block row is global, not a stencil value.
Teuchos::RCP< const Epetra_MultiVector > GetBlock(long long BlockRow) const
Return Epetra_MultiVector for given block row.