FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <fei_Vector_Impl.hpp>
Public Member Functions | |
Vector_Impl (fei::SharedPtr< fei::VectorSpace > vecSpace, T *vector, int numLocalEqns, bool isSolutionVector=false, bool deleteVector=false) | |
virtual | ~Vector_Impl () |
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) |
void | setUnderlyingVector (T *vec) |
T * | getUnderlyingVector () |
const T * | getUnderlyingVector () const |
int | copyOut (int numValues, const int *indices, double *values, int vectorIndex=0) const |
int | copyOut_FE (int nodeNumber, int dofOffset, double &value) |
Public Member Functions inherited from fei::Vector | |
virtual | ~Vector () |
Public Member Functions inherited from fei::Vector_core | |
Vector_core (fei::SharedPtr< fei::VectorSpace > vecSpace, int numLocalEqns) | |
virtual | ~Vector_core () |
int | copyOut (int numValues, const int *indices, double *values, int vectorIndex=0) const |
int | giveToVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0) |
void | setOverlap (int numRemoteEqns=0, const int *remoteEqns=NULL) |
Private Member Functions | |
int | giveToUnderlyingVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0) |
int | copyOutOfUnderlyingVector (int numValues, const int *indices, double *values, int vectorIndex=0) const |
int | sumIntoFEVector (int blockID, int connOffset, int numNodes, const int *nodeNumbers, const int *numIndicesPerNode, const int *dof_ids, const double *values) |
Private Attributes | |
T * | vector_ |
bool | isSolution_ |
bool | deleteVector_ |
int | localProc_ |
int | numProcs_ |
std::string | dbgprefix_ |
Additional Inherited Members | |
Protected Member Functions inherited from fei::Vector_core | |
int | assembleFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, bool sumInto=true, int vectorIndex=0) |
int | assembleFieldDataLocalIDs (int fieldID, int idType, int numIDs, const int *localIDs, const double *data, bool sumInto=true, int vectorIndex=0) |
void | setCommSizes () |
fei::SharedPtr< fei::VectorSpace > | get_vector_space () const |
void | set_vector_space (fei::SharedPtr< fei::VectorSpace > vspace) |
int | firstLocalOffset () const |
int | lastLocalOffset () const |
std::vector< int > & | work_indices () |
std::vector< int > & | work_indices2 () |
bool | haveFEVector () |
void | setFEVector (bool flag) |
std::vector< CSVec * > & | remotelyOwned () |
const std::vector< CSVec * > & | remotelyOwned () const |
std::vector< int > & | remotelyOwnedProcs () |
const std::vector< int > & | remotelyOwnedProcs () const |
fei::CSVec * | getRemotelyOwned (int proc) |
const fei::CSVec * | getRemotelyOwned (int proc) const |
Protected Member Functions inherited from fei::Logger | |
Logger () | |
virtual | ~Logger () |
void | setOutputLevel (OutputLevel olevel) |
void | addLogID (int ID) |
void | addLogEqn (int eqn) |
bool | isLogID (int ID) |
bool | isLogEqn (int eqn) |
std::set< int > & | getLogIDs () |
std::set< int > & | getLogEqns () |
Protected Attributes inherited from fei::Vector_core | |
fei::SharedPtr< fei::EqnComm > | eqnComm_ |
Protected Attributes inherited from fei::Logger | |
OutputLevel | output_level_ |
FEI_OSTREAM * | output_stream_ |
std::set< int > | logIDs_ |
std::set< int > | logEqns_ |
To be used for vector data assembly, including local assembly of shared data. Provides operations for gathering the overlapped data (locally- stored shared data) to a non-overlapped data distribution (e.g., send shared data to owning processor) and vice-versa for scattering non- overlapped data to the overlapped distribution.
When shared data that is not locally-owned is assembled into this object, it will be held locally until the gatherFromOverlap() operation is performed. When data that is locally-owned is assembled into this object, it will be passed directly to the underlying algebraic (non-overlapping) vector.
When non-locally-owned shared data is requested from this vector object, the operation is only guaranteed to succeed if scatterToOverlap() has been called. If non-local data has recently been input to this vector, but the vector has not been 'synchronized' using gatherFromOverlap() and scatterToOverlap(), then that data may be used to answer the request but the values may be erroneous due to not including contributions from other processors.
Definition at line 57 of file fei_Vector_Impl.hpp.
fei::Vector_Impl< T >::Vector_Impl | ( | fei::SharedPtr< fei::VectorSpace > | vecSpace, |
T * | vector, | ||
int | numLocalEqns, | ||
bool | isSolutionVector = false , |
||
bool | deleteVector = false |
||
) |
Constructor that takes a VectorSpace
Definition at line 230 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, fei::Vector_Impl< T >::copyIn(), fei::Vector_Impl< T >::dbgprefix_, FEI_ENDL, FEI_OSTREAM, fei::VectorSpace::getCommunicator(), fei::VectorSpace::getGlobalIndex(), fei::VectorSpace::getIDTypes(), fei::VectorSpace::getNumDegreesOfFreedom(), fei::SharedIDs< T >::getSharedIDs(), fei::VectorSpace::getSharedIDs(), fei::localProc(), fei::Vector_Impl< T >::localProc_, fei::numProcs(), fei::Vector_Impl< T >::numProcs_, fei::Logger::output_level_, fei::Logger::output_stream_, fei::Vector_core::remotelyOwned(), fei::Vector_Impl< T >::setCommSizes(), fei::Vector_core::setFEVector(), fei::Vector_Impl< T >::sumIn(), and fei::Vector_Impl< T >::typeName().
|
virtual |
Destructor
Definition at line 294 of file fei_Vector_Impl.hpp.
|
inlinevirtual |
Return a name describing the run-time type
of this object.
Implements fei::Vector.
Definition at line 72 of file fei_Vector_Impl.hpp.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
virtual |
Update 'this' = b*'this' + a*x
Implements fei::Vector.
Definition at line 323 of file fei_Vector_Impl.hpp.
References fei::Vector_Impl< T >::getUnderlyingVector().
|
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 339 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, FEI_OSTREAM, and fei::Vector_core::scatterToOverlap().
|
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 351 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, FEI_OSTREAM, and fei::Vector_core::setCommSizes().
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
virtual |
Move any shared data from the overlapping decomposition to the
underlying non-overlapping decomposition.
Implements fei::Vector.
Definition at line 363 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, FEI_OSTREAM, and fei::Vector_core::gatherFromOverlap().
|
virtual |
Set a specified scalar throughout the vector.
Implements fei::Vector.
Definition at line 301 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, CHK_ERR, FEI_ENDL, FEI_OSTREAM, and fei::set_values().
|
virtual |
Sum values into the vector, adding to any
that may already exist at the specified indices.
Implements fei::Vector.
Definition at line 375 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, and FEI_OSTREAM.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
virtual |
Copy values into the vector, overwriting any that may already exist
at the specified indices.
Implements fei::Vector.
Definition at line 389 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, and FEI_OSTREAM.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
inlinevirtual |
Obtain the VectorSpace associated with this vector.
Implements fei::Vector.
Definition at line 112 of file fei_Vector_Impl.hpp.
References fei::Vector_core::get_vector_space().
|
inlinevirtual |
Set the VectorSpace associated with this vector.
Implements fei::Vector.
Definition at line 117 of file fei_Vector_Impl.hpp.
References fei::Vector_core::set_vector_space().
|
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 446 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, and FEI_OSTREAM.
|
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 463 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, and FEI_OSTREAM.
|
virtual |
Implements fei::Vector.
Definition at line 480 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, and FEI_OSTREAM.
|
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 504 of file fei_Vector_Impl.hpp.
References fei::Vector_core::copyOutFieldData().
|
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 517 of file fei_Vector_Impl.hpp.
References fei::Vector_core::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 525 of file fei_Vector_Impl.hpp.
References fei::Vector_core::writeToStream().
|
inline |
Set the library-specific underlying vector object that this
snl_fei::Vector is filtering data in and out of.
Definition at line 177 of file fei_Vector_Impl.hpp.
References fei::Vector_Impl< T >::vector_.
|
inline |
Get the library-specific underlying vector object that this
snl_fei::Vector is filtering data in and out of.
Definition at line 185 of file fei_Vector_Impl.hpp.
References fei::Vector_Impl< T >::vector_.
Referenced by fei::MatrixTraits< FillableMat >::matvec(), and fei::Vector_Impl< T >::update().
|
inline |
Definition at line 186 of file fei_Vector_Impl.hpp.
References fei::Vector_Impl< T >::vector_.
|
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 533 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, fei::Vector_core::copyOut(), FEI_ENDL, and FEI_OSTREAM.
|
virtual |
|
privatevirtual |
Review this function. Is it redundant with other functions?
Implements fei::Vector_core.
Definition at line 403 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, FEI_OSTREAM, and fei::VectorTraits< T >::putValuesIn().
|
privatevirtual |
Review this function. Is it redundant with other functions?
Implements fei::Vector_core.
Definition at line 429 of file fei_Vector_Impl.hpp.
References fei::BRIEF_LOGS, FEI_ENDL, and FEI_OSTREAM.
|
privatevirtual |
Sum in data for FiniteElementData-specific structure. Power users only.
Implements fei::Vector_core.
Definition at line 548 of file fei_Vector_Impl.hpp.
|
private |
Definition at line 217 of file fei_Vector_Impl.hpp.
Referenced by fei::Vector_Impl< T >::getUnderlyingVector(), and fei::Vector_Impl< T >::setUnderlyingVector().
|
private |
Definition at line 218 of file fei_Vector_Impl.hpp.
|
private |
Definition at line 219 of file fei_Vector_Impl.hpp.
|
private |
Definition at line 221 of file fei_Vector_Impl.hpp.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
private |
Definition at line 222 of file fei_Vector_Impl.hpp.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
private |
Definition at line 223 of file fei_Vector_Impl.hpp.
Referenced by fei::Vector_Impl< T >::Vector_Impl().