FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
snl_fei::PointBlockMap Class Reference

#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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

snl_fei::PointBlockMap::PointBlockMap ( )

Constructor

Definition at line 18 of file snl_fei_PointBlockMap.cpp.

snl_fei::PointBlockMap::~PointBlockMap ( )
virtual

Destructor

Definition at line 29 of file snl_fei_PointBlockMap.cpp.

Member Function Documentation

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.

bool snl_fei::PointBlockMap::ptEqualBlk ( )
inline

query whether block-size == 1, i.e., "point-equals-block"

Definition at line 40 of file snl_fei_PointBlockMap.hpp.

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.

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.

int snl_fei::PointBlockMap::getBlkEqnSize ( int  blkEqn)

Given a blkEqn, return the corresponding size.

Definition at line 106 of file snl_fei_PointBlockMap.cpp.

int snl_fei::PointBlockMap::getMaxBlkEqnSize ( )
inline

Query the maximum block-equation size

Definition at line 68 of file snl_fei_PointBlockMap.hpp.

void snl_fei::PointBlockMap::setMaxBlkEqnSize ( int  sz)
inline

Set the maximum block-equation size

Definition at line 72 of file snl_fei_PointBlockMap.hpp.

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.

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.

Returns
-1 if block-equation not found, 0 if no error

Definition at line 148 of file snl_fei_PointBlockMap.cpp.

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.

Returns
-1 if point-equation not found, 0 if no error

Definition at line 169 of file snl_fei_PointBlockMap.cpp.

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.

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.

std::map<int,int>* snl_fei::PointBlockMap::getPtEqns ( )
inline

Return database of point-equations

Definition at line 115 of file snl_fei_PointBlockMap.hpp.

std::map<int,std::pair<int,int> >* snl_fei::PointBlockMap::getBlkEqns ( )
inline

Return database of block-equations

Definition at line 122 of file snl_fei_PointBlockMap.hpp.


The documentation for this class was generated from the following files: