Diffpack Documentation


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

AlgebraicContribs Class Reference

algebraic contributions. More...

#include <AlgebraicContribs.h>

Inheritance diagram for AlgebraicContribs::

HandleId List of all members.

Public Methods

 AlgebraicContribs (const DegFreeFD &dof_)
 AlgebraicContribs (const AlgebraicContribs &alg_contribs)
 AlgebraicContribs (int no_algdofs, const DegFreeFD &dof_)
 AlgebraicContribs (int no_equations, int no_couplings, const DegFreeFD &dof_)
 AlgebraicContribs (VecSimple(AlgebraicEquation) equations_, VecSimple(AlgebraicCoupling) couplings_, const DegFreeFD &dof_)
virtual ~AlgebraicContribs ()
AlgebraicContribs& operator= (const AlgebraicContribs &alg_contribs)
bool redim (int no_algdofs)
bool redim (int no_equations, int no_couplings)
bool redim (VecSimple(AlgebraicEquation) equations_, VecSimple(AlgebraicCoupling) couplings_)
void update ()
void reset ()
void grow (int neqns, int ndofs)
void grow (int n)
int getNoEquations () const
int getNoCouplings () const
void size (int &neqns, int &ndofs) const
int loc2globEqn (int loc_eqn) const
int glob2locEqn (int glob_eqn) const
int loc2globDof (int loc_dof) const
int glob2locDof (int glob_dof) const
AlgebraicEquationequation (int loc_eqn)
const AlgebraicEquationequation (int loc_eqn) const
AlgebraicCouplingcoupling (int loc_dof)
const AlgebraicCouplingcoupling (int loc_dof) const
void fill (VecSimple(AlgebraicEquation) equations_, VecSimple(AlgebraicCoupling) couplings_)
void insertEquation (int loc_eqn, NUMT coeff, int glob_dof)
void insertEquation (int loc_eqn, const VecSimple(NUMT) &coeffs, const VecSimple(int) &glob_dofs)
void insertCoupling (int loc_dof, NUMT coeff, int glob_eqn)
void insertCoupling (int loc_dof, const VecSimple(NUMT) &coeffs, const VecSimple(int) &glob_eqns)
void insertEquation (NUMT coeff, int glob_dof)
void insertEquation (const VecSimple(NUMT) &coeffs, const VecSimple(int) &glob_dofs)
void insertCoupling (NUMT coeff, int glob_eqn)
void insertCoupling (const VecSimple(NUMT) &coeffs, const VecSimple(int) &glob_eqns)
int assemble ()
bool isAssembled ()
const VecSimpleH(VecSimple(NUMT))* getCoeffs () const
const VecSimpleH(VecSimple(int))* getPattern () const
void insertRHS (const Vec(NUMT) &b_mod_, bool allocate=false)
virtual void print (Os os) const
virtual void scan (Is is)

Public Attributes

CLASS_INFO friend class FDM

Detailed Description

algebraic contributions.

NAME: AlgebraicContribs - algebraic contributions

DESCRIPTION:

This class represents information on extra algebraic degrees of freedom and extra equations, typically extended the algebraic problem arising from the discretization of a PDE problem.


Constructor & Destructor Documentation

AlgebraicContribs::AlgebraicContribs ( const DegFreeFD & dof_ )
 

There are several constructors to choose from, all accepting a "DegFreeFD" object. The simplest one just establishes connection with this "DegFreeFD" object, without allocating any algebraic equations or dofs. There is also a standard copy constructor.

There are two constrcutors accepting integer arguments together with a "DegFreeFD" object. These allocates space for "no_algdofs" extra equations and dofs, or in the other case, for "no_equations" extra equations and "no_couplings" extra dofs.

The last constructor accepts arrays of "AlgebraicEquation" and "AlgebraicCoupling" objects, containing the information needed for the extra equations and dofs.

Through the connection to the "DegFreeFD" object, the algebraic data contained in the "AlgebraicContribs" object will automatically contribute to the global matrix assembly.

AlgebraicContribs::AlgebraicContribs ( const AlgebraicContribs & alg_contribs )
 

See documentation of one of the overloaded constructor.

AlgebraicContribs::AlgebraicContribs ( int no_algdofs,
const DegFreeFD & dof_ )
 

See documentation of one of the overloaded constructor.

AlgebraicContribs::AlgebraicContribs ( int no_equations,
int no_couplings,
const DegFreeFD & dof_ )
 

See documentation of one of the overloaded constructor.

AlgebraicContribs::AlgebraicContribs ( VecSimple(AlgebraicEquation) equations_,
VecSimple(AlgebraicCoupling) couplings_,
const DegFreeFD & dof_ )
 

See documentation of one of the overloaded constructor.

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


Member Function Documentation

int AlgebraicContribs::assemble ( )
 

Walks through the PDE and algebraic parts of the problem assembling the sparsity pattern and coefficients that needs to be added to the global system, i.e., the part outside the PDE matrix. The function returns the number of non-zero entries in this algebraic part of the problem. This function will be called indirectly when the "DegFreeFD" object is assembling the global system.

const AlgebraicCoupling & AlgebraicContribs::coupling ( int loc_dof ) const
 

See documentation of one of the overloaded functions.

