FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <fei_Vector_Local.hpp>
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 () |
void | setCommSizes () |
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::VectorSpace > | getVectorSpace () const |
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 | copyInFieldDataLocalIDs (int fieldID, int idType, int numIDs, const int *localIDs, 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 () |
Public Member Functions inherited from fei::Vector | |
virtual | ~Vector () |
Private Member Functions | |
int | giveToVector (int numValues, const int *indices, const double *values, bool sumInto, int vectorIndex) |
int | assembleFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, bool sumInto, int vectorIndex) |
int | assembleFieldDataLocalIDs (int fieldID, int idType, int numIDs, const int *localIDs, const double *data, bool sumInto, int vectorIndex) |
Private Attributes | |
fei::SharedPtr< fei::VectorSpace > | vecSpace_ |
std::vector< double > | coefs_ |
std::map< int, int > | global_to_local_ |
std::vector< int > | work_indices_ |
Definition at line 19 of file fei_Vector_Local.hpp.
fei::Vector_Local::Vector_Local | ( | fei::SharedPtr< fei::VectorSpace > | vecSpace | ) |
Definition at line 21 of file fei_Vector_Local.cpp.
References coefs_, fei::VectorSpace::getIndices_SharedAndOwned(), fei::VectorSpace::getNumIndices_SharedAndOwned(), global_to_local_, and vecSpace_.
|
virtual |
Definition at line 40 of file fei_Vector_Local.cpp.
|
inlinevirtual |
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.
|
virtual |
Update 'this' = b*'this' + a*x
Implements fei::Vector.
Definition at line 45 of file fei_Vector_Local.cpp.
References fei::console_out(), and FEI_ENDL.
|
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.
|
virtual |
perform initial communication to establish message sizes that will be needed for exchanging shared-node data. Called from within gatherFromOverlap usually, doesn't usually need to be explicitly called by client code. (Power users only...)
Implements fei::Vector.
Definition at line 58 of file fei_Vector_Local.cpp.
|
virtual |
Move any shared data from the overlapping decomposition to the underlying non-overlapping decomposition.
Implements fei::Vector.
Definition at line 63 of file fei_Vector_Local.cpp.
|
virtual |
Set a specified scalar throughout the vector.
Implements fei::Vector.
Definition at line 67 of file fei_Vector_Local.cpp.
References coefs_.
|
virtual |
Sum values into the vector, adding to any that may already exist at the specified indices.
Implements fei::Vector.
Definition at line 104 of file fei_Vector_Local.cpp.
References giveToVector().
|
virtual |
Copy values into the vector, overwriting any that may already exist at the specified indices.
Implements fei::Vector.
Definition at line 111 of file fei_Vector_Local.cpp.
References giveToVector().
|
virtual |
Obtain the VectorSpace associated with this vector.
Implements fei::Vector.
Definition at line 118 of file fei_Vector_Local.cpp.
References vecSpace_.
|
virtual |
Set the VectorSpace associated with this vector.
Implements fei::Vector.
Definition at line 122 of file fei_Vector_Local.cpp.
References vecSpace_.
|
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 170 of file fei_Vector_Local.cpp.
References assembleFieldData().
|
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 182 of file fei_Vector_Local.cpp.
References assembleFieldData().
|
virtual |
Implements fei::Vector.
Definition at line 194 of file fei_Vector_Local.cpp.
References assembleFieldDataLocalIDs().
|
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 206 of file fei_Vector_Local.cpp.
References CHK_ERR, coefs_, fei::console_out(), FEI_ENDL, fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndices(), global_to_local_, vecSpace_, and work_indices_.
|
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 237 of file fei_Vector_Local.cpp.
References coefs_, fei::console_out(), FEI_ENDL, and global_to_local_.
|
virtual |
Write the vector's contents into the specified file.
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. |
Implements fei::Vector.
Definition at line 267 of file fei_Vector_Local.cpp.
References FEI_OFSTREAM, FEI_OSTRINGSTREAM, fei::VectorSpace::getCommunicator(), IOS_OUT, fei::localProc(), vecSpace_, and writeToStream().
|
virtual |
Write the vector's contents to the specified ostream.
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. |
Implements fei::Vector.
Definition at line 280 of file fei_Vector_Local.cpp.
References coefs_, FEI_ENDL, global_to_local_, IOS_FLOATFIELD, and IOS_SCIENTIFIC.
Referenced by writeToFile().
std::vector< double > & fei::Vector_Local::getCoefs | ( | ) |
Definition at line 261 of file fei_Vector_Local.cpp.
References coefs_.
|
private |
Definition at line 74 of file fei_Vector_Local.cpp.
References coefs_, fei::console_out(), FEI_ENDL, and global_to_local_.
Referenced by assembleFieldData(), assembleFieldDataLocalIDs(), copyIn(), and sumIn().
|
private |
Definition at line 126 of file fei_Vector_Local.cpp.
References CHK_ERR, fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndices(), giveToVector(), vecSpace_, and work_indices_.
Referenced by copyInFieldData(), and sumInFieldData().
|
private |
Definition at line 148 of file fei_Vector_Local.cpp.
References CHK_ERR, fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndicesLocalIDs(), giveToVector(), vecSpace_, and work_indices_.
Referenced by copyInFieldDataLocalIDs().
|
private |
Definition at line 149 of file fei_Vector_Local.hpp.
Referenced by assembleFieldData(), assembleFieldDataLocalIDs(), copyOutFieldData(), getVectorSpace(), setVectorSpace(), Vector_Local(), and writeToFile().
|
private |
Definition at line 150 of file fei_Vector_Local.hpp.
Referenced by copyOut(), copyOutFieldData(), getCoefs(), giveToVector(), putScalar(), Vector_Local(), and writeToStream().
|
private |
Definition at line 151 of file fei_Vector_Local.hpp.
Referenced by copyOut(), copyOutFieldData(), giveToVector(), Vector_Local(), and writeToStream().
|
private |
Definition at line 152 of file fei_Vector_Local.hpp.
Referenced by assembleFieldData(), assembleFieldDataLocalIDs(), and copyOutFieldData().