#include <locmatrix.h>
Public Member Functions | |
void | addresses () |
void | allocate_ci () |
void | allocate_lm () |
void | initiate_ci (long id, long *colind) |
void | initiate_ci (long *colind) |
void | initiate_lm (long id, double *a) |
void | initiate_lm (double *a) |
void | initiate_nncr (long *a) |
void | initiate_var (long nrows, long ncolumns) |
void | lm01xm (gmatrix &a, gmatrix &b) |
void | lm01xv (double *a, double *b) |
void | lmt01xv (double *a, double *b) |
void | lmtxv (double *a, double *b) |
void | lmxmxlmt (gmatrix &a, gmatrix &b) |
void | lmxmxlmt01 (gmatrix &a, gmatrix &b) |
void | lmxv (double *a, double *b) |
locmatrix () | |
~locmatrix () | |
Public Attributes | |
long * | adr |
addresses of the first components in particular rows | |
long * | ci |
column indices | |
double * | lm |
array containing localization matrix | |
long | nc |
number of columns | |
long | nnc |
number of nonzero components | |
long * | nncr |
list of the numbers of nonzero entries in particular rows | |
long | nr |
number of rows | |
double | threshold |
threshold for zero |
class is considered for localization matrix localization matrix is used for localization of local matrices to global matrices and vice versa
localization matrix is stored in twodimensional array with variable lengths, only nonzero entries are stored
JK, 23.12.2006
Definition at line 16 of file locmatrix.h.
locmatrix | ( | ) |
void addresses | ( | void | ) |
function computes addresses of the first nonzero components in particular rows
JK, 23.12.2006
Definition at line 55 of file locmatrix.cpp.
References adr, nnc, nncr, and nr.
Referenced by smaggreg::localization_matrices().
void allocate_ci | ( | ) |
void allocate_lm | ( | ) |
void initiate_ci | ( | long | id, | |
long * | colind | |||
) |
function initiates array column indices ci only column indices of one row are initiated
id | - number of actual row | |
colind | - array of column indices |
JK, 23.12.2006
Definition at line 139 of file locmatrix.cpp.
void initiate_ci | ( | long * | colind | ) |
function initiates array column indices ci all components are initiated
colind | - array of column indices |
JK, 23.12.2006
Definition at line 122 of file locmatrix.cpp.
Referenced by smaggreg::localization_matrices(), and smaggreg::smoothed_prolong().
void initiate_lm | ( | long | id, | |
double * | a | |||
) |
function initiates array localization matrix
id | - number of actual row | |
a | - array contains entries of localization matrix |
JK, 23.12.2006
Definition at line 178 of file locmatrix.cpp.
void initiate_lm | ( | double * | a | ) |
function initiates array localization matrix all components are initiated
a | - array contains entries of localization matrix |
JK, 23.12.2006
Definition at line 162 of file locmatrix.cpp.
Referenced by smaggreg::smoothed_prolong().
void initiate_nncr | ( | long * | a | ) |
function initiates array of numbers of nonzero components in rows
a | - array containing numbers of nonzero components in rows a[i]=j - the i-th row contains j nonzero components |
JK, 23.12.2006
Definition at line 106 of file locmatrix.cpp.
Referenced by smaggreg::localization_matrices().
void initiate_var | ( | long | nrows, | |
long | ncolumns | |||
) |
function sets up basic variables
nrows | - number of rows | |
ncolumns | - number of columns |
JK, 23.12.2006
Definition at line 29 of file locmatrix.cpp.
References adr, nc, nncr, and nr.
Referenced by smaggreg::localization_matrices(), and smaggreg::smoothed_prolong().
function multiplies localization matrix by the matrix L A = B matrix A has m rows and n columns
localization matrix contains entries equal to 0 or 1 in this special case, function selects appropriate components and no real multiplication is required
JK, 23.12.2006
Definition at line 306 of file locmatrix.cpp.
References gmatrix::add_entry(), adr, ci, gmatrix::give_entry(), gmatrix::n, and nr.
void lm01xv | ( | double * | a, | |
double * | b | |||
) |
function multiplies localization matrix by the vector L a = b
localization matrix contains entries equal to 0 or 1 in this special case, function selects appropriate components and no real multiplication is required
JK, 23.12.2006
Definition at line 250 of file locmatrix.cpp.
void lmt01xv | ( | double * | a, | |
double * | b | |||
) |
function multiplies transposed localization matrix by the vector L^T a = b
localization matrix contains entries equal to 0 or 1 in this special case, function selects appropriate components and no real multiplication is required
JK, 23.12.2006
Definition at line 275 of file locmatrix.cpp.
void lmtxv | ( | double * | a, | |
double * | b | |||
) |
function reduces global matrix to coarse grid matrix number of rows of localization matrix must be less than number of columns
lm(m,n).a(n,n).lm^T(n,m)=b(m,m)
function stores selected matrix entries in the skyline storage format
a | - global matrix | |
b | - coarse grid matrix |
JK, 6.1.2007
Definition at line 443 of file locmatrix.cpp.
References adr, ci, gmatrix::give_entry(), lm, gmatrix::n, nncr, nr, and threshold.
function reduces global matrix to coarse grid matrix localization matrix must be Boolean and only one unit entry has to be in each row and column number of rows of localization matrix must be less than number of columns
lm(m,n).a(n,n).lm^T(n,m)=b(m,m)
function stores selected matrix entries in the skyline storage format
a | - global matrix | |
b | - coarse grid matrix |
JK, 27.12.2006
Definition at line 338 of file locmatrix.cpp.
References skyline::a, skyline::adr, skyline::allocadr(), skyline::allocglomat(), ci, gmatrix::give_entry(), skyline::neglobmat(), nr, gmatrix::sky, and threshold.
Referenced by smaggreg::local_aggregated_matrices().
void lmxv | ( | double * | a, | |
double * | b | |||
) |
long* adr |
addresses of the first components in particular rows
Definition at line 55 of file locmatrix.h.
Referenced by addresses(), initiate_ci(), initiate_lm(), initiate_var(), lm01xm(), lm01xv(), lmt01xv(), lmtxv(), lmxmxlmt(), lmxv(), locmatrix(), and ~locmatrix().
long* ci |
column indices
Definition at line 61 of file locmatrix.h.
Referenced by allocate_ci(), initiate_ci(), lm01xm(), lm01xv(), lmt01xv(), lmtxv(), lmxmxlmt(), lmxmxlmt01(), lmxv(), locmatrix(), and ~locmatrix().
double* lm |
array containing localization matrix
Definition at line 58 of file locmatrix.h.
Referenced by allocate_lm(), initiate_lm(), lmtxv(), lmxmxlmt(), lmxv(), locmatrix(), and ~locmatrix().
long nc |
number of columns
Definition at line 46 of file locmatrix.h.
Referenced by initiate_var(), lmt01xv(), lmtxv(), and locmatrix().
long nnc |
number of nonzero components
Definition at line 48 of file locmatrix.h.
Referenced by addresses(), allocate_ci(), allocate_lm(), and locmatrix().
long* nncr |
list of the numbers of nonzero entries in particular rows
Definition at line 53 of file locmatrix.h.
Referenced by addresses(), initiate_nncr(), initiate_var(), lmxmxlmt(), locmatrix(), and ~locmatrix().
long nr |
number of rows
Definition at line 44 of file locmatrix.h.
Referenced by addresses(), initiate_ci(), initiate_lm(), initiate_nncr(), initiate_var(), lm01xm(), lm01xv(), lmt01xv(), lmtxv(), lmxmxlmt(), lmxmxlmt01(), lmxv(), and locmatrix().
double threshold |
threshold for zero
Definition at line 50 of file locmatrix.h.
Referenced by lmxmxlmt(), and lmxmxlmt01().