FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <fei_VectorReducer.hpp>
Public Member Functions | |
VectorReducer (fei::SharedPtr< fei::Reducer > reducer, fei::SharedPtr< fei::Vector > target, bool isSolutionVector=false) | |
virtual | ~VectorReducer () |
fei::SharedPtr< fei::Vector > | getTargetVector () |
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 | 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 |
Public Member Functions inherited from fei::Vector | |
virtual | ~Vector () |
Private Member Functions | |
int | copyOut_FE (int nodeNumber, int dofOffset, double &value) |
int | giveToUnderlyingVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0) |
int | sumIntoFEVector (int blockID, int connOffset, int numNodes, const int *nodeNumbers, const int *numIndicesPerNode, const double *values) |
Private Attributes | |
fei::SharedPtr< fei::Reducer > | reducer_ |
fei::SharedPtr< fei::Vector > | target_ |
bool | isSolution_ |
int | localProc_ |
int | numProcs_ |
Definition at line 24 of file fei_VectorReducer.hpp.
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.
References fei::SharedPtr< T >::get(), fei::VectorSpace::getCommunicator(), fei::VectorSpace::getIndices_SharedAndOwned(), fei::VectorSpace::getNumIndices_SharedAndOwned(), fei::Reducer::getSlaveMasterEqns(), fei::Vector::getVectorSpace(), fei::Reducer::isSlaveEqn(), fei::localProc(), localProc_, fei::numProcs(), numProcs_, and fei::Reducer::translateToReducedEqn().
|
virtual |
Destructor
Definition at line 62 of file fei_VectorReducer.cpp.
|
inline |
Query for underlying target vector.
Definition at line 36 of file fei_VectorReducer.hpp.
References target_.
|
inlinevirtual |
Return a name describing the run-time type
of this object.
Implements fei::Vector.
Definition at line 42 of file fei_VectorReducer.hpp.
References target_, and fei::Vector::typeName().
|
virtual |
Update 'this' = b*'this' + a*x
Implements fei::Vector.
Definition at line 73 of file fei_VectorReducer.cpp.
References target_, and fei::Vector::update().
|
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 79 of file fei_VectorReducer.cpp.
References fei::Vector::scatterToOverlap(), and target_.
|
inlinevirtual |
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_VectorReducer.hpp.
References fei::Vector::setCommSizes(), and target_.
|
virtual |
Move any shared data from the overlapping decomposition to the
underlying non-overlapping decomposition.
Implements fei::Vector.
Definition at line 85 of file fei_VectorReducer.cpp.
References fei::Reducer::assembleReducedVector(), fei::Vector::gatherFromOverlap(), isSolution_, reducer_, fei::Vector::setCommSizes(), and target_.
|
virtual |
Set a specified scalar throughout the vector.
Implements fei::Vector.
Definition at line 67 of file fei_VectorReducer.cpp.
References fei::Vector::putScalar(), and target_.
|
virtual |
Sum values into the vector, adding to any
that may already exist at the specified indices.
Implements fei::Vector.
Definition at line 93 of file fei_VectorReducer.cpp.
References fei::Reducer::addVectorValues(), isSolution_, reducer_, and target_.
Referenced by sumInFieldData().
|
virtual |
Copy values into the vector, overwriting any that may already exist
at the specified indices.
Implements fei::Vector.
Definition at line 102 of file fei_VectorReducer.cpp.
References fei::Reducer::addVectorValues(), isSolution_, reducer_, and target_.
Referenced by copyInFieldData(), and copyInFieldDataLocalIDs().
|
inlinevirtual |
Obtain the VectorSpace associated with this vector.
Implements fei::Vector.
Definition at line 82 of file fei_VectorReducer.hpp.
References fei::Vector::getVectorSpace(), and target_.
|
inlinevirtual |
Set the VectorSpace associated with this vector.
Implements fei::Vector.
Definition at line 87 of file fei_VectorReducer.hpp.
References fei::Vector::setVectorSpace(), and target_.
|
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 123 of file fei_VectorReducer.cpp.
References fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndices(), fei::Vector::getVectorSpace(), sumIn(), and target_.
|
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 143 of file fei_VectorReducer.cpp.
References copyIn(), fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndices(), fei::Vector::getVectorSpace(), and target_.
|
virtual |
Implements fei::Vector.
Definition at line 163 of file fei_VectorReducer.cpp.
References copyIn(), fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndicesLocalIDs(), fei::Vector::getVectorSpace(), and target_.
|
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 190 of file fei_VectorReducer.cpp.
References copyOut(), fei::VectorSpace::getFieldSize(), fei::VectorSpace::getGlobalIndices(), fei::Vector::getVectorSpace(), and target_.
|
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 210 of file fei_VectorReducer.cpp.
References target_, and fei::Vector::writeToFile().
|
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 217 of file fei_VectorReducer.cpp.
References target_, and fei::Vector::writeToStream().
|
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 224 of file fei_VectorReducer.cpp.
References fei::Reducer::copyOutVectorValues(), isSolution_, reducer_, and target_.
Referenced by copyOutFieldData().
|
private |
please ignore
Definition at line 183 of file fei_VectorReducer.cpp.
|
private |
Definition at line 111 of file fei_VectorReducer.cpp.
References fei::Reducer::addVectorValues(), isSolution_, reducer_, and target_.
|
private |
Definition at line 236 of file fei_VectorReducer.cpp.
|
private |
Definition at line 165 of file fei_VectorReducer.hpp.
Referenced by copyIn(), copyOut(), gatherFromOverlap(), giveToUnderlyingVector(), and sumIn().
|
private |
Definition at line 166 of file fei_VectorReducer.hpp.
Referenced by copyIn(), copyInFieldData(), copyInFieldDataLocalIDs(), copyOut(), copyOutFieldData(), gatherFromOverlap(), getTargetVector(), getVectorSpace(), giveToUnderlyingVector(), putScalar(), scatterToOverlap(), setCommSizes(), setVectorSpace(), sumIn(), sumInFieldData(), typeName(), update(), writeToFile(), and writeToStream().
|
private |
Definition at line 167 of file fei_VectorReducer.hpp.
Referenced by copyIn(), copyOut(), gatherFromOverlap(), giveToUnderlyingVector(), and sumIn().
|
private |
Definition at line 169 of file fei_VectorReducer.hpp.
Referenced by VectorReducer().
|
private |
Definition at line 170 of file fei_VectorReducer.hpp.
Referenced by VectorReducer().