Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

AlgebraicDofBase Class Reference

algebraic degree of freedom base class. More...

#include <AlgebraicDofBase.h>

Inheritance diagram for AlgebraicDofBase::

AlgebraicCoupling AlgebraicEquation List of all members.

Public Methods

 AlgebraicDofBase ()
 AlgebraicDofBase (const AlgebraicDofBase &alg_dof)
 AlgebraicDofBase (int glob_idx_)
 AlgebraicDofBase (int glob_idx_, const VecSimple(NUMT) &coeffs_, const VecSimple(int) &pos_idx_)
virtual ~AlgebraicDofBase ()
AlgebraicDofBase& operator= (const AlgebraicDofBase &alg_dof)
bool redim (int glob_idx_, const VecSimple(NUMT) &coeffs_, const VecSimple(int) &pos_idx_)
void update (int old_base, int new_base)
int getIndexNo () const
void setIndexNo (int glob_idx_)
int getNoEntries () const
NUMT& coeff (int i)
const NUMT& coeff (int i) const
int& position (int i)
const int& position (int i) const
void setCoeff (int i, NUMT coeff, int pos)
void getCoeff (int i, NUMT &coeff, int &pos) const
void insert (NUMT coeff, int pos)
void fill (int glob_idx_, const VecSimple(NUMT) &coeffs_, const VecSimple(int) &pos_idx_)
int find (int pos)
virtual void print (Os os) const=0
virtual void scan (Is is)=0

Protected Attributes

int glob_idx
SetOfNo(NUMT) coeffs
SetDistinct(int) pos_idx

Detailed Description

algebraic degree of freedom base class.

NAME: AlgebraicDofBase - algebraic degree of freedom base class

DESCRIPTION:

This class serves as the base of for algebraic entities extending the the algebraic problem posed by the discretization of a PDE-based model.


Constructor & Destructor Documentation

AlgebraicDofBase::AlgebraicDofBase ( )
 

The constructor with integer arguments allocates the indicated number of coefficients and sets all these coefficents to be zero. It also initializes the global size of the matrix row or column corresponding to the new equation or coupling (i.e., the sum of the number of affected PDE unknowns and the number of extra algebraic unknowns), and sets the global equation number. There is also a "redim" function doing the same type of initialization.

AlgebraicDofBase::AlgebraicDofBase ( const AlgebraicDofBase & alg_dof )
 

See documentation of one of the overloaded constructor.

AlgebraicDofBase::AlgebraicDofBase ( int glob_idx_ )
 

See documentation of one of the overloaded constructor.

AlgebraicDofBase::AlgebraicDofBase ( int glob_idx_,
const VecSimple(NUMT) & coeffs_,
const VecSimple(int) & pos_idx_ )
 

See documentation of one of the overloaded constructor.

AlgebraicDofBase::~AlgebraicDofBase ( ) [inline, virtual]
 


Member Function Documentation

const NUMT & AlgebraicDofBase::coeff ( int i ) const
 

See documentation of one of the overloaded functions.

NUMT & AlgebraicDofBase::coeff ( int i )
 

Provides access (read or write) to the "i"-th coefficient. The index "i" refers to the local numbering, not the global matrix numbering.

void AlgebraicDofBase::fill ( int glob_idx_,
const VecSimple(NUMT) & coeffs_,
const VecSimple(int) & pos_idx_ )
 

Sets the global index number and adds coefficient and position values from the argument arrays.

int AlgebraicDofBase::find ( int pos )
 

Searches through the stored data looking for a coefficient in global position "pos". The function returns the local index for this entry, which can then be input to "coeff" or similar functions. If there is no coefficient associated with "pos", the local index zero is returned.

void AlgebraicDofBase::getCoeff ( int i,
NUMT & coeff,
int & pos ) const
 

Provides read access to the "i"-th coefficient and its position index. The index "i" refers to the local numbering, not the global matrix numbering. This is a combination of "coeff" and "position".

int AlgebraicDofBase::getIndexNo ( ) const
 

Returns the global index (row or column number) for this contribution.

int AlgebraicDofBase::getNoEntries ( ) const
 

Returns the number of algebraic coefficients in the current contribution.

void AlgebraicDofBase::insert ( NUMT coeff,
int pos )
 

Adds a new coefficient in a new position "pos" to the contribution. An error message is issued when trying to insert a coefficient in an already occupied position.

AlgebraicDofBase & AlgebraicDofBase::operator= ( const AlgebraicDofBase & alg_dof )
 

const int & AlgebraicDofBase::position ( int i ) const
 

See documentation of one of the overloaded functions.

int & AlgebraicDofBase::position ( int i )
 

Provides access (read or write) to the "i"-th global position index.The index "i" refers to the local numbering, not the global matrix numbering.

void AlgebraicDofBase::print ( Os os ) const [pure virtual]
 

Reimplemented in AlgebraicCoupling, and AlgebraicEquation.

bool AlgebraicDofBase::redim ( int glob_idx_,
const VecSimple(NUMT) & coeffs_,
const VecSimple(int) & pos_idx_ )
 

Redimensions the current algebraic contribution (equation or coupling), i.e., sets the total number of rows or columns for this equation or coupling (including PDE and algebraic unknowns), the global index for this contribution (usually in the range n+1,...,n+q where n is the number of PDE unknowns and q is the number of algebraic contributions), and the number of nonzero coefficients in this contribution. An overloaded version of this function also accepts pre-filled coefficient and index arrays, copying these data into the object.

void AlgebraicDofBase::scan ( Is is ) [pure virtual]
 

Reimplemented in AlgebraicCoupling, and AlgebraicEquation.

void AlgebraicDofBase::setCoeff ( int i,
NUMT coeff,
int pos )
 

Provides write access to the "i"-th coefficient and its position index. The index "i" refers to the local numbering, not the global matrix numbering. This is a combination of "coeff" and "position".

void AlgebraicDofBase::setIndexNo ( int glob_idx_ )
 

Sets the global index (row or column number) for this contribution.

void AlgebraicDofBase::update ( int old_base,
int new_base )
 

Updates the global index and position indices due to a change of basis (i.e., the number of rows or columns in the original algebraic problem arising from the PDE part). The local numbering is unchanged.


Member Data Documentation

SetOfNo(NUMT) AlgebraicDofBase::coeffs [protected]
 

int AlgebraicDofBase::glob_idx [protected]
 

SetDistinct(int) AlgebraicDofBase::pos_idx [protected]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.