fei::VectorReducer Class Reference

Inheritance diagram for fei::VectorReducer:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 VectorReducer (fei::SharedPtr< fei::Reducer > reducer, fei::SharedPtr< fei::Vector > target, bool isSolutionVector=false)
virtual ~VectorReducer ()
fei::SharedPtr< fei::VectorgetTargetVector ()
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 writeToFile (const char *filename, bool matrixMarketFormat=true)
int writeToStream (FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)
int copyOut (int numValues, const int *indices, double *values, int vectorIndex=0) const

Detailed Description

Definition at line 24 of file fei_VectorReducer.hpp.


Constructor & Destructor Documentation

fei::VectorReducer::VectorReducer ( fei::SharedPtr< fei::Reducer reducer,
fei::SharedPtr< fei::Vector target,
bool  isSolutionVector = false 
)

Constructor

Definition at line 23 of file fei_VectorReducer.cpp.

fei::VectorReducer::~VectorReducer (  )  [virtual]

Destructor

Definition at line 61 of file fei_VectorReducer.cpp.


Member Function Documentation

fei::SharedPtr<fei::Vector> fei::VectorReducer::getTargetVector (  )  [inline]

Query for underlying target vector.

Definition at line 36 of file fei_VectorReducer.hpp.

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

Return a name describing the run-time type of this object.

Implements fei::Vector.

Definition at line 42 of file fei_VectorReducer.hpp.

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

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

Implements fei::Vector.

Definition at line 72 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 78 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 84 of file fei_VectorReducer.cpp.

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

Set a specified scalar throughout the vector.

Implements fei::Vector.

Definition at line 66 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 91 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 100 of file fei_VectorReducer.cpp.

fei::SharedPtr<fei::VectorSpace> fei::VectorReducer::getVectorSpace (  )  [inline, virtual]

Obtain the VectorSpace associated with this vector.

Implements fei::Vector.

Definition at line 80 of file fei_VectorReducer.hpp.

void fei::VectorReducer::setVectorSpace ( fei::SharedPtr< fei::VectorSpace vecSpace  )  [inline, virtual]

Set the VectorSpace associated with this vector.

Implements fei::Vector.

Definition at line 85 of file fei_VectorReducer.hpp.

int fei::VectorReducer::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 121 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 141 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 168 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 188 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 195 of file fei_VectorReducer.cpp.

int fei::VectorReducer::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 202 of file fei_VectorReducer.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