NAME
AlgebraicEquation - algebraic equation, constraint
INCLUDE
include "AlgebraicEquation.h"
SYNTAX
//-----------------------------------------------------------------------------
class AlgebraicEquation : public AlgebraicDofBase
//-----------------------------------------------------------------------------
{
public :
AlgebraicEquation ();
AlgebraicEquation (const AlgebraicEquation& eqn);
AlgebraicEquation (int glob_eqn);
AlgebraicEquation (int glob_eqn,
const VecSimple(NUMT)& coeffs_,
const VecSimple(int)& col_idx);
virtual ~AlgebraicEquation () {}
AlgebraicEquation& operator=(const AlgebraicEquation& alg_eqn);
int getEqnNo() const;
void setEqnNo (int glob_eqn);
void print (Os os) const;
void scan (Is is);
friend Os& operator << (Os& os, const AlgebraicEquation& x);
friend Is& operator >> (Is& is , AlgebraicEquation& x);
CLASS_INFO
};
KEYWORDS
algerbraic equation, constraint,
DESCRIPTION
The class implements an algebraic equations that typically
extends the algebraic problem posed by the discretization of a
PDE-based model.
CONSTRUCTORS AND INITIALIZATION
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 correspond
ing to this equation (the sum of the number of PDE unknowns and
the number of extra algebraic unknowns), and sets the global
equation number.
MEMBER FUNCTIONS
bool redim - Redimensions the equation data, i.e., sets the total
number of columns for this equation (including PDE and algebraic
unknowns), the equation number for this equation (usually in the
range n+1,...,n+q where n is the number of PDE unknowns and q is
the number of algebraic equations), and the number of nonzero
coefficients in this equation. An overloaded version of this
function also accepts pre-filled coefficient and index arrays,
copying these data into the equation object.
coeff - Provides access to the i-th coefficient in the current
equation.
columnIndex - Provides access to the column index corresponding
to the i-th coefficient in the current equation.
setCoeff - Allows the setting of the i-th coefficient and its
column index.
getCoeff - Allows reading of the i-th coefficient and its column
index.
size - Returns the number of columns in this equation.
getNoOfCoeffs - Returns the number of nonzero coefficients in
this equation.
print - Prints the contents of this equation object to the speci
fied output stream.
scan - The format read by scan is same as written by the print
member function.
SEE ALSO
class AlgebraicDof, class AlgebraicContrib.
DEVELOPED BY
Numerical Objects AS
AUTHOR
Are Magnus Bruaset, Numerical Objects AS