dskyline Class Reference

#include <dskyline.h>

List of all members.

Public Member Functions

void addmat_dsky (double c, dskyline &dsky)
void addresses ()
void allocadr (long m)
void allocglomat ()
void bicg (double *x, double *y, long ni, double err, long &ani, double &ares, double zero, long iv)
void changedecomp ()
void column_lengths (gtopology *top)
void column_lengths_elem (long *cn, long ndofe)
void column_lengths_mult (long *ncn1, long *ncn2, long *mcn, long nm)
void copy_dsky (dskyline &dsky)
long decomp ()
void diag_check (double thr, double *rhs)
 dskyline (void)
long give_negm ()
void glocalize (matrix &b, long *rcn, long *ccn)
void initiate (gtopology *top, long ndof, long mespr)
void localize (matrix &b, long *cn)
void localized (double *b, long *cn, long k)
void lu_dsky (double *x, double *y, double zero, long tc)
void lukon_dsky (double *b, double *c, double *x, double *y, double zero, long nr, long tc)
void mtxv_dsky (double *x, double *y)
void mult_localize (long nm, long *ncn1, long *ncn2, long *mcn)
void mxv_dsky (double *x, double *y)
void neglobmat ()
void nullsky ()
void printdiag (FILE *out)
void printmat (FILE *out)
void scalmat_dsky (double c)
void setfact ()
void setnotfact ()
double * status ()
 ~dskyline (void)

Public Attributes

double * a
 global matrix
long * adr
 addresses of diagonal entries
long decompid
 decomposition (factorization) indicator
long n
 number of rows of the matrix
long negm
 number of entries in the dskyline, it is equal to the size of the array a

Detailed Description

class dskyline

serves for matrix storage called double skyline or double profile double skyline storage is available generaly for non-symmetric real matrices

basic data double array a where matrix entries are stored long array adr where addresses of diagonal entries are stored long number n stands for number of rows (columns) of the matrix long number negm stands for number of entries of matrix

let skynegm be the number of stored matrix entries in the skyline storage scheme if the matrix is factorized into form LU, the matrix L is stored in the array a from 0 to skynegm and the matrix U is stored in the array a from skynegm to 2 skynegm in other words, the matrix entries with ri>ci are between 0 and skynegm while the matrix entries with ri<ci are between skynegm and 2 skynegm

basic relations array a has negm components array adr has n+1 components adr[n] is equal to negm

matrices stored in dskyline format can be eliminated

JK

Definition at line 37 of file dskyline.h.


Constructor & Destructor Documentation

dskyline ( void   ) 

Definition at line 6 of file dskyline.cpp.

References a, adr, decompid, n, and negm.

~dskyline ( void   ) 

Definition at line 23 of file dskyline.cpp.

References a, and adr.


Member Function Documentation

void addmat_dsky ( double  c,
dskyline dsky 
)

Definition at line 467 of file dskyline.cpp.

References a, and negm.

void addresses ( void   ) 

function computes addresses of diagonal entries in the matrix

21.2.2002

Definition at line 208 of file dskyline.cpp.

References adr, and n.

Referenced by initiate().

void allocadr ( long  m  ) 

function allocates array containing addresses of diagonal entries

Parameters:
m - number of unknowns in solved problems

JK

Definition at line 56 of file dskyline.cpp.

References adr, memset(), and n.

Referenced by initiate().

void allocglomat (  ) 

function allocates array containing global matrix

Definition at line 239 of file dskyline.cpp.

References a, memset(), and negm.

Referenced by initiate().

void bicg ( double *  x,
double *  y,
long  ni,
double  err,
long &  ani,
double &  ares,
double  zero,
long  iv 
)

function solves system of linear algebraic equations by bi-conjugate gradient method

Parameters:
x - array containing solution
y - array containing right hand side
ni - maximum number of iterations
err - required error (norm of residual vector)
ani - number of performed iterations
ares - attained error (norm of residual vector)
zero - computer zero
iv - initial values indicator

iv=0 - initial vector is zero vector iv=1 - initial vector is taken from x array

16.8.2000/20.9.2002

Definition at line 858 of file dskyline.cpp.

References mtxv_dsky(), mxv_dsky(), n, p, and ss().

