#include <PlayaLoadableVector.hpp>
Public Member Functions | |
virtual | ~LoadableVector () |
virtual void | setElement (int globalIndex, const Scalar &value)=0 |
virtual void | addToElement (int globalIndex, const Scalar &value)=0 |
virtual void | setElements (int numElems, const int *globalIndices, const Scalar *values) |
virtual void | addToElements (int numElems, const int *globalIndices, const Scalar *values) |
virtual void | finalizeAssembly () |
A vector type that will be used in a context where loading is required should multiply inherit from both VectorBase andLoadableVector.
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 37 of file PlayaLoadableVector.hpp.
virtual Playa::LoadableVector< Scalar >::~LoadableVector | ( | ) | [inline, virtual] |
virtual dtor
Definition at line 41 of file PlayaLoadableVector.hpp.
virtual void Playa::LoadableVector< Scalar >::setElement | ( | int | globalIndex, | |
const Scalar & | value | |||
) | [pure virtual] |
set a single element at the given global index
Implemented in Playa::EpetraVector, and Playa::SerialVector.
virtual void Playa::LoadableVector< Scalar >::addToElement | ( | int | globalIndex, | |
const Scalar & | value | |||
) | [pure virtual] |
add to the existing value of a single element at the given global index
Implemented in Playa::EpetraVector, and Playa::SerialVector.
void Playa::LoadableVector< Scalar >::setElements | ( | int | numElems, | |
const int * | globalIndices, | |||
const Scalar * | values | |||
) | [inline, virtual] |
set a group of elements
Reimplemented in Playa::EpetraVector, and Playa::SerialVector.
Definition at line 70 of file PlayaLoadableVector.hpp.
void Playa::LoadableVector< Scalar >::addToElements | ( | int | numElems, | |
const int * | globalIndices, | |||
const Scalar * | values | |||
) | [inline, virtual] |
add to a group of elements
Reimplemented in Playa::EpetraVector, and Playa::SerialVector.
Definition at line 84 of file PlayaLoadableVector.hpp.
virtual void Playa::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 Playa::EpetraVector, and Playa::SerialVector.
Definition at line 63 of file PlayaLoadableVector.hpp.