Diffpack Documentation


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

Matrix(Type) Class Reference

abstract base class for matrices with arithmetic operations. More...

#include <Matrix_Type.h>

Inheritance diagram for Matrix(Type)::

HandleId Mat_Type MatDiag_Type MatEBE_Type MatSchur_Type MatSparse_Type MatTri_Type List of all members.

Public Methods

 Matrix(Type) ()
virtual ~Matrix(Type) ()
bool symmetricStorage ()
bool pivotingAllowed ()
virtual int getNoRows () const=0
virtual int getNoColumns () const=0
virtual int getNoNonzeroes () const=0
virtual void size (int &m, int &n) const=0
virtual int getWork (const MatrixWork work_tp=MATVEC_WORK) const
virtual real getStorage () const=0
virtual bool makeItSimilar (Handle(Matrix(Type)) &M) const=0
virtual bool redim (const Matrix(prm_Type) &pm)=0
virtual void optimizeDataStructure ()
virtual bool redim (const VecSimple(int) &ivec, const VecSimple(int) &jvec, int new_nrows, int new_ncolumns)=0
virtual void getIndexSet (VecSimple(int) &ivec, VecSimple(int) &jvec) const=0
virtual bool validIndexSet (const VecSimple(int) &ivec, const VecSimple(int) &jvec, const int new_nrows, const int new_ncolumns)=0
virtual Type& elm (int i, int j)=0
Matrix(Type)& operator= (const Matrix(Type) &X)
Matrix(Type)& operator= (Type a)
virtual void fill (const Matrix(Type) &X)=0
virtual void fill (Type a)=0
virtual void convertFrom (Matrix(Type) &X)
virtual void assemble (const Mat(Type) &em, const VecSimple(int) &idx_row_trans, const VecSimple(int) &idx_col_trans, int elm_no)
virtual void add (Matrix(Type) &bm, Matrix(Type) &cm)=0
virtual void add (Matrix(Type) &bm, char s, Matrix(Type) &cm)=0
virtual void add (Matrix(Type) &bm, Type b, Matrix(Type) &cm)=0
virtual void add (Type a, Matrix(Type) &bm, Type b, Matrix(Type) &cm)=0
virtual void mult (Type value)=0
virtual void prod (const Vector(Type) &xb, Vector(Type) &yb, TransposeMode tpmode=NOT_TRANSPOSED, bool add_to_yb=false) const=0
virtual void colManip (LinEqConstraint &constraint_eq, Vec(Type) &vc, VecSimple(bool) &essential_dof)
virtual void rowManip (LinEqConstraint &constraint_eq, Vec(Type) &vc, VecSimple(bool) &essential_dof)
void resetFact (bool is_factorized=false, FactType last_fact=LU_FACT, PivotType last_pivtp=NO_PIVOT)
bool factorized () const
bool factorized (FactType &fact_tp, PivotType &pivot_tp) const
virtual bool factorize (const FactStrategy &fstrategy)=0
virtual void forwBack (Vector(Type) &bb, Vector(Type) &xb)=0
virtual void SSOR1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const=0
virtual void SSORsolve (Vector(Type) &y, const Vector(Type) &c, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const=0
virtual void SOR1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const=0
virtual void SORsolve (Vector(Type) &y, const Vector(Type) &c, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const=0
virtual void Jacobi1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, TransposeMode tpmode=NOT_TRANSPOSED) const=0
virtual void Jacobisolve (Vector(Type) &y, const Vector(Type) &c, TransposeMode tpmode=NOT_TRANSPOSED) const=0
virtual void print (Os os, const char *header=NULL, int nentries_per_line=3) const=0
virtual void printAscii (Os os, const char *header=NULL) const=0
virtual void scan (Is is)=0
virtual void save (const char *filename, const char *name="X") const
virtual void load (const char *filename, const char *name="X")

Protected Methods

virtual void copy_matrix_attributes (const Matrix(Type) &X)
virtual void reset ()

Protected Attributes

bool symm_storage
bool pivot_allowed
bool is_factorized
FactType last_fact
PivotType last_pivtp
int prod_work
int matvec_work
int fact_work
int forwback_work
int inv_work
int det_work
int jacobi_work
int sor_work
int ssor_work

Detailed Description

abstract base class for matrices with arithmetic operations.

NAME: Matrix(Type) - abstract base class for matrices with arithmetic operations

DESCRIPTION:

The class serves as base for various matrix formats, such as standard (dense) matrices, sparse matrices and banded matrices. All these matrix formats have in common that the classes offer arithmetic operations like matrix-vector products, LU decompositions etc.


Constructor & Destructor Documentation

Matrix(Type)::Matrix_Type ( )
 

The only constructor requires no parameters. No further initialization of this class is required.

Matrix(Type)::~Matrix(Type) ( ) [virtual]
 


Member Function Documentation

void Matrix(Type)::Jacobi1it ( Vector(Type) & xnew,
const Vector(Type) & xold,
const Vector(Type) & b,
TransposeMode tpmode = NOT_TRANSPOSED ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::Jacobisolve ( Vector(Type) & y,
const Vector(Type) & c,
TransposeMode tpmode = NOT_TRANSPOSED ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::SOR1it ( Vector(Type) & xnew,
const Vector(Type) & xold,
const Vector(Type) & b,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::SORsolve ( Vector(Type) & y,
const Vector(Type) & c,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::SSOR1it ( Vector(Type) & xnew,
const Vector(Type) & xold,
const Vector(Type) & b,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::SSORsolve ( Vector(Type) & y,
const Vector(Type) & c,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::add ( Type a,
Matrix(Type) & bb,
Type b,
Matrix(Type) & cb ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::add ( Matrix(Type) & bb,
Type b,
Matrix(Type) & cb ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::add ( Matrix(Type) & bb,
char s,
Matrix(Type) & cb ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::add ( Matrix(Type) & bb,
Matrix(Type) & cb ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::assemble ( const Mat(Type) & em,
const VecSimple(int) & idx_row_trans,
const VecSimple(int) & idx_col_trans,
int elm_no ) [virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::colManip ( LinEqConstraint & constraint_eq,
Vec(Type) & vc,
VecSimple(bool) & essential_dof ) [virtual]
 

Reimplemented in Mat(Type), and MatSparse(Type).

void Matrix(Type)::convertFrom ( Matrix(Type) & X ) [virtual]
 

permits conversion between any two matrix formats. This functionality is based on format-independent matrix indexing together with each format's version of "getIndexSet", "validIndexSet" and the accompanying "redim". For this reason, the conversion process is slow for large matrix objects.

void Matrix(Type)::copy_matrix_attributes ( const Matrix(Type) & X ) [protected, virtual]
 

Reimplemented in Mat(Type).

Type & Matrix(Type)::elm ( int i,
int j ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

bool Matrix(Type)::factorize ( const FactStrategy & fstrategy ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

bool Matrix(Type)::factorized ( FactType & fact_tp,
PivotType & pivot_tp ) const
 

See documentation of one of the overloaded functions.

bool Matrix(Type)::factorized ( ) const [inline]
 

returns true if the matrix is factorized (may also return factorization and pivot types).

void Matrix(Type)::fill ( Type a ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::fill ( const Matrix(Type) & X ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::forwBack ( Vector(Type) & bb,
Vector(Type) & xb ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::getIndexSet ( VecSimple(int) & ivec,
VecSimple(int) & jvec ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

int Matrix(Type)::getNoColumns ( ) const [pure virtual]
 

returns the number of columns in the current object when viewed (logically) as a full matrix.

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

int Matrix(Type)::getNoNonzeroes ( ) const [pure virtual]
 

returns the number of nonzero entries represented in the current object. Note that this function does not take symmetric storage formats into account. That is, it also counts entry "a(j,i)" even if this value is not stored due to symmetry properties. This function does not check for stored zero entries, but counts all entries represented by the chosen matrix format.

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

int Matrix(Type)::getNoRows ( ) const [pure virtual]
 

returns the number of rows in the current object when viewed (logically) as a full matrix.

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), and MatTri(Type).

real Matrix(Type)::getStorage ( ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

int Matrix(Type)::getWork ( const MatrixWork work_tp = MATVEC_WORK ) const [virtual]
 

returns the operation count for the last computation of the type indicated by the "MatrixWork" argument.

Reimplemented in MatDiag(Type), MatEBE(Type), and MatSparse(Type).

void Matrix(Type)::load ( const char * filename,
const char * name = "X" ) [virtual]
 

quite similar to "save", this function permits Matlab data files to be entered into the current vector object. If available, the binary format is used, otherwise it reads plain ASCII files.

The version implemented in this base class is dummy, stating that the described functionality is not available. To overrule this behaviour, the "load" function should be implemented for the specific format(s).

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSparse(Type), and MatTri(Type).

bool Matrix(Type)::makeItSimilar ( Handle(Matrix(Type)) & M ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::mult ( Type value ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSparse(Type), and MatTri(Type).

Matrix(Type) & Matrix(Type)::operator= ( Type a ) [inline]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSparse(Type), and MatTri(Type).

Matrix(Type) & Matrix(Type)::operator= ( const Matrix(Type) & X ) [inline]
 

void Matrix(Type)::optimizeDataStructure ( ) [inline, virtual]
 

Reimplemented in MatSparse(Type).

bool Matrix(Type)::pivotingAllowed ( ) [inline]
 

void Matrix(Type)::print ( Os os,
const char * header = NULL,
int nentries_per_line = 3 ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::printAscii ( Os os,
const char * header = NULL ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::prod ( const Vector(Type) & xb,
Vector(Type) & yb,
TransposeMode tpmode = NOT_TRANSPOSED,
bool add_to_yb = false ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

bool Matrix(Type)::redim ( const VecSimple(int) & ivec,
const VecSimple(int) & jvec,
int new_nrows,
int new_ncolumns ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

bool Matrix(Type)::redim ( const Matrix(prm_Type) & pm ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::reset ( ) [protected, virtual]
 

Reimplemented in Mat(Type).

void Matrix(Type)::resetFact ( bool is_factorized = false,
FactType last_fact = LU_FACT,
PivotType last_pivtp = NO_PIVOT )
 

allows the user to manually specify the factorization/pivoting attributes for the current matrix object.

void Matrix(Type)::rowManip ( LinEqConstraint & constraint_eq,
Vec(Type) & vc,
VecSimple(bool) & essential_dof ) [virtual]
 

Reimplemented in Mat(Type), and MatSparse(Type).

void Matrix(Type)::save ( const char * filename,
const char * name = "X" ) const [virtual]
 

saves the current vector object in a file that is readable for Matlab. If available, the utilities for Matlab's internal binary data file format is used. Otherwise, the output is given as a plain ASCII file that can be loaded in Matlab.

The version implemented in this base class is dummy, stating that the described functionality is not available. To overrule this behaviour, the "save" function should be implemented for the specific format(s).

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::scan ( Is is ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

void Matrix(Type)::size ( int & m,
int & n ) const [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).

bool Matrix(Type)::symmetricStorage ( ) [inline]
 

bool Matrix(Type)::validIndexSet ( const VecSimple(int) & ivec,
const VecSimple(int) & jvec,
const int new_nrows,
const int new_ncolumns ) [pure virtual]
 

Reimplemented in Mat(Type), MatDiag(Type), MatEBE(Type), MatSchur(Type), MatSparse(Type), and MatTri(Type).


Member Data Documentation

int Matrix(Type)::det_work [protected]
 

int Matrix(Type)::fact_work [protected]
 

int Matrix(Type)::forwback_work [protected]
 

int Matrix(Type)::inv_work [protected]
 

bool Matrix(Type)::is_factorized [protected]
 

int Matrix(Type)::jacobi_work [protected]
 

FactType Matrix(Type)::last_fact [protected]
 

PivotType Matrix(Type)::last_pivtp [protected]
 

int Matrix(Type)::matvec_work [protected]
 

bool Matrix(Type)::pivot_allowed [protected]
 

int Matrix(Type)::prod_work [protected]
 

int Matrix(Type)::sor_work [protected]
 

int Matrix(Type)::ssor_work [protected]
 

bool Matrix(Type)::symm_storage [protected]
 


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