skyline Class Reference

#include <skyline.h>

List of all members.

Public Member Functions

void add_entry (double e, long ri, long ci)
void addmat_sky (double c, skyline &sky)
void addresses ()
void allocadr (long m)
void allocglomat ()
void assemble_from_cr (long crn, long *cradr, long *crci, double *cra)
void assemble_from_scr (long *scradr, long *scrci, double *scra, long neq, long *se)
long auxmax (long i, long j)
long auxmin (long i, long j)
void blokove2 (double *pole, long *adr, long n, long band)
void changedecomp ()
void column_lengths (gtopology *top)
void column_lengths_cr (long *cradr, long *ci)
void column_lengths_elem (long *cn, long ndofe)
void column_lengths_mult (long *ncn1, long *ncn2, long *mcn, long nm)
void column_lengths_scr (long *scradr, long *scrci, long *se)
void copy_sky (skyline &sky)
long decomp ()
void diag_check (double thr)
void diag_scale (double *d)
void diagaddresses ()
void eliminuj_4i_rev (double *a, long n, long s)
void faze1_block3 (double *a, double *b, long n, long s, long n2, long s2)
void faze2_block3 (double *a, double *b, long n, long s, long n2, long s2)
double give_entry (long ri, long ci)
long give_negm ()
void glocalize (matrix &b, long *rcn, long *ccn)
void initiate (gtopology *top, long ndof, long mespr)
void ker (double *r, long &nse, long *se, long ense, double limit, long tc)
void ldl_a12block (double *block, long nrdof)
void ldl_feti_sky (double *x, double *y, long nse, long *se, double zero)
void ldl_sky (double *x, double *y, double zero, long tc)
void ldl_sky3 (double *x, double *y, long tc)
void ldl_sky4 (double *x, double *y, long tc)
void ldl_sky_10 (double *x, double *y, double zero, long tc)
void ldlkon_sky (double *b, double *c, double *x, double *y, long m, long tc)
double ldlkoncount_sky (double *b, double *c, double *x, double *y, long m, long tc)
void ldlmxv_sky (double *b, double *c)
void localize (matrix &b, long *cn)
void localized (double *b, long *cn, long m)
void ltv (double *b, double *c)
void mat_entries (long *cradr, long *ci, double *cra)
void mat_entries_scr (long *scradr, long *scrci, double *scra, long *se)
void mult_localize (long nm, long *ncn1, long *ncn2, long *mcn)
void mxv_sky (double *b, double *c)
void napln_a (long i1, long i2, long band, double *pole, double *a, long *adr)
void napln_b (long i1, long i2, long band, double *pole, double *b, long *adr)
void neglobmat ()
void nullsky ()
void printdiag (FILE *out)
void printmat (FILE *out)
void scalmat_sky (double c)
void select_submatrix (skyline *smsky, long nsdof, long *sdof, FILE *out)
void setfact ()
void setnotfact ()
 skyline (void)
double * status ()
void uloz_a (long i1, long i2, long band, double *pole, double *a, long *adr)
void uloz_b (long i1, long i2, long band, double *pole, double *b, long *adr)
void utv (double *b, double *c)
 ~skyline (void)

Public Attributes

double * a
 stored matrix
long * adr
 addresses of diagonal entries
long decompid
long n
 number of rows of the matrix
long negm
 number of entries in the skyline, it is equal to the size of the array a

Detailed Description

class skyline

serves for matrix storage called skyline or profile skyline storage is available for symmetric real matrices columns are stored from diagonal entry to the farthest non-zero off-diagonal entry

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

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

matrices stored in skyline format can be eliminated

JK

Definition at line 30 of file skyline.h.


Constructor & Destructor Documentation

skyline ( void   ) 

Definition at line 10 of file skyline.cpp.

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

~skyline ( void   ) 

Definition at line 27 of file skyline.cpp.

References a, and adr.

Referenced by seqfeti::subdomain_matrices(), feti1::subdomain_matrix(), and seqfeti::~seqfeti().


Member Function Documentation

void add_entry ( double  e,
long  ri,
long  ci 
)

function adds required matrix entry

Parameters:
e - matrix entry
ri,ci - row and column indices

JK, 24.7.2005

Definition at line 2754 of file skyline.cpp.

References a, and adr.

Referenced by gmatrix::add_entry().

void addmat_sky ( double  c,
skyline sky 
)

function adds premultiplied components of matrix stored in another skyline by c to components of actual skyline