AlgebraicCoupling & AlgebraicContribs::coupling ( int loc_dof )
 

Provides read/write access to the algebraic coupling with local index "loc_dof".

const AlgebraicEquation & AlgebraicContribs::equation ( int loc_eqn ) const
 

See documentation of one of the overloaded functions.

AlgebraicEquation & AlgebraicContribs::equation ( int loc_eqn )
 

Provides read/write access to the algebraic equation with local index "loc_eqn".

void AlgebraicContribs::fill ( VecSimple(AlgebraicEquation) equations_,
VecSimple(AlgebraicCoupling) couplings_ )
 

Accepts arrays of "AlgebraicEquation" and "AlgebraicCoupling" objects and fill this information into the current "AlgebraicContribs" object.

const VecSimpleH(VecSimple(NUMT)) * AlgebraicContribs::getCoeffs ( ) const
 

Provides direct access to the storage of assembled coefficient values (only valid after calling "assemble").

int AlgebraicContribs::getNoCouplings ( ) const
 

Returns the number of extra algebraic couplings.

int AlgebraicContribs::getNoEquations ( ) const
 

Returns the number of extra algebraic equations.

const VecSimpleH(VecSimple(int)) * AlgebraicContribs::getPattern ( ) const
 

Provides direct access to the matrix pattern of assembled coefficient values (only valid after calling "assemble").

int AlgebraicContribs::glob2locDof ( int glob_dof ) const
 

Converts the global dof (coupling) index "glob_dof" to the corresponding local dof.

int AlgebraicContribs::glob2locEqn ( int glob_eqn ) const
 

Converts the global equation index "glob_eqn" to the corresponding local equation number.

void AlgebraicContribs::grow ( int n )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::grow ( int neqns,
int ndofs )
 

Extends the storage space to hold "neqns" more equations and "ndofs" more couplings. There is also an overloaded version implying

void AlgebraicContribs::insertCoupling ( const VecSimple(NUMT) & coeffs,
const VecSimple(int) & glob_eqns )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::insertCoupling ( NUMT coeff,
int glob_eqn )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::insertCoupling ( int loc_dof,
const VecSimple(NUMT) & coeffs,
const VecSimple(int) & glob_eqns )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::insertCoupling ( int loc_dof,
NUMT coeff,
int glob_eqn )
 

Inserts coefficient value and corresponding global equation index for local dof (coupling) number "loc_dof". This dof number must be in the range indicated when allocating storage space through use of the constructors or "redim" functions. There is also one version accepting arrays of coefficients and global equation indices. Finally, there are also two versions automatically advancing to the next value of "loc_dof".

void AlgebraicContribs::insertEquation ( const VecSimple(NUMT) & coeffs,
const VecSimple(int) & glob_dofs )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::insertEquation ( NUMT coeff,
int glob_dof )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::insertEquation ( int loc_eqn,
const VecSimple(NUMT) & coeffs,
const VecSimple(int) & glob_dofs )
 

See documentation of one of the overloaded functions.

void AlgebraicContribs::insertEquation ( int loc_eqn,
NUMT coeff,
int glob_dof )
 

Inserts coefficient value and corresponding global dof index for local equation number "loc_eqn". This equation number must be in the range indicated when allocating storage space through use of the constructors or "redim" functions. There is also one version accepting arrays of coefficients and global dof indices. Finally, there are also two versions automatically advancing to the next value of "loc_eqn".

void AlgebraicContribs::insertRHS ( const Vec(NUMT) & b_mod_,
bool allocate = false )
 

Inserts a correction vector for the algebraic part of the right-hand side.

bool AlgebraicContribs::isAssembled ( )
 

Returns true if the algebraic contribution has been assembled.

int AlgebraicContribs::loc2globDof ( int loc_dof ) const
 

Converts the local dof (coupling) index "loc_dof" to the corresponding global dof.

int AlgebraicContribs::loc2globEqn ( int loc_eqn ) const
 

Converts the local equation index "loc_eqn" to the corresponding global equation number.

AlgebraicContribs & AlgebraicContribs::operator= ( const AlgebraicContribs & alg_contribs )
 

void AlgebraicContribs::print ( Os os ) const [virtual]
 

bool AlgebraicContribs::redim ( VecSimple(AlgebraicEquation) equations_,
VecSimple(AlgebraicCoupling) couplings_ )
 

See documentation of one of the overloaded functions.

bool AlgebraicContribs::redim ( int no_equations,
int no_couplings )
 

See documentation of one of the overloaded functions.

bool AlgebraicContribs::redim ( int no_algdofs )
 

There are several "redim" functions, mirroring the three constructors capable of allocating data space for extra equations and dofs.

void AlgebraicContribs::reset ( )
 

Resets the number of algebraic equations and couplings to zero.

void AlgebraicContribs::scan ( Is is ) [virtual]
 

void AlgebraicContribs::size ( int & neqns,
int & ndofs ) const
 

Returns the number of extra algebraic equations and couplings.

void AlgebraicContribs::update ( )
 

Using information from the "DegFreeFD" object on the size of the PDE part of the problem, this function updates the global numbering of all algebraic entities. Normally, the user doesn't need to call this function explicitly.


Member Data Documentation

CLASS_INFO friend class AlgebraicContribs::FDM
 


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