FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ProcEqns Class Reference

#include <fei_ProcEqns.hpp>

Public Member Functions

 ProcEqns ()
 
virtual ~ProcEqns ()
 
ProcEqnsdeepCopy ()
 
size_t getNumProcs ()
 
std::vector< int > & procsPtr ()
 
std::vector< int > & eqnsPerProcPtr ()
 
std::vector< std::vector< int > * > & procEqnNumbersPtr ()
 
std::vector< std::vector< int > * > & procEqnLengthsPtr ()
 
void addEqn (int eqnNumber, int proc)
 
void addEqn (int eqnNumber, int eqnLength, int proc)
 
void setProcEqnLengths (int *eqnNumbers, int *eqnLengths, int len)
 

Private Member Functions

void deleteMemory ()
 
void internalAddEqn (int eqnNumber, int eqnLength, int proc)
 

Private Attributes

std::vector< int > procs_
 
std::vector< int > eqnsPerProc_
 
std::vector< std::vector< int > * > procEqnNumbers_
 
std::vector< std::vector< int > * > procEqnLengths_
 

Detailed Description

Internal implementation class.

A class for keeping equation numbers grouped according to processor. This is useful when a set of equations is to be exchanged among processors. This class holds a table of equation numbers, and optionally a companion table with the lengths of those equations, organized such that each row of the table contains equations that are associated with a remote processor. (They are to be sent to that proc, or they are to be received from that proc.) A list of those processors is also maintained, of course.

Usage of this class is intended to consist of adding equations and associated processors using the addEqn member, and then later retrieving the list of processors and the associated table (list of lists) of equations, and their lengths (if length data was supplied).

Definition at line 27 of file fei_ProcEqns.hpp.

Constructor & Destructor Documentation

ProcEqns::ProcEqns ( )

Default constructor

Definition at line 16 of file fei_ProcEqns.cpp.

Referenced by deepCopy().

ProcEqns::~ProcEqns ( )
virtual

Destructor

Definition at line 25 of file fei_ProcEqns.cpp.

References deleteMemory().

Member Function Documentation

ProcEqns * ProcEqns::deepCopy ( )

Similar to a copy constructor, puts a copy of all data and state into the new instance.

Definition at line 30 of file fei_ProcEqns.cpp.

References eqnsPerProc_, procEqnLengths_, procEqnNumbers_, ProcEqns(), and procs_.

Referenced by EqnCommMgr::operator=(), and test_EqnCommMgr::test2().

size_t ProcEqns::getNumProcs ( )
inline
std::vector<int>& ProcEqns::procsPtr ( )
inline
std::vector<int>& ProcEqns::eqnsPerProcPtr ( )
inline

Return a list containing the number of equations corresponding to each processor. The length of this list should be 'getNumProcs()'.

Definition at line 48 of file fei_ProcEqns.hpp.

References eqnsPerProc_.

Referenced by EqnCommMgr::exchangeEqnBuffers(), EqnCommMgr::exchangeIndices(), EqnCommMgr::exchangeSoln(), LinSysCoreFilter::getEqnsFromRHS(), EqnCommMgr::mirrorProcEqns(), and test_EqnCommMgr::test2().

std::vector<std::vector<int>*>& ProcEqns::procEqnNumbersPtr ( )
inline
std::vector<std::vector<int>*>& ProcEqns::procEqnLengthsPtr ( )
inline

Table containing the lengths of the equations in 'procEqnNumbersPtr()'. Returns NULL if no length data is present.

Definition at line 58 of file fei_ProcEqns.hpp.

References procEqnLengths_.

Referenced by EqnCommMgr::exchangeEqnBuffers(), EqnCommMgr::exchangeIndices(), and EqnCommMgr::mirrorProcEqnLengths().

void ProcEqns::addEqn ( int  eqnNumber,
int  proc 
)

Add an equation-number and associated processor number to the internal data structures. Equations may be added for multiple different procs.

Definition at line 65 of file fei_ProcEqns.cpp.

References internalAddEqn().

Referenced by EqnCommMgr::addLocalEqn(), EqnCommMgr::addRemoteIndices(), EqnCommMgr::exchangeRemEssBCs(), EqnCommMgr::gatherSharedBCs(), LinSysCoreFilter::getFromMatrix(), LinSysCoreFilter::getFromRHS(), EqnCommMgr::mirrorProcEqns(), test_EqnCommMgr::test2(), and test_Tables::test3().

void ProcEqns::addEqn ( int  eqnNumber,
int  eqnLength,
int  proc 
)

Add an equation-number/equation-length pair, and associated processor number, to the internal data structures. Equations may be added for multiple different procs.

Definition at line 71 of file fei_ProcEqns.cpp.

References internalAddEqn().

void ProcEqns::setProcEqnLengths ( int *  eqnNumbers,
int *  eqnLengths,
int  len 
)

Replace the 'procEqnLengthsPtr()' table with these lengths. There is a large potential for user error here. The number of equation/length pairs being provided here should equal the total number of equations already identified to this object. The internal table of lengths will be destroyed if it already exists, and replaced by this incoming data.

Parameters
eqnNumbersEquations for which lengths are being provided. These equations must already have been identified and associated with procs.
eqnLengthsEquation lengths.
lenThe number of equations and lengths.

Definition at line 127 of file fei_ProcEqns.cpp.

References fei::binarySearch(), fei::console_out(), eqnsPerProc_, FEI_ENDL, fei::numProcs(), procEqnLengths_, procEqnNumbers_, and procs_.

Referenced by EqnCommMgr::exchangeIndices(), EqnCommMgr::exchangeRemEssBCs(), LinSysCoreFilter::getFromMatrix(), and LinSysCoreFilter::getFromRHS().

void ProcEqns::deleteMemory ( )
private

Definition at line 57 of file fei_ProcEqns.cpp.

References procEqnLengths_, and procEqnNumbers_.

Referenced by ~ProcEqns().

void ProcEqns::internalAddEqn ( int  eqnNumber,
int  eqnLength,
int  proc 
)
private

Definition at line 76 of file fei_ProcEqns.cpp.

References eqnsPerProc_, procEqnLengths_, procEqnNumbers_, and procs_.

Referenced by addEqn().

Member Data Documentation

std::vector<int> ProcEqns::procs_
private

Definition at line 87 of file fei_ProcEqns.hpp.

Referenced by deepCopy(), getNumProcs(), internalAddEqn(), procsPtr(), and setProcEqnLengths().

std::vector<int> ProcEqns::eqnsPerProc_
private

Definition at line 88 of file fei_ProcEqns.hpp.

Referenced by deepCopy(), eqnsPerProcPtr(), internalAddEqn(), and setProcEqnLengths().

std::vector<std::vector<int>* > ProcEqns::procEqnNumbers_
private
std::vector<std::vector<int>* > ProcEqns::procEqnLengths_
private

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