OOFEM 3.0
Loading...
Searching...
No Matches
oofem::RowColumn Class Reference

#include <rowcol.h>

Public Member Functions

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

Protected Attributes

int number
int start
std::vector< double > row
std::vector< 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 67 of file rowcol.h.

Constructor & Destructor Documentation

◆ RowColumn() [1/2]

oofem::RowColumn::RowColumn ( int n)

Definition at line 46 of file rowcol.C.

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

◆ RowColumn() [2/2]

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

Definition at line 56 of file rowcol.C.

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

Member Function Documentation

◆ atDiag() [1/2]

double & oofem::RowColumn::atDiag ( )
inline

Definition at line 91 of file rowcol.h.

References diag.

◆ atDiag() [2/2]

double oofem::RowColumn::atDiag ( ) const
inline

Definition at line 92 of file rowcol.h.

References diag.

◆ atL() [1/2]

double & oofem::RowColumn::atL ( int i)
inline

Definition at line 87 of file rowcol.h.

References row, and start.

◆ atL() [2/2]

double oofem::RowColumn::atL ( int i) const
inline

Definition at line 89 of file rowcol.h.

References row, and start.

◆ atU() [1/2]

double & oofem::RowColumn::atU ( int i)
inline

Definition at line 86 of file rowcol.h.

References column, and start.

◆ atU() [2/2]

double oofem::RowColumn::atU ( int i) const
inline

Definition at line 88 of file rowcol.h.

References column, and start.

◆ checkBounds()

void oofem::RowColumn::checkBounds ( int i) const

Definition at line 93 of file rowcol.C.

References number, OOFEM_ERROR, and start.

◆ checkSizeTowards()

void oofem::RowColumn::checkSizeTowards ( const IntArray & loc)

◆ dot()

double oofem::RowColumn::dot ( const FloatArray & b,
char c,
int first,
int last ) const

Definition at line 131 of file rowcol.C.

References column, row, and start.

◆ giveSize()

int oofem::RowColumn::giveSize ( ) const
inline

Definition at line 100 of file rowcol.h.

References number, and start.

◆ giveStart()

int oofem::RowColumn::giveStart ( ) const
inline

Definition at line 96 of file rowcol.h.

References start.

◆ growTo()

void oofem::RowColumn::growTo ( int newStart)
Todo
Might be better to just store the data in the opposite order instead, so that a resize "does the right thing" directly.

Definition at line 158 of file rowcol.C.

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

Referenced by checkSizeTowards().

◆ printYourself()

void oofem::RowColumn::printYourself ( ) const

Definition at line 177 of file rowcol.C.

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

◆ zero()

void oofem::RowColumn::zero ( )

Definition at line 195 of file rowcol.C.

References column, diag, and row.

Member Data Documentation

◆ column

std::vector<double> oofem::RowColumn::column
protected

Definition at line 73 of file rowcol.h.

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

◆ diag

double oofem::RowColumn::diag
protected

Definition at line 74 of file rowcol.h.

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

◆ number

int oofem::RowColumn::number
protected

Definition at line 70 of file rowcol.h.

Referenced by checkBounds(), giveSize(), growTo(), printYourself(), RowColumn(), and RowColumn().

◆ row

std::vector<double> oofem::RowColumn::row
protected

Definition at line 72 of file rowcol.h.

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

◆ start

int oofem::RowColumn::start
protected

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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011