Parameters:
c - multiplicative coefficient
sky - another skyline

JK

Definition at line 1953 of file skyline.cpp.

References a, and negm.

void addresses ( void   ) 

function computes addresses of diagonal entries in the matrix

JK, 21.6.2001

Definition at line 243 of file skyline.cpp.

References adr, and n.

Referenced by z2_smoothing::alloc_ntn(), assemble_from_cr(), assemble_from_scr(), and 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 81 of file skyline.cpp.

References adr, memset(), and n.

Referenced by z2_smoothing::alloc_ntn(), assemble_from_cr(), assemble_from_scr(), initiate(), and locmatrix::lmxmxlmt01().

void allocglomat (  ) 

function allocates array containing global matrix

JK

Definition at line 276 of file skyline.cpp.

References a, memset(), and negm.

Referenced by z2_smoothing::alloc_ntn(), assemble_from_cr(), assemble_from_scr(), initiate(), and locmatrix::lmxmxlmt01().

void assemble_from_cr ( long  crn,
long *  cradr,
long *  crci,
double *  cra 
)

function assembles all data about matrix stored in the skyline which is defined in the compressed row format

Parameters:
cr - pointer to the compressed row format

JK, 8.5.2007

Definition at line 569 of file skyline.cpp.

References addresses(), allocadr(), allocglomat(), column_lengths_cr(), mat_entries(), n, neglobmat(), and negm.

Referenced by aggregator::local_matrices().

void assemble_from_scr ( long *  scradr,
long *  scrci,
double *  scra,
long  neq,
long *  se 
)

function assembles matrix of subdomain/aggregate etc. from matrix of the whole problem stored in the symmetric compressed row storage

Parameters:
scr - pointer to matrix stored in symmetric compressed rows
neq - number of selected equations (rows of the matrix)
se - array of selected unknown numbers

JK, 22.8.2007

Definition at line 716 of file skyline.cpp.

References addresses(), allocadr(), allocglomat(), column_lengths_scr(), mat_entries_scr(), n, neglobmat(), and negm.

Referenced by seqschur::subdomain_matrices(), and seqfeti::subdomain_matrices().

long auxmax ( long  i,
long  j 
)

either function decomposes matrix into L.D.L form or computes solution of linear algebraic system regular matrix of system is supposed

Parameters:
x - array containing system solution
y - array containing right hand side
zero - computer zero (for testing small numbers near zero)
tc - computation indicator

tc=1 - L.D.L decomposition and system solution tc=2 - only L.D.L. decomposition tc=3 - only back-substitution

JK, IS, 21.6.2001

Definition at line 949 of file skyline.cpp.

Referenced by ldl_sky3().

long auxmin ( long  i,
long  j 
)

Definition at line 956 of file skyline.cpp.

void blokove2 ( double *  pole,
long *  adr,
long  n,
long  band 
)
void changedecomp (  ) 

function changes indicator of decomposition (factorization)

JK

Definition at line 51 of file skyline.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

Parameters:
top - pointer to general topology

JK, 21.6.2001

Definition at line 168 of file skyline.cpp.

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

Referenced by initiate().

void column_lengths_cr ( long *  cradr,
long *  ci 
)

function computes column lengths the matrix is stored in the format compressed rows this strategy is developed for the BOSS method

Parameters:
cradr - array of the first entries in rows
ci - array of column indices

JK, 8.5.2007

Definition at line 526 of file skyline.cpp.

References adr, and n.

Referenced by assemble_from_cr().

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

JK, 21.6.2001

Definition at line 106 of file skyline.cpp.

References adr.

Referenced by column_lengths(), and z2_smoothing::column_lengths_nn().

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 136 of file skyline.cpp.

References adr.

Referenced by column_lengths().

void column_lengths_scr ( long *  scradr,
long *  scrci,
long *  se 
)

function computes lengths of columns

Parameters:
scr - pointer to matrix stored in symmetric compressed rows
se - array of selected unknown numbers

JK, 22.8.2007

Definition at line 603 of file skyline.cpp.

References adr, and n.

Referenced by assemble_from_scr().

void copy_sky ( skyline sky  ) 

function copies actual skyline into another one

Parameters:
sky - another skyline

JK, 25.1.2002

Definition at line 457 of file skyline.cpp.

References a, adr, n, and negm.

long decomp (  ) 

function returns indicator of decomposition (factorization)

