Playa::LoadableVector< Scalar > Class Template Reference

#include <PlayaLoadableVector.hpp>

List of all members.

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 ()


Detailed Description

template<class Scalar>
class Playa::LoadableVector< Scalar >

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.

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.

Author:
Kevin Long (kevin.long@ttu.edu)

Definition at line 37 of file PlayaLoadableVector.hpp.


Constructor & Destructor Documentation

template<class Scalar>
virtual Playa::LoadableVector< Scalar >::~LoadableVector (  )  [inline, virtual]

virtual dtor

Definition at line 41 of file PlayaLoadableVector.hpp.


Member Function Documentation

template<class Scalar>
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.

template<class Scalar>
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.

template<class Scalar>
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.

template<class Scalar>
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.

template<class Scalar>
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.


The documentation for this class was generated from the following file:

doxygen