Referenced by gmatrix::solve_system().

void changedecomp (  ) 

Definition at line 34 of file dskyline.cpp.

References decompid.

Referenced by gmatrix::changedecomp().

void column_lengths ( gtopology top  ) 

function prepares array of the column lengths lengths will be used for addresses of the diagonal entries column lenghts are collected in the array address

21.6.2001

Definition at line 137 of file dskyline.cpp.

References column_lengths_elem(), column_lengths_mult(), gtopology::endnodes, gtopology::gedges, gtopology::give_code_numbers(), gtopology::give_edge_code_numbers(), gtopology::give_endnode_code_numbers(), gtopology::give_ndofe(), endnode::ndofn, gedge::ndofnf, gedge::ndofnl, gtopology::ne, gtopology::nen, and gtopology::nged.

Referenced by initiate().

void column_lengths_elem ( long *  cn,
long  ndofe 
)

function computes contributions to the column lengths from one element

Parameters:
cn - array of code numbers on actual element
ndofe - number of DOFs on actual element

21.2.2002

Definition at line 76 of file dskyline.cpp.

References adr.

Referenced by column_lengths().

void column_lengths_mult ( long *  ncn1,
long *  ncn2,
long *  mcn,
long  nm 
)

function computes contributions to the column lengths from Lagrange multipliers

Parameters:
ncn1 - code numbers of first node (on one side of interface)
ncn2 - code numbers of second node (on the other side of interface)
mcn - code numbers of multipliers defined in between
nm - number of multipliers

JK, 6.8.2008

Definition at line 106 of file dskyline.cpp.

References adr.

Referenced by column_lengths().

void copy_dsky ( dskyline dsky  ) 

function fills skyline array by zero

25.1.2002

Definition at line 488 of file dskyline.cpp.

References a, adr, n, and negm.

long decomp (  ) 
void diag_check ( double  thr,
double *  rhs 
)

function checks diagonal entries

the function is used in some nonlinear nostationary problems where high jumps in coefficients occur some of element matrices are zero matrices and this function puts nonzero values on the diagonal

Parameters:
thr - prescribed threshold
rhs - vector of the right hand side

JK, 14.7.2008

Definition at line 990 of file dskyline.cpp.

References a, adr, and n.

Referenced by gmatrix::diag_check().

long give_negm (  ) 

function returns number of stored matrix entries

JK, 16.8.2007

Definition at line 972 of file dskyline.cpp.

References negm.

Referenced by gmatrix::give_negm().

void glocalize ( matrix b,
long *  rcn,
long *  ccn 
)

function localizes general rectangular (non-square) matrix b into global matrix

Parameters:
b - array containing local matrix
rcn - row code numbers
ccn - column code numbers

JK

Definition at line 330 of file dskyline.cpp.

References a, adr, matrix::m, matrix::n, and n.

void initiate ( gtopology top,
long  ndof,
long  mespr 
)

Definition at line 390 of file dskyline.cpp.

References addresses(), allocadr(), allocglomat(), column_lengths(), neglobmat(), negm, nullsky(), and status().

Referenced by gmatrix::initiate().

void localize ( matrix b,
long *  cn 
)

function localizes local matrix b to the global matrix matrix b is stored as a dense matrix in row ordering b is object of class matrix

Parameters:
b - array containing local matrix
cn - array containing code numbers of finite element

21.2.2002

Definition at line 269 of file dskyline.cpp.

References a, adr, matrix::m, and n.

Referenced by gmatrix::localize().

void localized ( double *  b,
long *  cn,
long  k 
)

function localizes local matrix b to the global matrix matrix b is stored as a dense matrix in row ordering b is object of class matrix

Parameters:
b - array containing local matrix
cn - array containing code numbers of finite element
k - order of local matrix (number of rows or columns)

21.2.2002

Definition at line 300 of file dskyline.cpp.

References a, adr, and n.

Referenced by gmatrix::localized().

void lu_dsky ( double *  x,
double *  y,
double  zero,
long  tc 
)

function decomposes general real matrix to LU form

| l_11 0 0 0 | | l_21 l_22 0 0 | L = | l_31 l_32 l_33 0 | | . . . . | | . . . . |

