OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::RowColumn Class Reference

This class implements a segment of a unsymmetric matrix stored in segmented form (skyline). More...

#include <rowcol.h>

Public Member Functions

 RowColumn (int, int)
 
 ~RowColumn ()
 
double & atU (int i)
 
double & atL (int i)
 
double & atDiag ()
 
void checkBounds (int)
 
void checkSizeTowards (const IntArray &)
 
double dot (const FloatArray &, char, int, int)
 
int giveStart ()
 
void growTo (int)
 
void zero ()
 
void printYourself ()
 
int giveSize ()
 
RowColumnGiveCopy ()
 

Protected Member Functions

 RowColumn (int, int, double *, double *, double)
 

Protected Attributes

int number
 
int start
 
double * row
 
double * column
 
double diag
 

Detailed Description

This class implements a segment of a unsymmetric matrix stored in segmented form (skyline).

A row-column segment i contains the following items :

  • the i-th row of the lower half of the matrix ('row')
  • the i-th column of the upper part of the matrix ('column')
  • the i-th diagonal coefficient of the matrix ('diag'). Since the profile of the matrix is supposed to be symmetric (but not its coefficients), the row and the column have the same length. The row stores coefficients from left to right, the column from up to down ; both exclude the diagonal coefficient. Both start at the first non-zero coefficient, whose position is 'start'.

Tasks:

  • storing and returning coefficients. For segment k:
    • any coefficient A(i,k) of the upper part of the matrix ( $ i < k $) is accessed through method 'atU(i)'. It belongs to the column of the segment ;
    • any coefficient A(k,i) of the lower part of the matrix ( $ i < k $) is accessed through method 'atL(i)'. It belongs to the row of the segment ;
    • the coefficient A(k,k) is obtained through method 'atDiag()' ;
  • enlarging itself in order to accommodate more coefficients (method 'growTo')
  • resetting to zero all of its coefficients (method 'reinitialized').

Definition at line 65 of file rowcol.h.

Constructor & Destructor Documentation

oofem::RowColumn::RowColumn ( int  n,
int  st 
)

Definition at line 44 of file rowcol.C.

References column, diag, number, OOFEM_ERROR, row, and start.

Referenced by GiveCopy().

oofem::RowColumn::~RowColumn ( )

Definition at line 66 of file rowcol.C.

References atL(), atU(), checkBounds(), column, row, and start.

oofem::RowColumn::RowColumn ( int  inumber,
int  istart,
double *  irow,
double *  icol,
double  idiag 
)
protected

Definition at line 286 of file rowcol.C.

References column, diag, number, row, and start.

Member Function Documentation

double& oofem::RowColumn::atL ( int  i)
inline
double& oofem::RowColumn::atU ( int  i)
inline
void oofem::RowColumn::checkBounds ( int  i)

Definition at line 95 of file rowcol.C.

References number, OOFEM_ERROR, and start.

Referenced by ~RowColumn().

void oofem::RowColumn::checkSizeTowards ( const IntArray loc)
double oofem::RowColumn::dot ( const FloatArray b,
char  c,
int  first,
int  last 
)
RowColumn * oofem::RowColumn::GiveCopy ( )

Definition at line 252 of file rowcol.C.

References column, diag, number, OOFEM_ERROR, row, RowColumn(), and start.

Referenced by oofem::SkylineUnsym::GiveCopy().

int oofem::RowColumn::giveSize ( )
inline

Definition at line 94 of file rowcol.h.

Referenced by oofem::SkylineUnsym::printStatistics().

void oofem::RowColumn::growTo ( int  newStart)
void oofem::RowColumn::printYourself ( )

Definition at line 218 of file rowcol.C.

References column, diag, number, row, and start.

void oofem::RowColumn::zero ( )

Definition at line 237 of file rowcol.C.

References column, diag, number, row, and start.

Referenced by oofem::SkylineUnsym::zero().

Member Data Documentation

double* oofem::RowColumn::column
protected

Definition at line 72 of file rowcol.h.

Referenced by dot(), GiveCopy(), growTo(), printYourself(), RowColumn(), zero(), and ~RowColumn().

double oofem::RowColumn::diag
protected

Definition at line 73 of file rowcol.h.

Referenced by GiveCopy(), printYourself(), RowColumn(), and zero().

int oofem::RowColumn::number
protected

Definition at line 69 of file rowcol.h.

Referenced by checkBounds(), GiveCopy(), growTo(), printYourself(), RowColumn(), and zero().

double* oofem::RowColumn::row
protected

Definition at line 71 of file rowcol.h.

Referenced by dot(), GiveCopy(), growTo(), printYourself(), RowColumn(), zero(), and ~RowColumn().

int oofem::RowColumn::start
protected

The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:41 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011