#include <Vector.H>
Vector is a resizable one-dimensional array with constant-time random access and range checking. The template type T must have a default constructor, a copy constructor, and an assignment operator.
Public Member Functions | |
Vector () | |
virtual | ~Vector () |
Vector (const Vector< T > &invec) | |
Vector (Vector< T > &&a_invec) noexcept | |
Vector (const std::vector< T > &invec) | |
Vector< T > & | operator= (const std::vector< T > &invec) |
Vector< T > & | operator= (Vector< T > &&a_invec) |
Vector< T > & | operator= (const Vector< T > &invec) |
Vector< T > & | assign (const T &inval) |
assign a scalar to every element of the vector | |
Vector (unsigned int isize) | |
void | clear () |
size_t | size () const |
Vector (unsigned int isize, const T &value) | |
T & | operator[] (unsigned int n) |
const T & | operator[] (unsigned int n) const |
T & | front () |
T & | back () |
void | pop_back () |
const T & | back () const |
void | swap (Vector< T > &other) |
void | push_back (const T &in) |
void | push_back (T &&in) |
void | append (const Vector< T > &invec) |
void | resize (unsigned int isize) |
void | reserve (size_t isize) |
size_t | capacity () const |
void | resize (unsigned int isize, const T &value) |
void | sort () |
std::vector< T > & | stdVector () |
Returns std::vector under the hood. | |
const std::vector< T > & | constStdVector () const |
Private Member Functions | |
unsigned int | initFunc () |
Private Attributes | |
std::vector< T > | v |
Default constructor. Creates a Vector of zero length with null data.
Destructor.
Referenced by GraphNode::clear().
conversion constructor
assign a scalar to every element of the vector
[NOTE: cant use operator=() for this because it would be ambiguous with the (int) constructor for number T types.]
Referenced by MultilevelLinearOp< T >::assign(), and BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::computeDiffusion().
void Vector< T >::clear | ( | ) | [inline] |
Referenced by CodimBox< S >::clear(), AMRMultiGrid< T >::clear(), FASMultiGrid< T >::cycle(), MultiGrid< T >::oneCycle(), AMRMultiGrid< T >::relaxOnlyHomogeneous(), MultiGrid< T >::solve(), FASMultiGrid< T >::solve(), AMRMultiGrid< T >::solveNoInit(), AMRMultiGrid< T >::solveNoInitResid(), and AMRFASMultiGrid< T >::VCycle().
size_t Vector< T >::size | ( | ) | const [inline] |
size function. returns current size of Vector
Referenced by IFidTable::add(), IFid::aggregate(), LayoutData< T >::allocate(), BoxLayoutData< T >::allocateGhostVector(), AMRTGA< T >::AMRTGA(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::append(), IFid::append(), AggStencil< srcData_t, dstData_t >::apply(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::assign(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::BaseLevelHeatSolver(), blockWrite(), blockWriteBufferToFile(), AggStencil< srcData_t, dstData_t >::cache(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::clear(), MultiGrid< T >::clear(), CodimBox< S >::clear(), BoxLayoutData< T >::clear(), AMRMultiGrid< T >::clear(), AMRFASMultiGrid< T >::clear_private(), MinimalCCCM< dim >::computeRhs(), ComputeCutCellMoments< dim >::computeRhs(), MiniIFFAB< T >::copy(), AMRTGA< T >::createData(), dataSize(), BaseEBFaceFAB< double >::dataType(), TreeIntVectSetIterator::define(), MultilevelLinearOp< T >::define(), MiniIFFAB< T >::define(), RK4DenseOutput< Soln, Rhs, EXOP >::denseOutputCoefs(), ARK4DenseOutput< Soln, Rhs, IMEXOp >::denseOutputCoefs(), MultilevelLinearOp< T >::dotProduct(), ShiftIterator::end(), LSProblem< dim >::fillMap(), MiniIVFAB< T >::forall(), gatherBoxesAndOffsets(), AMRMultiGrid< T >::getAllOperators(), ParmParse::getarr(), MiniIFFAB< T >::getFaceSubset(), MiniIFFAB< T >::getIndex(), AMRMultiGrid< T >::getInfo(), getOffsets(), AMRMultiGrid< T >::getOperatorsMG(), AMRMultiGrid< T >::getOperatorsOp(), MiniIFFAB< T >::linearIn(), CodimBox< S >::linearIn(), BaseIVFAB< T >::linearIn(), BaseIFFAB< T >::linearIn(), linearListOut(), linearListSize(), MiniIFFAB< T >::linearOut(), CodimBox< S >::linearOut(), BaseIVFAB< T >::linearOut(), BaseIFFAB< T >::linearOut(), BaseEBFaceFAB< double >::offset(), ShiftIterator::ok(), MomentIterator< D, P >::ok(), TagSet::ok(), CopyIterator::ok(), FASMultiGrid< T >::oneCycle(), operator<<(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::operator=(), IFid::operator==(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::operator[](), IFidTable::operator[](), MultilevelLinearOp< T >::preCond(), ParmParse::queryarr(), read(), regionGather(), AMRMultiGrid< T >::relaxOnlyHomogeneous(), AMRTGA< T >::resetAlphaAndBeta(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::resetSolverAlphaAndBeta(), MultilevelLinearOp< T >::residual(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::resize(), VarCoefStencil::setAllVariables(), FaceStencil::setAllVariables(), VoFStencil::setAllVariables(), BaseEBCellFAB< T >::setCoveredCellVal(), BaseEBFaceFAB< T >::setCoveredFaceVal(), AMRMultiGrid< T >::setMGCycle(), IFData< dim >::setNormalDerivatives(), IndexedMoments< Dim, P >::setRegular(), AMRMultiGrid< T >::setSolverParameters(), AMRTGA< T >::setTime(), VoFIterator::size(), MomentIterator< D, P >::size(), MiniIFFAB< T >::size(), IFidTable::size(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::size(), BaseIVFAB< T >::size(), BaseIFFAB< T >::size(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::solveHelm(), AMRMultiGrid< T >::solveNoInit(), AMRFASMultiGrid< T >::solveNoInit(), AMRMultiGrid< T >::solveNoInitResid(), AggStencil< srcData_t, dstData_t >::uncache(), BaseLevelCrankNicolson< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister >::updateSoln(), BaseLevelBackwardEuler< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSoln(), BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSolnWithTimeDependentOp(), BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSolnWithTimeIndependentOp(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::Vector(), write(), AMRTGA< T >::~AMRTGA(), NWOViscousTensorOpFactory::~NWOViscousTensorOpFactory(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::~Vector(), and ViscousTensorOpFactory::~ViscousTensorOpFactory().
T& Vector< T >::operator[] | ( | unsigned int | n | ) | [inline] |
Returns a modifiable lvalue reference to the value of the given element in this Vector. It is an error if n < 0 or n >= this->size(). \
{ Arguments:}\ n (not modified) index of desired element.\ { Returns:}\ modifiable reference to value in Vector at index n.\ { This:}\ ----- This object is modified if the returned reference is assigned a new value -----
const T& Vector< T >::operator[] | ( | unsigned int | n | ) | const [inline] |
T& Vector< T >::front | ( | ) | [inline] |
T& Vector< T >::back | ( | ) | [inline] |
Referenced by MultiGrid< T >::define().
void Vector< T >::pop_back | ( | ) | [inline] |
const T& Vector< T >::back | ( | ) | const [inline] |
void Vector< T >::push_back | ( | const T & | in | ) | [inline] |
Referenced by IFidTable::add(), AMRMultiGrid< LevelData< T > >::addInspector(), IFid::append(), MultiGrid< T >::define(), AMRMultiGrid< T >::getAllOperators(), MiniIFFAB< T >::getFaceSubset(), getOffsets(), AMRMultiGrid< T >::getOperatorsOp(), AMRMultiGrid< T >::outputAMR(), ComputeCutCellMoments< dim >::refine(), and regionGather().
void Vector< T >::push_back | ( | T && | in | ) | [inline] |
Modifies this Vector by appending the elements of the argument Vector. The new Vector will have a size of this->size() + invec.size() (where this Vector is considered before the append is performed). The first element of invec will have index this->size(), the second element will have index this->size()+1, etc.\
{ Arguments:}\ invec (not modified): Vector whose elements to append to this Vector.\ { This:}\ -------The object is modified----------
Referenced by AMRMultiGrid< T >::getAllOperators().
void Vector< T >::resize | ( | unsigned int | isize | ) | [inline] |
Referenced by AggStencil< srcData_t, dstData_t >::AggStencil(), LayoutData< T >::allocate(), BoxLayoutData< T >::allocateGhostVector(), AMRTGA< T >::AMRTGA(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::BaseLevelHeatSolver(), blockLocalOffsets(), MultiGrid< T >::clear(), MiniIFFAB< T >::clear(), AMRMultiGrid< T >::clear(), AMRTGA< T >::createData(), dataTypes(), TreeIntVectSetIterator::define(), MultilevelLinearOp< T >::define(), MultiGrid< T >::define(), CodimBox< S >::define(), AMRMultiGrid< T >::define(), AMRFASMultiGrid< T >::define(), gather(), gatherBoxesAndOffsets(), ParmParse::getarr(), MiniIFFAB< T >::getFaceSubset(), LSProblem< dim >::invertNormalEq(), linearListIn(), FASMultiGrid< T >::oneCycle(), ParmParse::queryarr(), read(), regionGather(), IndexedMoments< Dim, P >::setMultiIndicies(), VolData::setToCovered(), VolData::setToRegular(), and Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::Vector().
void Vector< T >::reserve | ( | size_t | isize | ) | [inline] |
size_t Vector< T >::capacity | ( | ) | const [inline] |
void Vector< T >::resize | ( | unsigned int | isize, | |
const T & | value | |||
) | [inline] |
void Vector< T >::sort | ( | ) | [inline] |
std::vector<T>& Vector< T >::stdVector | ( | ) | [inline] |
const std::vector<T>& Vector< T >::constStdVector | ( | ) | const [inline] |
unsigned int Vector< T >::initFunc | ( | ) | [private] |
Referenced by Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::append(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::assign(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::back(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::capacity(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::clear(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::constStdVector(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::front(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::operator=(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::operator[](), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::pop_back(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::push_back(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::reserve(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::resize(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::size(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::sort(), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::stdVector(), and Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::swap().