decompid=0 - matrix is not decomposed (factorized) decompid=1 - matrix is decomposed (factorized)

JK

Definition at line 41 of file skyline.cpp.

References decompid.

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

void diag_check ( double  thr  ) 

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

JK, 25.8.2011

Definition at line 2907 of file skyline.cpp.

References a, adr, and n.

Referenced by gmatrix::diag_check().

void diag_scale ( double *  d  ) 

function scales matrix by its diagonal elements

JK, 23.5.2008

Definition at line 2783 of file skyline.cpp.

References a, adr, and n.

Referenced by gmatrix::diag_scale().

void diagaddresses (  ) 
void eliminuj_4i_rev ( double *  a,
long  n,
long  s 
)

Definition at line 1409 of file skyline.cpp.

Referenced by blokove2().

void faze1_block3 ( double *  a,
double *  b,
long  n,
long  s,
long  n2,
long  s2 
)

Definition at line 1554 of file skyline.cpp.

Referenced by blokove2().

void faze2_block3 ( double *  a,
double *  b,
long  n,
long  s,
long  n2,
long  s2 
)

Definition at line 1600 of file skyline.cpp.

References step().

Referenced by blokove2().

double give_entry ( long  ri,
long  ci 
)

function returns required matrix entry

Parameters:
ri,ci - row and column indices

JK, 24.7.2005

Definition at line 2729 of file skyline.cpp.

References a, and adr.

Referenced by gmatrix::give_entry().

long give_negm (  ) 

function returns number of stored matrix entries

JK, 16.8.2007

Definition at line 2773 of file skyline.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 388 of file skyline.cpp.

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

Referenced by gmatrix::glocalize().

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

function initiates skyline storage

Parameters:
top - pointer to general topology
ndof - number of rows/columns of the matrix
mespr - indicator of message printing

JK

Definition at line 492 of file skyline.cpp.

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

Referenced by gmatrix::initiate().

void ker ( double *  r,
long &  nse,
long *  se,
long  ense,
double  limit,
long  tc 
)

either function decomposes matrix into L.D.L form or computes base vectors of matrix kernel singular or non-singular matrices are accepted function is used especially in FETI method

Parameters:
r - base vectors of matrix kernel
nse - kernel dimension
se - array containing indices of linearly dependent equations
ense - estimation of number of kernel dimension
limit - linear dependency threshold
tc - computation indicator

tc=1 - only matrix decomposition tc=2 - only base vectors computation tc=3 - matrix decomposition and base vectors computation

JK, 25.3.1999

Definition at line 1997 of file skyline.cpp.

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

Referenced by seqfeti::kernel(), and gmatrix::kernel().

void ldl_a12block ( double *  block,
long  nrdof 
)

function assembles block 12 of matrix

| A_11 A_12 | A = | | | A_21 A_22 |

Parameters:
block - matrix containing required block
nrdof - number of uneliminated unknowns

JK, 24.7.2002

Definition at line 2592 of file skyline.cpp.

References a, adr, n, and nullv().

Referenced by gmatrix::a12block().

void ldl_feti_sky ( double *  x,
double *  y,
long  nse,
long *  se,
double  zero 
)

function computes vector y = K^+ x where K^+ is pseudoinverse matrix it is used in FETI method matrix must be decomposed into L.D.L^T form

Parameters:
x - left hand side (solution of the problem)
y - right hand side
nse - number of linearly dependent rows
se - indecies of linearly dependent rows
zero - computer zero

JK, 8.3.2002

Definition at line 2532 of file skyline.cpp.

References a, adr, and n.

Referenced by seqfeti::lagrmultdispl(), seqfeti::lagrmultnodunknowns(), gmatrix::ldl_feti(), seqfeti::mpcg(), and seqfeti::mprcg().

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

either function decomposes matrix into L.D.L form or computes solution of linear algebraic system nonsingular matrix of system is supposed

Parameters:
x - array containing system solution
y - array containing right hand side
zero - computer zero (for testing small numbers near zero)
tc - computation indicator

tc=1 - L.D.L decomposition and system solution tc=2 - only L.D.L. decomposition tc=3 - only back-substitution

JK, 21.6.2001

Definition at line 756 of file skyline.cpp.

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

Referenced by gmatrix::back_substitution(), aggregator::boss(), z2_smoothing::compute_rsigfull(), gmatrix::decompose_matrix(), aggregator::prepare_boss(), and gmatrix::solve_system().

