ProcEqns Class Reference

#include <fei_ProcEqns.hpp>

List of all members.

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)


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.

ProcEqns::~ProcEqns (  )  [virtual]

Destructor

Definition at line 25 of file fei_ProcEqns.cpp.


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.

size_t ProcEqns::getNumProcs (  )  [inline]

Return the number of processors for which equations are held.

Definition at line 40 of file fei_ProcEqns.hpp.

std::vector<int>& ProcEqns::procsPtr (  )  [inline]

Return a list of processors.

Definition at line 43 of file fei_ProcEqns.hpp.

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.

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

Table of equation numbers. number-of-rows = 'getNumProcs()', length of row i is eqnsPerProcPtr()[i].

Definition at line 53 of file fei_ProcEqns.hpp.

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.

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.

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.

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:
eqnNumbers Equations for which lengths are being provided. These equations must already have been identified and associated with procs.
eqnLengths Equation lengths.
len The number of equations and lengths.

Definition at line 127 of file fei_ProcEqns.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Jul 12 09:31:28 2010 for FEI by  doxygen 1.4.7