Chaste
Release::3.4
|
#include <DistributedVector.hpp>
Public Member Functions | |
Chunk (DistributedVector parallelVec, unsigned chunk) | |
double & | operator[] (unsigned globalIndex) throw (DistributedVectorException) |
double & | operator[] (Iterator index) throw (DistributedVectorException) |
Private Attributes | |
unsigned | mOffset |
double * | mpVec |
unsigned | mLo |
unsigned | mHi |
Provide access to a particular chunk of a chunked vector.
A chunked vector has multiple types of information encoded within a single vector, with a layout like [x_1, x_2, ..., x_n, y_1, y_2, ... y_n]. This class provides easy access to, for example, the x values.
Definition at line 264 of file DistributedVector.hpp.
|
inline |
Constructor.
parallelVec | chunked vector |
chunk | number of this chunk within the vector starting from 0 |
Definition at line 278 of file DistributedVector.hpp.
References DistributedVector::GetHigh(), DistributedVector::GetLow(), mHi, mLo, mOffset, DistributedVector::mpVec, mpVec, and DistributedVector::mSizeMultiplier.
|
inline |
Access a particular element of the chunk if on this processor. For use in tests. Will throw a DistributedVectorException if the specified element is not on this process.
globalIndex | index within the chunk |
Definition at line 295 of file DistributedVector.hpp.
|
inline |
index |
Definition at line 309 of file DistributedVector.hpp.
|
private |
One above the last entry owned by the current processor.
Definition at line 269 of file DistributedVector.hpp.
Referenced by Chunk(), and operator[]().
|
private |
The first entry owned by the current processor.
Definition at line 268 of file DistributedVector.hpp.
Referenced by Chunk(), and operator[]().
|
private |
The start of this chunk within the locally-owned part of the vector.
Definition at line 266 of file DistributedVector.hpp.
Referenced by Chunk(), and operator[]().
|
private |
The local part of the underlying PETSc vector.
Definition at line 267 of file DistributedVector.hpp.
Referenced by Chunk(), and operator[]().