void ldl_sky3 ( double *  x,
double *  y,
long  tc 
)

nejnovejsi verze

Definition at line 1015 of file skyline.cpp.

References a, aci, adr, auxmax(), g, and n.

void ldl_sky4 ( double *  x,
double *  y,
long  tc 
)
void ldl_sky_10 ( double *  x,
double *  y,
double  zero,
long  tc 
)
void ldlkon_sky ( double *  b,
double *  c,
double *  x,
double *  y,
long  m,
long  tc 
)

function eliminates internal unknowns function is used in the Schur complement method and the FETI-DP method internal unknowns must be at the beginning boundary unknowns must be at the end

Parameters:
b - condensed matrix, it is stored as dense matrix
c - condensed right hand side vector
x - vector of solution
y - right hand side vector
m - number of boundary unknowns
tc - computation indicator

tc=1 - condensation of the matrix and the right hand side vector (forward reduction) only, if the matrix is factorized, only modification of the right hand side vector is performed tc=2 - back-substitution only (matrix has to be factorized), tc=3 - partial back substitution only (used in the FETI-DP method)

tc=4 - condensation of the right hand side vector only (matrix has been factorized before)

JK, 23.7.1996

Definition at line 2143 of file skyline.cpp.

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

Referenced by gmatrix::condense(), seqschur::solve_system(), seqfeti::subdomain_matrices(), and feti1::subdomain_matrix().

double ldlkoncount_sky ( double *  b,
double *  c,
double *  x,
double *  y,
long  m,
long  tc 
)

function eliminates internal unknowns function is used in the Schur complement method and the FETI-DP method internal unknowns must be at the beginning boundary unknowns must be at the end

Parameters:
b - condensed matrix, it is stored as dense matrix
c - condensed right hand side vector
x - vector of solution
y - right hand side vector
m - number of boundary unknowns
tc - computation indicator

tc=1 - condensation of the matrix and the right hand side vector (forward reduction) only, if the matrix is factorized, only modification of the right hand side vector is performed tc=2 - back-substitution only (matrix has to be factorized), tc=3 - partial back substitution only (used in the FETI-DP method)

tc=4 - condensation of the right hand side vector only (matrix has been factorized before)

JK, 23.7.1996

Definition at line 2423 of file skyline.cpp.

References aci, adr, decompid, n, and no.

void ldlmxv_sky ( double *  b,
double *  c 
)

Definition at line 1928 of file skyline.cpp.

References a, adr, ltv(), n, and utv().

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

JK, 25.6.2001

Definition at line 295 of file skyline.cpp.

References a, adr, and matrix::m.

Referenced by gmatrix::localize().

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

function localizes local matrix b to the global matrix matrix b is stored as a dense matrix in row ordering b is double array pointer

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

JK, 25.6.2001

Definition at line 344 of file skyline.cpp.

References a, and adr.

Referenced by z2_smoothing::compute_ntn_sky(), and gmatrix::localized().

void ltv ( double *  b,
double *  c 
)

function computes L b = c

Parameters:
b - input vector
c - output vector

| 1 0 0 0 0 0 0 | | x 1 0 0 0 0 0 | A = | x x 1 0 0 0 0 | | x x x 1 0 0 0 | | x x x x 1 0 0 | | x x x x x 1 0 | | x x x x x x 1 |

JK

Definition at line 1910 of file skyline.cpp.

References a, adr, n, and nullv().

Referenced by ldlmxv_sky().

void mat_entries ( long *  cradr,
long *  ci,
double *  cra 
)

function assembles array of matrix entries

Parameters:
cradr - addresses in compressed row format
ci - column indices in compressed row format
cra - matrix entries stored in the compressed row format

JK, 8.5.2007

Definition at line 545 of file skyline.cpp.

References a, adr, and n.

Referenced by assemble_from_cr().

void mat_entries_scr ( long *  scradr,
long *  scrci,
double *  scra,
long *  se 
)

JK, 22.8.2007

Definition at line 671 of file skyline.cpp.

References a, adr, and n.

Referenced by assemble_from_scr().

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

function localizes contributions from Lagrange multipliers to the skyline 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 416 of file skyline.cpp.

References a, and adr.

Referenced by gmatrix::mult_localize().

void mxv_sky ( double *  b,
double *  c 
)

funkce resi soustavu linearnich algebraickych rovnic reseni se provadi rozkladem LDL matice soustavy je ulozena ve skylinu

