fei::Vector_Local Class Reference

Inheritance diagram for fei::Vector_Local:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Vector_Local (fei::SharedPtr< fei::VectorSpace > vecSpace)
virtual ~Vector_Local ()
const char * typeName () const
int update (double a, const fei::Vector *x, double b)
int scatterToOverlap ()
int gatherFromOverlap (bool accumulate=true)
int putScalar (double scalar)
int sumIn (int numValues, const int *indices, const double *values, int vectorIndex=0)
int copyIn (int numValues, const int *indices, const double *values, int vectorIndex=0)
fei::SharedPtr< fei::VectorSpacegetVectorSpace ()
void setVectorSpace (fei::SharedPtr< fei::VectorSpace > vecSpace)
int sumInFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, int vectorIndex=0)
int copyInFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, int vectorIndex=0)
int copyOutFieldData (int fieldID, int idType, int numIDs, const int *IDs, double *data, int vectorIndex=0)
int copyOut (int numValues, const int *indices, double *values, int vectorIndex=0) const
int writeToFile (const char *filename, bool matrixMarketFormat=true)
int writeToStream (FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)
std::vector< double > & getCoefs ()

Detailed Description

Definition at line 19 of file fei_Vector_Local.hpp.


Member Function Documentation

const char* fei::Vector_Local::typeName (  )  const [inline, virtual]

Return an implementation-dependent name describing the run-time type of this object.

Implements fei::Vector.

Definition at line 25 of file fei_Vector_Local.hpp.

int fei::Vector_Local::update ( double  a,
const fei::Vector x,
double  b 
) [virtual]

Update 'this' = b*'this' + a*x

Implements fei::Vector.

Definition at line 45 of file fei_Vector_Local.cpp.

int fei::Vector_Local::scatterToOverlap (  )  [virtual]

Use data in the underlying non-overlapping decomposition to update any shared data in the overlapping decomposition.

If any data is already held for the shared positions, that data will be replaced by the data from the 'owning' processor.

Implements fei::Vector.

Definition at line 54 of file fei_Vector_Local.cpp.

int fei::Vector_Local::gatherFromOverlap ( bool  accumulate = true  )  [virtual]

Move any shared data from the overlapping decomposition to the underlying non-overlapping decomposition.

Implements fei::Vector.

Definition at line 58 of file fei_Vector_Local.cpp.

int fei::Vector_Local::putScalar ( double  scalar  )  [virtual]

Set a specified scalar throughout the vector.

Implements fei::Vector.

Definition at line 62 of file fei_Vector_Local.cpp.

int fei::Vector_Local::sumIn ( int  numValues,
const int *  indices,
const double *  values,
int  vectorIndex = 0 
) [virtual]

Sum values into the vector, adding to any that may already exist at the specified indices.

Implements fei::Vector.

Definition at line 99 of file fei_Vector_Local.cpp.

int fei::Vector_Local::copyIn ( int  numValues,
const int *  indices,
const double *  values,
int  vectorIndex = 0 
) [virtual]

Copy values into the vector, overwriting any that may already exist at the specified indices.

Implements fei::Vector.

Definition at line 106 of file fei_Vector_Local.cpp.

fei::SharedPtr< fei::VectorSpace > fei::Vector_Local::getVectorSpace (  )  [virtual]

Obtain the VectorSpace associated with this vector.

Implements fei::Vector.

Definition at line 113 of file fei_Vector_Local.cpp.

void fei::Vector_Local::setVectorSpace ( fei::SharedPtr< fei::VectorSpace vecSpace  )  [virtual]

Set the VectorSpace associated with this vector.

Implements fei::Vector.

Definition at line 117 of file fei_Vector_Local.cpp.

int fei::Vector_Local::sumInFieldData ( int  fieldID,
int  idType,
int  numIDs,
const int *  IDs,
const double *  data,
int  vectorIndex = 0 
) [virtual]

Sum field data into the vector, adding to any coefficients that may already exist at the specified locations. If the specified fieldID doesn't exist at one or more of the specified IDs, then the corresponding positions in the data array will simply not be used.

Implements fei::Vector.

Definition at line 143 of file fei_Vector_Local.cpp.

int fei::Vector_Local::copyInFieldData ( int  fieldID,
int  idType,
int  numIDs,
const int *  IDs,
const double *  data,
int  vectorIndex = 0 
) [virtual]

Copy field data into the vector, overwriting any coefficients that may already exist at the specified locations. If the specified fieldID doesn't exist at one or more of the specified IDs, then the corresponding positions in the data array will simply not be used.

Implements fei::Vector.

Definition at line 155 of file fei_Vector_Local.cpp.

int fei::Vector_Local::copyOutFieldData ( int  fieldID,
int  idType,
int  numIDs,
const int *  IDs,
double *  data,
int  vectorIndex = 0 
) [virtual]

Copy field data out of the vector, into the caller-allocated data array. If the specified fieldID doesn't exist at one or more of the specified IDs, then the corresponding positions in the data array will simply not be referenced.

Implements fei::Vector.

Definition at line 167 of file fei_Vector_Local.cpp.

int fei::Vector_Local::copyOut ( int  numValues,
const int *  indices,
double *  values,
int  vectorIndex = 0 
) const [virtual]

Retrieve a copy of values from the vector for the specified indices. Note that if the specified indices are not local in the underlying non-overlapping data decomposition, these values are not guaranteed to be correct until after the scatterToOverlap() method has been called.

Implements fei::Vector.

Definition at line 198 of file fei_Vector_Local.cpp.

int fei::Vector_Local::writeToFile ( const char *  filename,
bool  matrixMarketFormat = true 
) [virtual]

Write the vector's contents into the specified file.

Parameters:
filename Text name of the file to be created or overwritten. If in a parallel environment, each processor will take turns writing into the file.
matrixMarketFormat Optional argument, defaults to true. If true the contents of the file will be MatrixMarket real array format. If not true, the contents of the file will contain the vector's global dimension on the first line, and all following lines will contain a space-separated pair with global index first and coefficient value second.
Returns:
error-code 0 if successful, -1 if some error occurs such as failure to open file.

Implements fei::Vector.

Definition at line 228 of file fei_Vector_Local.cpp.

int fei::Vector_Local::writeToStream ( FEI_OSTREAM &  ostrm,
bool  matrixMarketFormat = true 
) [virtual]

Write the vector's contents to the specified ostream.

Parameters:
ostrm ostream to be written to.
matrixMarketFormat Optional argument, defaults to true. If true the contents of the vector will be written in MatrixMarket real array format. If not true, the stream will be given the vector's global dimension on the first line, and all following lines will contain a space-separated pair with global index first and coefficient value second.
Returns:
error-code 0 if successful, -1 if some error occurs such as failure to open file.

Implements fei::Vector.

Definition at line 241 of file fei_Vector_Local.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Jul 12 09:31:44 2010 for FEI by  doxygen 1.4.7