#include <DistributedVector.hpp>
Public Member Functions | |
Stripe (DistributedVector parallelVec, unsigned stripe) | |
DistributedVectorFactory * | GetFactory () |
double & | operator[] (unsigned globalIndex) throw (DistributedVectorException) |
double & | operator[] (Iterator index) throw (DistributedVectorException) |
Private Attributes | |
unsigned | mStride |
unsigned | mStripe |
double * | mpVec |
unsigned | mLo |
unsigned | mHi |
DistributedVectorFactory * | mpFactory |
Provide access to a particular stripe of a striped vector.
A striped vector has multiple types of information encoded within a single vector, with a layout like [x_1, y_1, z_1, x_2, y_2, z_2, ... x_n, y_n, z_n]. This class provides easy access to, for example, the x values.
Definition at line 166 of file DistributedVector.hpp.
DistributedVector::Stripe::Stripe | ( | DistributedVector | parallelVec, | |
unsigned | stripe | |||
) | [inline] |
Constructor.
parallelVec | striped vector | |
stripe | number of this stripe within the vector starting from 0 |
Definition at line 182 of file DistributedVector.hpp.
References DistributedVector::GetFactory(), DistributedVector::GetHigh(), DistributedVector::GetLow(), mHi, mLo, mpFactory, DistributedVector::mpVec, mpVec, DistributedVector::mSizeMultiplier, mStride, and mStripe.
DistributedVectorFactory* DistributedVector::Stripe::GetFactory | ( | ) | [inline] |
Definition at line 196 of file DistributedVector.hpp.
References mpFactory.
Referenced by ParallelColumnDataWriter::PutVectorStripe().
double& DistributedVector::Stripe::operator[] | ( | Iterator | index | ) | throw (DistributedVectorException) [inline] |
index |
Definition at line 222 of file DistributedVector.hpp.
double& DistributedVector::Stripe::operator[] | ( | unsigned | globalIndex | ) | throw (DistributedVectorException) [inline] |
Access a particular element of the stripe 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 stripe |
Definition at line 209 of file DistributedVector.hpp.
unsigned DistributedVector::Stripe::mHi [private] |
One above the last entry owned by the current processor.
Definition at line 172 of file DistributedVector.hpp.
Referenced by operator[](), and Stripe().
unsigned DistributedVector::Stripe::mLo [private] |
The first entry owned by the current processor.
Definition at line 171 of file DistributedVector.hpp.
Referenced by operator[](), and Stripe().
The factory that created our parent vector.
Definition at line 173 of file DistributedVector.hpp.
Referenced by GetFactory(), and Stripe().
double* DistributedVector::Stripe::mpVec [private] |
The local part of the underlying PETSc vector.
Definition at line 170 of file DistributedVector.hpp.
Referenced by operator[](), and Stripe().
unsigned DistributedVector::Stripe::mStride [private] |
Number of types of information in the vector.
Definition at line 168 of file DistributedVector.hpp.
Referenced by operator[](), and Stripe().
unsigned DistributedVector::Stripe::mStripe [private] |
The number of this stripe within the vector starting from 0.
Definition at line 169 of file DistributedVector.hpp.
Referenced by operator[](), and Stripe().