a - matice soustavy x - vektor reseni y - vektor prave strany adr - pole adres diagonalnich prvku n - pocet neznamych tc - typ vypoctu tc=1 - provede se eliminace i zpetny chod tc=2 - provede se pouze eliminace tc=3 - provede se pouze zpetny chod

10.7.1996 funkce je totozna s procedurou ve fortranu, ktera je stejne rychla jako colsol od Batheho funkce byla testovana s vysledky od Batheho ldl ve fortranu stare ldl v c function multiplies matrix in skyline storage by vector b

Parameters:
b - array containing vector b
c - array containing resulting vector A.b

JK, 21.10.2001

Definition at line 1844 of file skyline.cpp.

References a, aci, adr, g, and n.

Referenced by feti1::lumpedprec(), and seqfeti::lumpedprec().

void napln_a ( long  i1,
long  i2,
long  band,
double *  pole,
double *  a,
long *  adr 
)

Definition at line 1488 of file skyline.cpp.

Referenced by blokove2().

void napln_b ( long  i1,
long  i2,
long  band,
double *  pole,
double *  b,
long *  adr 
)

Definition at line 1521 of file skyline.cpp.

Referenced by blokove2().

void neglobmat (  ) 

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

JK, 21.6.2001

Definition at line 264 of file skyline.cpp.

References adr, n, and negm.

Referenced by z2_smoothing::alloc_ntn(), assemble_from_cr(), assemble_from_scr(), initiate(), and locmatrix::lmxmxlmt01().

void nullsky (  ) 

function fills skyline array by zeros

JK, 25.1.2002

Definition at line 442 of file skyline.cpp.

References a, and negm.

Referenced by initiate().

void printdiag ( FILE *  out  ) 

function prints diagonal components of the matrix

Parameters:
out - output stream

JK

Definition at line 2715 of file skyline.cpp.

References a, adr, and n.

Referenced by gmatrix::printdiag().

void printmat ( FILE *  out  ) 

function prints matrix into output file

Parameters:
out - output stream

JK

Definition at line 2623 of file skyline.cpp.

References a, adr, n, and negm.

Referenced by gmatrix::printmat().

void scalmat_sky ( double  c  ) 

function multiplies skyline by c

Parameters:
c - multiplicative coefficient

JK

Definition at line 1968 of file skyline.cpp.

References a, and negm.

void select_submatrix ( skyline smsky,
long  nsdof,
long *  sdof,
FILE *  out 
)

Definition at line 2804 of file skyline.cpp.

References a, adr, n, and negm.

Referenced by feti1::subdomain_matrix().

void setfact (  ) 

set up indicator to factorized

Definition at line 60 of file skyline.cpp.

References decompid.

void setnotfact (  ) 

set up indicator to not factorized

Definition at line 68 of file skyline.cpp.

References decompid.

Referenced by gmatrix::prepmat().

double * status (  ) 

function returns status of array a

JK

Definition at line 93 of file skyline.cpp.

References a.

Referenced by initiate().

void uloz_a ( long  i1,
long  i2,
long  band,
double *  pole,
double *  a,
long *  adr 
)

Definition at line 1505 of file skyline.cpp.

Referenced by blokove2().

void uloz_b ( long  i1,
long  i2,
long  band,
double *  pole,
double *  b,
long *  adr 
)

Definition at line 1538 of file skyline.cpp.

Referenced by blokove2().

void utv ( double *  b,
double *  c 
)

function computes L^T b = c

Parameters:
b - input vector
c - output vector

| 1 x x x x x x | | 0 1 x x x x x | | 0 0 1 x x x x | A = | 0 0 0 1 x x x | | 0 0 0 0 1 x x | | 0 0 0 0 0 1 x | | 0 0 0 0 0 0 1 |

JK

Definition at line 1877 of file skyline.cpp.

References a, adr, n, and nullv().

Referenced by ldlmxv_sky().


Member Data Documentation

double* a
long* adr
long decompid

decomposition (factorization) indicator decompid=0 - matrix is not decomposed (factorized) decompid=1 - matrix is decomposed (factorized)

Definition at line 123 of file skyline.h.

Referenced by changedecomp(), decomp(), ker(), ldl_sky(), ldlkon_sky(), ldlkoncount_sky(), setfact(), setnotfact(), and skyline().

long n
long negm

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

Generated by  doxygen 1.6.2