FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <snl_fei_PointBlockMap.hpp>
Public Member Functions | |
PointBlockMap () | |
virtual | ~PointBlockMap () |
void | setPtEqualBlk () |
bool | ptEqualBlk () |
int | setEqn (int ptEqn, int blkEqn) |
int | setEqn (int ptEqn, int blkEqn, int blkSize) |
int | setBlkEqnSize (int blkEqn, int size) |
int | getBlkEqnSize (int blkEqn) |
int | getMaxBlkEqnSize () |
void | setMaxBlkEqnSize (int sz) |
int | eqnToBlkEqn (int eqn) const |
int | blkEqnToPtEqn (int blkEqn) const |
int | getBlkEqnInfo (int blkEqn, int &ptEqn, int &blkSize) |
int | getPtEqnInfo (int ptEqn, int &blkEqn, int &blkOffset) |
int | getBlkEqnOffset (int blkEqn, int ptEqn) |
bool | isExactlyBlkEqn (int ptEqn) |
std::map< int, int > * | getPtEqns () |
std::map< int, std::pair< int, int > > * | getBlkEqns () |
Private Member Functions | |
PointBlockMap (const PointBlockMap &src) | |
PointBlockMap & | operator= (const PointBlockMap &src) |
Private Attributes | |
std::map< int, int > * | ptEqns_ |
std::map< int, std::pair< int, int > > * | blkEqns_ |
int | maxSize_ |
bool | ptEqualBlk_ |
Stores mappings between point-entry equations and block-entry equations. This class, once initialized, can answer queries such as:
Given a point-equation, return the corresponding block-equation.
or, Given a block-equation, return the corresponding size (number of point-equations contained in the block).
Definition at line 23 of file snl_fei_PointBlockMap.hpp.
snl_fei::PointBlockMap::PointBlockMap | ( | ) |
Constructor
Definition at line 18 of file snl_fei_PointBlockMap.cpp.
|
virtual |
Destructor
Definition at line 29 of file snl_fei_PointBlockMap.cpp.
|
private |
copy constructor
void snl_fei::PointBlockMap::setPtEqualBlk | ( | ) |
Indicate to this object that point-equations are equal to block-equations which means that all block-equation sizes are 1 and all mappings are trivial. This will cause the internal mapping objects to be emptied, to save memory, and all lookup queries will be instant.
Definition at line 36 of file snl_fei_PointBlockMap.cpp.
Referenced by SNL_FEI_Structure::initializeBlkEqnMapper(), and fei::VectorSpace::setLocalEqnNumbers().
|
inline |
query whether block-size == 1, i.e., "point-equals-block"
Definition at line 40 of file snl_fei_PointBlockMap.hpp.
References ptEqualBlk_.
int snl_fei::PointBlockMap::setEqn | ( | int | ptEqn, |
int | blkEqn | ||
) |
Establish the mapping blkEqn => ptEqn. I.e., insert ptEqn and blkEqn into internal structures, and establish a correspondence between them. This function returns an error if 'setPtEqualBlk' has been called and ptEqn != blkEqn.
Definition at line 42 of file snl_fei_PointBlockMap.cpp.
Referenced by EqnCommMgr::exchangePtToBlkInfo(), SNL_FEI_Structure::initializeBlkEqnMapper(), test_PointBlockMap::test1(), and test_PointBlockMap::test2().
int snl_fei::PointBlockMap::setEqn | ( | int | ptEqn, |
int | blkEqn, | ||
int | blkSize | ||
) |
Establish the mapping blkEqn => ptEqn. I.e., insert ptEqn and blkEqn into internal structures, and establish a correspondence between them, also setting the associated block-size. This function returns an error if 'setPtEqualBlk' has been called and ptEqn != blkEqn.
Definition at line 48 of file snl_fei_PointBlockMap.cpp.
int snl_fei::PointBlockMap::setBlkEqnSize | ( | int | blkEqn, |
int | size | ||
) |
Store the specified size corresponding to the specified block-equation.
Note that blkEqn must already have appeared in a call to 'setEqn', in order to establish it in a mapping. Otherwise, an error (-1) is returned.
Definition at line 85 of file snl_fei_PointBlockMap.cpp.
Referenced by SNL_FEI_Structure::initializeBlkEqnMapper(), test_PointBlockMap::test1(), and test_PointBlockMap::test2().
int snl_fei::PointBlockMap::getBlkEqnSize | ( | int | blkEqn | ) |
Given a blkEqn, return the corresponding size.
Definition at line 106 of file snl_fei_PointBlockMap.cpp.
Referenced by EqnCommMgr::exchangePtToBlkInfo(), fei::Lookup_Impl::getBlkEqnSize(), SNL_FEI_Structure::getBlkEqnSize(), SNL_FEI_Structure::getMatrixStructure(), fei::Matrix_Impl< T >::giveToBlockMatrix(), and test_PointBlockMap::test1().
|
inline |
Query the maximum block-equation size
Definition at line 68 of file snl_fei_PointBlockMap.hpp.
References maxSize_.
Referenced by fei::Matrix_Impl< T >::giveToBlockMatrix(), SNL_FEI_Structure::initializeBlkEqnMapper(), and test_PointBlockMap::test1().
|
inline |
Set the maximum block-equation size
Definition at line 72 of file snl_fei_PointBlockMap.hpp.
References maxSize_.
Referenced by SNL_FEI_Structure::initializeBlkEqnMapper().
int snl_fei::PointBlockMap::eqnToBlkEqn | ( | int | eqn | ) | const |
Given a point-equation, return the corresponding block-equation. If eqn does not correspond to a block-equation, then -1 is returned. A return-value of -1 always indicates a not-found or not-valid error.
Definition at line 121 of file snl_fei_PointBlockMap.cpp.
Referenced by EqnCommMgr::exchangePtToBlkInfo(), SNL_FEI_Structure::getMatrixStructure(), fei::Matrix_Impl< T >::giveToBlockMatrix(), fei::Lookup_Impl::ptEqnToBlkEqn(), SNL_FEI_Structure::ptEqnToBlkEqn(), and test_PointBlockMap::test1().
int snl_fei::PointBlockMap::blkEqnToPtEqn | ( | int | blkEqn | ) | const |
Given a block-equation, return the corresponding point-equation (the first of the point-equations that correspond to that block-equation). If blkEqn does not correspond to a point-equation, then -1 is returned.
Definition at line 133 of file snl_fei_PointBlockMap.cpp.
int snl_fei::PointBlockMap::getBlkEqnInfo | ( | int | blkEqn, |
int & | ptEqn, | ||
int & | blkSize | ||
) |
Given a block-equation, query for the corresponding point-equation (the first of the corresponding point-equations) and the block-size, or number of corresponding point-equations.
Definition at line 148 of file snl_fei_PointBlockMap.cpp.
Referenced by test_PointBlockMap::test1().
int snl_fei::PointBlockMap::getPtEqnInfo | ( | int | ptEqn, |
int & | blkEqn, | ||
int & | blkOffset | ||
) |
Given a point-equation, query for the corresponding block-equation and the offset of this point-equation into the block-equation.
Definition at line 169 of file snl_fei_PointBlockMap.cpp.
Referenced by fei::Matrix_core::convertPtToBlk(), fei::Matrix_Impl< T >::giveToBlockMatrix(), and test_PointBlockMap::test1().
int snl_fei::PointBlockMap::getBlkEqnOffset | ( | int | blkEqn, |
int | ptEqn | ||
) |
Given a blkEqn/ptEqn pair, return the offset of the ptEqn into the blkEqn. Example: if blkEqn 23 corresponds to ptEqn 69, and the arguments to this function are blkEqn==23 and ptEqn==71, then the return value is 2, which is the offset of ptEqn==71 into blkEqn==23.
Definition at line 198 of file snl_fei_PointBlockMap.cpp.
Referenced by SNL_FEI_Structure::getOffsetIntoBlkEqn(), fei::Matrix_Impl< T >::giveToBlockMatrix(), and test_PointBlockMap::test1().
bool snl_fei::PointBlockMap::isExactlyBlkEqn | ( | int | ptEqn | ) |
Query whether specified point-equation is the first equation within a block-equation
Definition at line 210 of file snl_fei_PointBlockMap.cpp.
Referenced by fei::Lookup_Impl::isExactlyBlkEqn(), SNL_FEI_Structure::isExactlyBlkEqn(), and test_PointBlockMap::test1().
|
inline |
Return database of point-equations
Definition at line 115 of file snl_fei_PointBlockMap.hpp.
References ptEqns_.
Referenced by EqnCommMgr::exchangePtToBlkInfo(), and SNL_FEI_Structure::getMatrixStructure().
|
inline |
Return database of block-equations
Definition at line 122 of file snl_fei_PointBlockMap.hpp.
References blkEqns_.
Referenced by test_PointBlockMap::test2().
|
private |
|
private |
Definition at line 133 of file snl_fei_PointBlockMap.hpp.
Referenced by getPtEqns(), and PointBlockMap().
|
private |
Definition at line 135 of file snl_fei_PointBlockMap.hpp.
Referenced by getBlkEqns(), and PointBlockMap().
|
private |
Definition at line 140 of file snl_fei_PointBlockMap.hpp.
Referenced by getMaxBlkEqnSize(), and setMaxBlkEqnSize().
|
private |
Definition at line 142 of file snl_fei_PointBlockMap.hpp.
Referenced by ptEqualBlk().