LoadableVector defines an interface through which elements can be loaded into a vector. More...
Public Member Functions | |
| virtual | ~LoadableVector () |
| virtual dtor | |
| virtual void | setElement (OrdType globalIndex, const Scalar &value)=0 |
| set a single element at the given global index | |
| virtual void | addToElement (OrdType globalIndex, const Scalar &value)=0 |
| add to the existing value of a single element at the given global index | |
| virtual void | setElements (OrdType numElems, const OrdType *globalIndices, const Scalar *values) |
| set a group of elements | |
| virtual void | addToElements (OrdType numElems, const OrdType *globalIndices, const Scalar *values) |
| add to a group of elements | |
| virtual void | finalizeAssembly () |
| Do whatever finalization steps are needed by the implementation, for instance, synchronizing border elements. | |
LoadableVector defines an interface through which elements can be loaded into a vector.
Element loading is used extensively by application codes in creating vectors, but should never be used by high-performance solver codes; this capability is therefore in TSFExtended rather than Thyra.
A TSFExtended vector type that will be used in a context where loading is required should multiply inherit from both Thyra::VectorBase and TSFExtended::LoadableVector.
Elements can by loaded one at a time or in batches. The methods to load single elements arew pure virtual and thus must be defined by derived classes. Loading in batches will usually be more efficient provided the underlying vector implementation supports it. For those types not supporting batch loading, LoadableVector provides default batch loading functions which delegate to single-element loading.
Elements can by loaded either by setting a value, or adding to an existing value. The latter will typically by used in finite-element codes.
Definition at line 63 of file TSFLoadableVector.hpp.
| virtual TSFExtended::LoadableVector< Scalar >::~LoadableVector | ( | ) | [inline, virtual] |
virtual dtor
Definition at line 67 of file TSFLoadableVector.hpp.
| virtual void TSFExtended::LoadableVector< Scalar >::addToElement | ( | OrdType | globalIndex, |
| const Scalar & | value | ||
| ) | [pure virtual] |
add to the existing value of a single element at the given global index
Implemented in TSFExtended::EpetraMultiVector, TSFExtended::EpetraVector, TSFExtended::SerialVector, TSFExtended::IndexableVector< Scalar >, TSFExtended::LoadableBlockVector, and TSFExtended::IndexableVector< double >.
| void TSFExtended::LoadableVector< Scalar >::addToElements | ( | OrdType | numElems, |
| const OrdType * | globalIndices, | ||
| const Scalar * | values | ||
| ) | [inline, virtual] |
add to a group of elements
Definition at line 110 of file TSFLoadableVector.hpp.
| virtual void TSFExtended::LoadableVector< Scalar >::finalizeAssembly | ( | ) | [inline, virtual] |
Do whatever finalization steps are needed by the implementation, for instance, synchronizing border elements.
The default implementation is a no-op.
Reimplemented in TSFExtended::EpetraMultiVector, TSFExtended::EpetraVector, and TSFExtended::SerialVector.
Definition at line 89 of file TSFLoadableVector.hpp.
| virtual void TSFExtended::LoadableVector< Scalar >::setElement | ( | OrdType | globalIndex, |
| const Scalar & | value | ||
| ) | [pure virtual] |
set a single element at the given global index
Implemented in TSFExtended::EpetraMultiVector, TSFExtended::EpetraVector, TSFExtended::SerialVector, TSFExtended::IndexableVector< Scalar >, TSFExtended::LoadableBlockVector, and TSFExtended::IndexableVector< double >.
| void TSFExtended::LoadableVector< Scalar >::setElements | ( | OrdType | numElems, |
| const OrdType * | globalIndices, | ||
| const Scalar * | values | ||
| ) | [inline, virtual] |
set a group of elements
Definition at line 96 of file TSFLoadableVector.hpp.