| 1 u_12 u_13 u_14 ... | | 0 1 u_23 u_24 ... | U = | 0 0 1 u_34 ... | | 0 0 0 1 ... | | . . . . |

Parameters:
x - array containing left hand side
x - array containing left hand side
zero - computer zero
tc - type of computation

tc=1 - LU decomposition and back substitution tc=2 - only LU decomposition tc=3 - only back substitution

JK, 21.2.2002

Definition at line 540 of file dskyline.cpp.

References a, adr, decompid, n, and print_err().

Referenced by gmatrix::back_substitution(), gmatrix::decompose_matrix(), and gmatrix::solve_system().

void lukon_dsky ( double *  b,
double *  c,
double *  x,
double *  y,
double  zero,
long  nr,
long  tc 
)

function eliminates internal unknowns of non-symmetric system of equations function is based on L.U matrix decomposition

Parameters:
b - reduced matrix (stored as dense matrix)
c - condensed right hand side vector
x - array containing unknowns (left hand side)
y - array containing right hand side
zero - computer zero
nr - number of remaining unknowns
tc - type of computation

JK, 18.4.2002

Definition at line 634 of file dskyline.cpp.

References a, adr, decompid, n, and print_err().

Referenced by gmatrix::condense().

void mtxv_dsky ( double *  x,
double *  y 
)

function computes matrix-vector product A.x=y

Parameters:
x - input vector
y - output vector

JK, 20.9.2002

Definition at line 445 of file dskyline.cpp.

References a, adr, and n.

Referenced by bicg().

void mult_localize ( long  nm,
long *  ncn1,
long *  ncn2,
long *  mcn 
)

function localizes contributions from Lagrange multipliers to the dskyline storage

Parameters:
nm - number of Lagrange multipliers
ncn1 - nodal code numbers of the first node (on one side of interface)
ncn2 - nodal code numbers of the second node (on the other side of interface)
mcn - code numbers of Lagrange multipliers defined between the previous nodes

JK, 8.8.2008

Definition at line 362 of file dskyline.cpp.

References a, adr, and n.

Referenced by gmatrix::mult_localize().

void mxv_dsky ( double *  x,
double *  y 
)

function computes matrix-vector product A.x=y

Parameters:
x - input vector
y - output vector

JK, 22.2.2002

Definition at line 415 of file dskyline.cpp.

References a, adr, and n.

Referenced by bicg().

void neglobmat (  ) 

function determines number of entries in the dskyline which is equal to the size of the array containing the global matrix

21.2.2002

Definition at line 229 of file dskyline.cpp.

References adr, n, and negm.

Referenced by initiate().

void nullsky (  ) 

function fills dskyline array by zero

21.2.2002

Definition at line 251 of file dskyline.cpp.

References a, and negm.

Referenced by initiate().

void printdiag ( FILE *  out  ) 

Definition at line 956 of file dskyline.cpp.

References a, adr, and n.

Referenced by gmatrix::printdiag().

void printmat ( FILE *  out  ) 

Definition at line 927 of file dskyline.cpp.

References a, adr, and n.

Referenced by gmatrix::printmat().

void scalmat_dsky ( double  c  ) 

Definition at line 475 of file dskyline.cpp.

References a, and negm.

void setfact (  ) 

Definition at line 40 of file dskyline.cpp.

References decompid.

void setnotfact (  ) 

Definition at line 44 of file dskyline.cpp.

References decompid.

Referenced by gmatrix::prepmat().

double * status (  ) 

Definition at line 63 of file dskyline.cpp.

References a.

Referenced by initiate().


Member Data Documentation

double* a
long* adr
long decompid

decomposition (factorization) indicator

Definition at line 85 of file dskyline.h.

Referenced by changedecomp(), decomp(), dskyline(), lu_dsky(), lukon_dsky(), setfact(), and setnotfact().

long n
long negm

number of entries in the dskyline, it is equal to the size of the array a

Definition at line 79 of file dskyline.h.

Referenced by addmat_dsky(), allocglomat(), copy_dsky(), dskyline(), give_negm(), initiate(), neglobmat(), nullsky(), and scalmat_dsky().


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

Generated by  doxygen 1.6.2