|
FEI Package Browser (Single Doxygen Collection) Version of the Day
|
#include <fei_Vector_core.hpp>

Public Member Functions | |
| 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 |
| virtual int | sumIntoFEVector (int blockID, int connOffset, int numNodes, const int *nodeNumbers, const int *numIndicesPerNode, const int *dof_ids, const double *values)=0 |
| virtual int | copyOut_FE (int nodeNumber, int dofOffset, double &value)=0 |
| int | giveToVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0) |
| virtual int | scatterToOverlap () |
| void | setOverlap (int numRemoteEqns=0, const int *remoteEqns=NULL) |
Protected Member Functions | |
| 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 () |
| virtual int | gatherFromOverlap (bool accumulate=true) |
| virtual int | copyOutFieldData (int fieldID, int idType, int numIDs, const int *IDs, double *data, int vectorIndex=0) |
| virtual int | giveToUnderlyingVector (int numValues, const int *indices, const double *values, bool sumInto=true, int vectorIndex=0)=0 |
| virtual int | copyOutOfUnderlyingVector (int numValues, const int *indices, double *values, int vectorIndex=0) const =0 |
| virtual int | writeToFile (const char *filename, bool matrixMarketFormat=true) |
| virtual int | writeToStream (FEI_OSTREAM &ostrm, bool matrixMarketFormat=true) |
| 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 | |
| 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_ |
Private Member Functions | |
| void | pack_send_buffers (const std::vector< int > &sendProcs, const std::vector< fei::CSVec * > &remotelyOwned, std::vector< std::vector< char > > &send_chars, bool resize_buffer, bool zeroRemotelyOwnedAfterPacking) |
Private Attributes | |
| fei::SharedPtr< fei::VectorSpace > | vecSpace_ |
| MPI_Comm | comm_ |
| int | firstLocalOffset_ |
| int | lastLocalOffset_ |
| int | numLocal_ |
| std::vector< int > | work_indices_ |
| std::vector< int > | work_indices2_ |
| bool | haveFEVector_ |
| std::vector< int > | remotelyOwnedProcs_ |
| std::vector< CSVec * > | remotelyOwned_ |
| std::vector< int > | sendProcs_ |
| std::vector< int > | recvProcs_ |
| std::vector< int > | recv_sizes_ |
| std::vector< std::vector< char > > | recv_chars_ |
| std::vector< std::vector< char > > | send_chars_ |
| bool | sendRecvProcsNeedUpdated_ |
| bool | overlapAlreadySet_ |
| std::string | dbgprefix_ |
Class to provide infrastructure for fei::Vector implementations.
Definition at line 23 of file fei_Vector_core.hpp.
| fei::Vector_core::Vector_core | ( | fei::SharedPtr< fei::VectorSpace > | vecSpace, |
| int | numLocalEqns ) |
constructor
Definition at line 25 of file fei_Vector_core.cpp.
References fei::BRIEF_LOGS, comm_, dbgprefix_, eqnComm_, FEI_ENDL, FEI_OSTREAM, firstLocalOffset_, haveFEVector_, lastLocalOffset_, fei::localProc(), numLocal_, fei::Logger::output_level_, fei::Logger::output_stream_, overlapAlreadySet_, recv_chars_, recv_sizes_, recvProcs_, remotelyOwned_, remotelyOwnedProcs_, send_chars_, sendProcs_, sendRecvProcsNeedUpdated_, vecSpace_, work_indices2_, and work_indices_.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
virtual |
| int fei::Vector_core::copyOut | ( | int | numValues, |
| const int * | indices, | ||
| double * | values, | ||
| int | vectorIndex = 0 ) const |
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.
Definition at line 217 of file fei_Vector_core.cpp.
References fei::binarySearch(), CHK_ERR, fei::CSVec::coefs(), comm_, fei::console_out(), copyOutOfUnderlyingVector(), eqnComm_, ERReturn, FEI_ENDL, firstLocalOffset_, getRemotelyOwned(), fei::CSVec::indices(), fei::localProc(), and numLocal_.
Referenced by fei::Vector_Impl< T >::copyOut(), copyOutFieldData(), writeToFile(), and writeToStream().
|
pure virtual |
Sum in data for FiniteElementData-specific structure. Power users only.
Implemented in fei::Vector_Impl< T >.
|
pure virtual |
Another FiniteElementData-specific method. Power users only.
Implemented in fei::Vector_Impl< T >.
Referenced by copyOutFieldData().
| int fei::Vector_core::giveToVector | ( | int | numValues, |
| const int * | indices, | ||
| const double * | values, | ||
| bool | sumInto = true, | ||
| int | vectorIndex = 0 ) |
Give specified data to underlying vector object.
Definition at line 254 of file fei_Vector_core.cpp.
References fei::add_entry(), fei::BRIEF_LOGS, fei::console_out(), dbgprefix_, eqnComm_, ERReturn, FEI_ENDL, FEI_OSTREAM, firstLocalOffset_, getRemotelyOwned(), giveToUnderlyingVector(), numLocal_, fei::Logger::output_level_, fei::Logger::output_stream_, and fei::put_entry().
Referenced by assembleFieldData(), assembleFieldDataLocalIDs(), fei::Vector_Impl< T >::copyIn(), and fei::Vector_Impl< T >::sumIn().
|
virtual |
Scatter locally-owned vector data to remote sharing procs.
Reimplemented in fei::Vector_Impl< T >.
Definition at line 107 of file fei_Vector_core.cpp.
References fei::CSVec::coefs(), comm_, copyOutOfUnderlyingVector(), FEI_COUT, FEI_ENDL, getRemotelyOwned(), haveFEVector(), fei::CSVec::indices(), fei::localProc(), fei::mirrorProcs(), fei::numProcs(), overlapAlreadySet_, remotelyOwned_, remotelyOwnedProcs_, setOverlap(), and fei::CSVec::size().
Referenced by fei::Vector_Impl< T >::scatterToOverlap().
| void fei::Vector_core::setOverlap | ( | int | numRemoteEqns = 0, |
| const int * | remoteEqns = NULL ) |
define the extent of the overlapping indices. If the optional arguments are not specified, remote eqns will be obtained from the internal fei::VectorSpace attribute.
Definition at line 68 of file fei_Vector_core.cpp.
References fei::add_entry(), fei::BRIEF_LOGS, comm_, dbgprefix_, eqnComm_, FEI_ENDL, FEI_OSTREAM, getRemotelyOwned(), fei::localProc(), fei::Logger::output_level_, fei::Logger::output_stream_, overlapAlreadySet_, sendRecvProcsNeedUpdated_, and vecSpace_.
Referenced by scatterToOverlap(), and fei::VectorReducer::VectorReducer().
|
protected |
Assemble data specified by fieldID, idType, etc.
Definition at line 308 of file fei_Vector_core.cpp.
References CHK_ERR, ERReturn, giveToVector(), vecSpace_, and work_indices_.
Referenced by fei::Vector_Impl< T >::copyInFieldData(), and fei::Vector_Impl< T >::sumInFieldData().
|
protected |
Definition at line 331 of file fei_Vector_core.cpp.
References CHK_ERR, ERReturn, giveToVector(), vecSpace_, and work_indices_.
Referenced by fei::Vector_Impl< T >::copyInFieldDataLocalIDs().
|
protected |
Definition at line 372 of file fei_Vector_core.cpp.
References comm_, fei::localProc(), fei::mirrorProcs(), pack_send_buffers(), recv_chars_, recv_sizes_, recvProcs_, remotelyOwned_, remotelyOwnedProcs_, send_chars_, sendProcs_, sendRecvProcsNeedUpdated_, and vecSpace_.
Referenced by gatherFromOverlap(), and fei::Vector_Impl< T >::setCommSizes().
|
protectedvirtual |
Gather shared data from remote procs for eqns that are locally-owned.
Reimplemented in fei::Vector_Impl< T >.
Definition at line 445 of file fei_Vector_core.cpp.
References comm_, giveToUnderlyingVector(), haveFEVector(), fei::numProcs(), pack_send_buffers(), recv_chars_, recv_sizes_, recvProcs_, remotelyOwned_, send_chars_, sendProcs_, sendRecvProcsNeedUpdated_, setCommSizes(), and fei::impl_utils::unpack_indices_coefs().
Referenced by fei::Vector_Impl< T >::gatherFromOverlap().
|
protectedvirtual |
Copy out data specified by fieldID, idType, etc.
Reimplemented in fei::Vector_Impl< T >.
Definition at line 507 of file fei_Vector_core.cpp.
References CHK_ERR, copyOut(), copyOut_FE(), ERReturn, fei::FieldMask::getFieldEqnOffset(), fei::Record< GlobalIDType >::getFieldMask(), fei::Record< GlobalIDType >::getNumber(), fei::Record< GlobalIDType >::getOffsetIntoEqnNumbers(), snl_fei::RecordCollection::getRecordWithID(), haveFEVector_, vecSpace_, and work_indices_.
Referenced by fei::Vector_Impl< T >::copyOutFieldData().
|
protectedpure virtual |
Review this function. Is it redundant with other functions?
Implemented in fei::Vector_Impl< T >.
Referenced by gatherFromOverlap(), and giveToVector().
|
protectedpure virtual |
Review this function. Is it redundant with other functions?
Implemented in fei::Vector_Impl< T >.
References FEI_OSTREAM.
Referenced by copyOut(), and scatterToOverlap().
|
protectedvirtual |
Establish basic information like sizes etc. Write data to specified filename.
Reimplemented in fei::Vector_Impl< T >.
Definition at line 560 of file fei_Vector_core.cpp.
References fei::Barrier(), CHK_ERR, comm_, copyOut(), eqnComm_, FEI_ENDL, FEI_OFSTREAM, firstLocalOffset_, IOS_APP, IOS_FLOATFIELD, IOS_OUT, IOS_SCIENTIFIC, lastLocalOffset_, fei::localProc(), and fei::numProcs().
Referenced by fei::Vector_Impl< T >::writeToFile().
|
protectedvirtual |
Write data to specified ostream.
Reimplemented in fei::Vector_Impl< T >.
Definition at line 607 of file fei_Vector_core.cpp.
References fei::Barrier(), CHK_ERR, comm_, copyOut(), eqnComm_, FEI_ENDL, FEI_OSTREAM, firstLocalOffset_, IOS_FLOATFIELD, IOS_FMTFLAGS, IOS_SCIENTIFIC, lastLocalOffset_, fei::localProc(), fei::numProcs(), remotelyOwned_, and remotelyOwnedProcs_.
Referenced by fei::Vector_Impl< T >::writeToStream().
|
inlineprotected |
Return vector-space that describes that size/layout of this vector.
Definition at line 121 of file fei_Vector_core.hpp.
References vecSpace_.
Referenced by fei::Vector_Impl< T >::getVectorSpace().
|
inlineprotected |
Set vector-space that describes the size/layout of this vector.
Definition at line 127 of file fei_Vector_core.hpp.
References vecSpace_.
Referenced by fei::Vector_Impl< T >::setVectorSpace().
|
inlineprotected |
Query for first locally-owned vector position.
Definition at line 133 of file fei_Vector_core.hpp.
References firstLocalOffset_.
Referenced by fei::Vector_Impl< T >::copyOutOfUnderlyingVector(), fei::Vector_Impl< T >::giveToUnderlyingVector(), and fei::Vector_Impl< T >::putScalar().
|
inlineprotected |
Query for last locally-owned vector position.
Definition at line 136 of file fei_Vector_core.hpp.
References lastLocalOffset_.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
haveFEVector
Definition at line 144 of file fei_Vector_core.hpp.
References haveFEVector_.
Referenced by gatherFromOverlap(), fei::Vector_Impl< T >::putScalar(), and scatterToOverlap().
|
inlineprotected |
setFEVector
Definition at line 146 of file fei_Vector_core.hpp.
References haveFEVector_.
Referenced by fei::Vector_Impl< T >::Vector_Impl().
|
inlineprotected |
remotelyOwned
Definition at line 149 of file fei_Vector_core.hpp.
References remotelyOwned_.
Referenced by pack_send_buffers(), fei::Vector_Impl< T >::putScalar(), and fei::Vector_Impl< T >::Vector_Impl().
|
inlineprotected |
Definition at line 150 of file fei_Vector_core.hpp.
References remotelyOwned_.
|
inlineprotected |
Definition at line 151 of file fei_Vector_core.hpp.
References remotelyOwnedProcs_.
|
inlineprotected |
Definition at line 152 of file fei_Vector_core.hpp.
References remotelyOwnedProcs_.
|
inlineprotected |
Definition at line 154 of file fei_Vector_core.hpp.
References remotelyOwned_, and remotelyOwnedProcs_.
Referenced by copyOut(), giveToVector(), pack_send_buffers(), scatterToOverlap(), and setOverlap().
|
inlineprotected |
Definition at line 170 of file fei_Vector_core.hpp.
References remotelyOwned_, and remotelyOwnedProcs_.
|
private |
Definition at line 354 of file fei_Vector_core.cpp.
References fei::CSVec::coefs(), getRemotelyOwned(), fei::CSVec::indices(), fei::impl_utils::pack_indices_coefs(), remotelyOwned(), and fei::set_values().
Referenced by gatherFromOverlap(), and setCommSizes().
|
protected |
Definition at line 181 of file fei_Vector_core.hpp.
Referenced by copyOut(), giveToVector(), setOverlap(), Vector_core(), writeToFile(), and writeToStream().
|
private |
Definition at line 190 of file fei_Vector_core.hpp.
Referenced by assembleFieldData(), assembleFieldDataLocalIDs(), copyOutFieldData(), get_vector_space(), set_vector_space(), setCommSizes(), setOverlap(), and Vector_core().
|
private |
Definition at line 192 of file fei_Vector_core.hpp.
Referenced by copyOut(), gatherFromOverlap(), scatterToOverlap(), setCommSizes(), setOverlap(), Vector_core(), writeToFile(), and writeToStream().
|
private |
Definition at line 194 of file fei_Vector_core.hpp.
Referenced by copyOut(), firstLocalOffset(), giveToVector(), Vector_core(), writeToFile(), and writeToStream().
|
private |
Definition at line 194 of file fei_Vector_core.hpp.
Referenced by lastLocalOffset(), Vector_core(), writeToFile(), and writeToStream().
|
private |
Definition at line 194 of file fei_Vector_core.hpp.
Referenced by copyOut(), giveToVector(), and Vector_core().
|
private |
Definition at line 196 of file fei_Vector_core.hpp.
Referenced by assembleFieldData(), assembleFieldDataLocalIDs(), copyOutFieldData(), Vector_core(), and work_indices().
|
private |
Definition at line 197 of file fei_Vector_core.hpp.
Referenced by Vector_core(), and work_indices2().
|
private |
Definition at line 199 of file fei_Vector_core.hpp.
Referenced by copyOutFieldData(), haveFEVector(), setFEVector(), and Vector_core().
|
private |
Definition at line 201 of file fei_Vector_core.hpp.
Referenced by getRemotelyOwned(), getRemotelyOwned(), remotelyOwnedProcs(), remotelyOwnedProcs(), scatterToOverlap(), setCommSizes(), Vector_core(), and writeToStream().
|
private |
Definition at line 202 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), getRemotelyOwned(), getRemotelyOwned(), remotelyOwned(), remotelyOwned(), scatterToOverlap(), setCommSizes(), Vector_core(), writeToStream(), and ~Vector_core().
|
private |
Definition at line 203 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), setCommSizes(), and Vector_core().
|
private |
Definition at line 204 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), setCommSizes(), and Vector_core().
|
private |
Definition at line 205 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), setCommSizes(), and Vector_core().
|
private |
Definition at line 206 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), setCommSizes(), and Vector_core().
|
private |
Definition at line 207 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), setCommSizes(), and Vector_core().
|
private |
Definition at line 208 of file fei_Vector_core.hpp.
Referenced by gatherFromOverlap(), setCommSizes(), setOverlap(), and Vector_core().
|
private |
Definition at line 210 of file fei_Vector_core.hpp.
Referenced by scatterToOverlap(), setOverlap(), and Vector_core().
|
private |
Definition at line 211 of file fei_Vector_core.hpp.
Referenced by giveToVector(), setOverlap(), and Vector_core().