#include <gmatrix.h>
Public Member Functions | |
void | a12block (gtopology *top, double *block, long nrdof, FILE *out) |
void | add_entry (double e, long ri, long ci) |
void | addgm (double a, gmatrix &gm) |
void | alloc () |
void | auxdatsparsesolver (gtopology *top, FILE *out) |
void | back_incomplete_fact (double *x, double *y, double incompltresh) |
void | back_substitution (double *lhs, double *rhs) |
void | changedecomp () |
void | condense (gtopology *top, double *condmat, double *condvect, double *lhs, double *rhs, long nrdof, long tc, FILE *out) |
void | copygm (gmatrix &gm) |
void | dealloc () |
long | decomp () |
void | decompgmxv (double *a, double *b) |
void | decompose_matrix () |
void | diag_check (double thr, double *rhs) |
void | diag_scale (double *d) |
double | estim_spect_radius () |
double | give_entry (long ri, long ci) |
long | give_negm () |
void | glocalize (matrix &lm, ivector &rcn, ivector &ccn) |
gmatrix () | |
void | gmxv (double *a, double *b) |
void | incomplete_fact (double incompltresh) |
void | initiate (gtopology *top, long ndof, storagetype ats, long mespr, FILE *out) |
double | inverse_iteration (double *v, long ni, double err) |
void | kernel (double *rbm, long &nse, long *se, long ense, double limit, long tc) |
void | ldl_feti (double *lhs, double *rhs, long nse, long *se, double zero) |
void | localize (matrix &lm, ivector &cn, long eid) |
void | localized (double *lm, long *cn, long nc, long eid) |
void | mult_localize (long nm, long *ncn1, long *ncn2, long *mcn) |
double | power_method (double *v, long ni, double err) |
void | prepmat (double limit, long mespr) |
void | prepmat2 (gtopology *top, FILE *out) |
void | printdiag (FILE *out) |
void | printmat (FILE *out) |
void | scalgm (double a) |
void | setval (slesolv *ssle) |
void | solve_system (gtopology *top, precond &prec, double *lhs, double *rhs, FILE *out) |
~gmatrix () | |
Public Attributes | |
double | aerrcg |
attained norm of residual vector | |
long | anicg |
number of performed iterations | |
long * | auxsd |
auxiliary information about block structure for sparse direct solver | |
unsigned char | bsize |
block size in direct sparse solver | |
comprow * | cr |
densemat * | dm |
dskyline * | dsky |
elemmat * | em |
double | errcg |
maximum norm of residual vector (required accuracy) | |
double | indegamma |
long | iv |
double | limit |
threshold for rejection from compressed storages | |
MatrixPtr | Matrix |
long | n |
number of unknowns = number of rows/columns | |
long | nbdof |
number of rows which are not condensed | |
long | nicg |
maximum number of iterations in CG methods | |
double | omega |
parameters of preconditioning | |
long | pmat |
describes status of cr/scr - sparse exchange | |
symcomprow * | scr |
ISolver * | sdirect |
skyline * | sky |
linsolvertype | tlinsol |
type of solver of system of linear algebraic equations | |
precondtype | tprec |
type of preconditioning | |
storagetype | ts |
type of matrix storage | |
linsolvertype | tsol |
type of condensation if tlinsol indicates condensation | |
double | zero |
computer zero |
class describing a general matrix
JK
Definition at line 26 of file gmatrix.h.
gmatrix | ( | ) |
~gmatrix | ( | ) |
void a12block | ( | gtopology * | top, | |
double * | block, | |||
long | nrdof, | |||
FILE * | out | |||
) |
Definition at line 1786 of file gmatrix.cpp.
References ISolver::GetA12block(), skyline::ldl_a12block(), pmat, prepmat2(), print_err(), sdirect, sky, skyline_matrix, spdirldl, and ts.
Referenced by dpfeti::solve_system().
void add_entry | ( | double | e, | |
long | ri, | |||
long | ci | |||
) |
function adds matrix entry to required position
e | - matrix entry | |
ri,ci | - row and column indices |
JK, 25.7.2005
Definition at line 2059 of file gmatrix.cpp.
References symcomprow::add_entry(), comprow::add_entry(), skyline::add_entry(), densemat::add_entry(), compressed_rows, cr, dense_matrix, dm, double_skyline, print_err(), scr, sky, skyline_matrix, symm_comp_rows, and ts.
Referenced by locmatrix::lm01xm().
void addgm | ( | double | a, | |
gmatrix & | gm | |||
) |
function adds to general matrix another general matrix premultiplied by scalar a
Definition at line 1640 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, print_err(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by damping_matrix(), difference_method(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), newmark_method(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), one_step_linear(), one_step_nonlinear(), one_step_nonlinear_dform(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_one_step_linear(), par_one_step_nonlinear(), par_one_step_trfel_linear(), par_one_step_trfel_nonlinear(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), solve_nonstationary_growing_vform(), and subspace_shift_iter_ortho().
void alloc | ( | ) |
function allocates appropriate storage scheme
JK
Definition at line 84 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, lapack_stor, petsc, pmat, print_err(), scr, sdirect, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by initiate(), and schurcompl::solve_red_sys_fin().
void auxdatsparsesolver | ( | gtopology * | top, | |
FILE * | out | |||
) |
function assembles data for sparse direct solver especially data for condensation are assembled
top | - pointer to the general topology | |
out | - output file |
JK
Definition at line 872 of file gmatrix.cpp.
References gnode::ai, auxsd, gtopology::give_dof(), gtopology::gnodes, gnode::ndofn, gtopology::nn, and print_err().
Referenced by initiate().
void back_incomplete_fact | ( | double * | x, | |
double * | y, | |||
double | incompltresh | |||
) |
function computes incomplete factorization of the matrix
incompltresh | - treshold for incomplete factorization |
JK, 15.3.2007
Definition at line 1429 of file gmatrix.cpp.
References dense_matrix, dm, densemat::ill(), print_err(), ts, and zero.
Referenced by precond::preconditioning().
void back_substitution | ( | double * | lhs, | |
double * | rhs | |||
) |
function computes back substitution
lhs | - array containing vector of solution | |
rhs | - array containing vector of the right hand side |
JK
Definition at line 1323 of file gmatrix.cpp.
References dskyline::decomp(), densemat::decomp(), skyline::decomp(), dense_matrix, dm, double_skyline, dsky, ISolver::IsFactorized(), lapack_sol, ldl, skyline::ldl_sky(), densemat::lu(), lu, dskyline::lu_dsky(), pardisolver, print_err(), ISolver::ReFactorize(), sdirect, sky, skyline_matrix, ISolver::Solve(), spdirldl, spdirll, spdirlu, tlinsol, ts, and zero.
Referenced by lplate::cg(), dpfeti::corner_displ(), dpfeti::matxvect(), lplate::nodaldisplacements(), lplate::pcg(), and dpfeti::rhs_dpfeti().
void changedecomp | ( | ) |
Definition at line 1899 of file gmatrix.cpp.
References dskyline::changedecomp(), skyline::changedecomp(), densemat::changedecomp(), compressed_rows, dense_matrix, dm, double_skyline, dsky, print_err(), sky, skyline_matrix, symm_comp_rows, and ts.
void condense | ( | gtopology * | top, | |
double * | condmat, | |||
double * | condvect, | |||
double * | lhs, | |||
double * | rhs, | |||
long | nrdof, | |||
long | tc, | |||
FILE * | out | |||
) |
function condenses matrix
top | - pointer to the general topology | |
condmat | - reduced matrix (stored as dense matrix) | |
condvect | - reduced vector | |
lhs | - the left hand side (non-reduced) | |
rhs | - the right hand side (non-reduced) | |
nrdof | - number of condensed unknowns | |
tc | - computation type | |
tc=1 | - condensation (forward reduction) only | |
tc=2 | - back-substitution only |
JK
Definition at line 1460 of file gmatrix.cpp.
References ISolver::condense(), dense_matrix, dm, double_skyline, dsky, densemat::gempkon(), skyline::ldlkon_sky(), dskyline::lukon_dsky(), n, gtopology::nidof, pmat, prepmat2(), print_err(), sdirect, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, ts, and zero.
Referenced by dpfeti::compute_displ(), dpfeti::corner_displ(), dpfeti::matxvect(), dpfeti::rhs_dpfeti(), solve_linear_floating_subdomains_old(), solve_load_balancing(), schurcompl::solve_system(), dpfeti::solve_system(), saddpoint::solve_system(), solve_system(), and dpfeti::vectors_br_bm().
void copygm | ( | gmatrix & | gm | ) |
function copies a general matrix to another general matrix gm the argument is filled
gm | - general matrix where the copy will be stored |
JK, 17.3.2007
Definition at line 1739 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, print_err(), scr, sky, skyline_matrix, symm_comp_rows, and ts.
Referenced by precond::initiation(), newton_raphson_coupl_new(), nonlinear_nonstat_solv(), one_step_nonlinear(), par_one_step_nonlinear(), and par_one_step_trfel_nonlinear().
void dealloc | ( | void | ) |
function deallocates storage scheme
Definition at line 162 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, lapack_stor, petsc, print_err(), scr, sdirect, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
long decomp | ( | ) |
Definition at line 1987 of file gmatrix.cpp.
References dskyline::decomp(), skyline::decomp(), densemat::decomp(), dense_matrix, dm, double_skyline, dsky, print_err(), sky, skyline_matrix, and ts.
Referenced by schurcompl::solve_system().
void decompgmxv | ( | double * | a, | |
double * | b | |||
) |
function computes matrix-vector multiplication matrix is decomposed
a,b | - array containing vector components |
JK, 14.6.2002
Definition at line 1615 of file gmatrix.cpp.
References print_err(), sdirect, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, and ts.
void decompose_matrix | ( | ) |
function decomposes (factorizes) matrix to the LU or LDL or LL form
JK
Definition at line 1251 of file gmatrix.cpp.
References dskyline::decomp(), densemat::decomp(), skyline::decomp(), dense_matrix, dm, double_skyline, dsky, ISolver::IsFactorized(), lapack_sol, ldl, skyline::ldl_sky(), densemat::lu(), lu, dskyline::lu_dsky(), print_err(), ISolver::ReFactorize(), sdirect, sky, skyline_matrix, spdirldl, spdirll, spdirlu, tlinsol, ts, and zero.
Referenced by dpfeti::arrmatrix(), smaggreg::decompose_aggreg_matrix(), and lplate::solve_system().
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
JK, 14.7.2008
Definition at line 2168 of file gmatrix.cpp.
References dskyline::diag_check(), skyline::diag_check(), double_skyline, dsky, print_err(), sky, skyline_matrix, and ts.
Referenced by lin_nonstat_dform(), nonlin_nonstat_dform(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_nr_dform(), one_step_nonlinear_dform(), and par_solve_nonlinear_nonstationary_problem_dform().
void diag_scale | ( | double * | d | ) |
function scales matrix by its diagonal elements
JK, 23.5.2008
Definition at line 2140 of file gmatrix.cpp.
References dense_matrix, skyline::diag_scale(), densemat::diag_scale(), dm, print_err(), sky, skyline_matrix, and ts.
double estim_spect_radius | ( | ) |
function estimates spectral radius
the estimates are based on the Gershgorin circle theorem for details see G.H. Golub, C.F. Van Loan: Matrix computations. The Johns Hopkins University Press, 3rd edition, page 320, 1996
JK, 27.8.2008
Definition at line 2302 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, comprow::estim_spect_radius(), densemat::estim_spect_radius(), print_err(), and ts.
Referenced by aggregator::prepare_boss().
double give_entry | ( | long | ri, | |
long | ci | |||
) |
function returns required matrix entry
ri,ci | - row and column indices |
JK, 24.7.2005
Definition at line 2018 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, symcomprow::give_entry(), comprow::give_entry(), skyline::give_entry(), densemat::give_entry(), print_err(), scr, sky, skyline_matrix, symm_comp_rows, and ts.
Referenced by locmatrix::lm01xm(), locmatrix::lmxmxlmt(), locmatrix::lmxmxlmt01(), and verlet_method().
long give_negm | ( | ) |
function returns number of stored matrix entries
JK, 16.8.2007
Definition at line 2094 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, symcomprow::give_negm(), comprow::give_negm(), dskyline::give_negm(), skyline::give_negm(), densemat::give_negm(), print_err(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
function localizes local matrix lm to the global one matrix km can be nonsquare, it means with different number of rows and columns
lm | - local chracteristic matrix of the element | |
rcn | - array containing row code numbers | |
ccn | - array containing column code numbers |
14.8.2002
Definition at line 587 of file gmatrix.cpp.
References ivector::a, compressed_rows, dense_matrix, dm, double_skyline, skyline::glocalize(), densemat::glocalize(), print_err(), sky, skyline_matrix, symm_comp_rows, and ts.
Referenced by first_order_matrix(), stiffness_matrix(), and zero_order_matrix().
void gmxv | ( | double * | a, | |
double * | b | |||
) |
function computes matrix-vector multiplication
a,b | - array containing vector components |
JK,14.6.2002
Definition at line 1565 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, print_err(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by dloadcase::assemble(), aggregator::boss(), aggregator::coarse_matrix(), difference_method(), inverse_iteration(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), aggregator::mulA(), newmark_method(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), one_step_linear(), one_step_nonlinear(), one_step_nonlinear_dform(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_one_step_linear(), par_one_step_nonlinear(), par_one_step_trfel_linear(), par_one_step_trfel_nonlinear(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), parallel_inverse_iteration(), parallel_subspace_iter_ortho(), power_method(), residuum(), response_spectrum_method(), solve_nonlinear_stationary_problem_old(), solve_nonlinear_stationary_problem_pokus(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), solve_nonstationary_growing_vform(), parcongrad::solve_system(), boundparcongrad::solve_system(), subspace_iter_jac(), subspace_iter_ortho(), and subspace_shift_iter_ortho().
void incomplete_fact | ( | double | incompltresh | ) |
function computes incomplete factorization of the matrix
incompltresh | - treshold for incomplete factorization |
JK, 15.3.2007
Definition at line 1403 of file gmatrix.cpp.
References dense_matrix, dm, densemat::ill(), print_err(), ts, and zero.
Referenced by precond::initiation().
void initiate | ( | gtopology * | top, | |
long | ndof, | |||
storagetype | ats, | |||
long | mespr, | |||
FILE * | out | |||
) |
initialization of storage schemes
top | - pointer to the general topology | |
ndof | - number of degrees of freedom = number of unknowns | |
ats | - type of storage of the matrix | |
mespr | - indicator of message printing |
JK
Definition at line 236 of file gmatrix.cpp.
References symcomprow::a, comprow::a, symcomprow::adr, comprow::adr, alloc(), auxdatsparsesolver(), auxsd, bsize, cg, symcomprow::ci, comprow::ci, compressed_rows, conden, cr, dense_matrix, dm, double_skyline, dsky, eDSSFactorizationLDLT, eDSSFactorizationLDLTIncomplete, eDSSFactorizationLLT, eDSSFactorizationLU, element_matrices, em, gtopology::gnodes, ISolver::Initialize(), elemmat::initiate(), symcomprow::initiate(), comprow::initiate(), dskyline::initiate(), skyline::initiate(), densemat::initiate(), ISolver::IsInitialized(), lapack_stor, ISolver::LoadMCN(), ISolver::LoadZeros(), n, gnode::ndofn, gtopology::nn, petsc, print_err(), scr, sdirect, ISolver::SetMatrixPattern(), sky, skyline_matrix, sparseindec, spdirect_stor_cr, spdirect_stor_scr, spdirldl, spdirll, spdirlu, symm_comp_rows, tlinsol, tprec, ts, and tsol.
Referenced by dpfeti::arrmatrix(), capacity_matrix(), conductivity_matrix(), damping_matrix(), first_order_matrix(), initial_stiffness_matrix(), mass_matrix(), schurcompl::solve_red_sys_fin(), seqschur::solve_red_sys_fin(), stiffness_matrix(), and zero_order_matrix().
double inverse_iteration | ( | double * | v, | |
long | ni, | |||
double | err | |||
) |
function performes the inverse iteration method the method computes the smallest eigenvalue of matrix
v | - array containing the eigenvector | |
ni | - maximum number of iterations | |
err | - required error |
JK, 28.5.2008
Definition at line 2247 of file gmatrix.cpp.
References cmulv(), copyv(), dm, densemat::lu(), n, p, ss(), and zero.
void kernel | ( | double * | rbm, | |
long & | nse, | |||
long * | se, | |||
long | ense, | |||
double | limit, | |||
long | tc | |||
) |
function computes kernel of matrix
rbm | - array containing the rigid body modes | |
nse | - the number of linearly dependent rows | |
se | - array of linearly dependent rows | |
ense | - estimated number of linearly dependent rows | |
limit | - the threshold for linear dependency determination | |
tc | - computation type |
JK
Definition at line 1522 of file gmatrix.cpp.
References dense_matrix, dm, skyline::ker(), densemat::ker(), print_err(), sky, skyline_matrix, and ts.
Referenced by feti1::solve_system().
void ldl_feti | ( | double * | lhs, | |
double * | rhs, | |||
long | nse, | |||
long * | se, | |||
double | zero | |||
) |
function computes
JK
Definition at line 1545 of file gmatrix.cpp.
References skyline::ldl_feti_sky(), print_err(), sky, skyline_matrix, and ts.
Referenced by feti1::lagrmultdispl(), and feti1::mpcg().
function localizes local matrix lm to the global one matrix is stored in the object of the class matrix
lm | - local chracteristic matrix of the element | |
cn | - array containing code numbers | |
eid | - element id | |
ndofe | - the number of DOfs 16.7.2002 |
Definition at line 453 of file gmatrix.cpp.
References ivector::a, compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, lapack_stor, elemmat::localize(), symcomprow::localize(), comprow::localize(), dskyline::localize(), skyline::localize(), densemat::localize(), matrix::m, ivector::n, petsc, print_err(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by capacity_matrix(), conductivity_matrix(), first_order_matrix(), initial_stiffness_matrix(), mass_matrix(), stiffness_matrix(), and zero_order_matrix().
void localized | ( | double * | lm, | |
long * | cn, | |||
long | nc, | |||
long | eid | |||
) |
function localizes local matrix lm to the global one matrix is stored in array of type double
lm | - local chracteristic matrix of the element | |
cn | - array containing code numbers | |
nc | - number of rows and columns | |
eid | - element id |
16.7.2002
Definition at line 523 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, lapack_stor, elemmat::localized(), symcomprow::localized(), comprow::localized(), dskyline::localized(), skyline::localized(), densemat::localized(), petsc, print_err(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by dpfeti::arrmatrix(), schurcompl::solve_red_sys_fin(), and seqschur::solve_red_sys_fin().
void mult_localize | ( | long | nm, | |
long * | ncn1, | |||
long * | ncn2, | |||
long * | mcn | |||
) |
function localizes contributions from Lagrange multipliers to the general matrix
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 626 of file gmatrix.cpp.
References dense_matrix, dm, double_skyline, dsky, dskyline::mult_localize(), skyline::mult_localize(), densemat::mult_localize(), print_err(), sky, skyline_matrix, and ts.
Referenced by gtopology::edge_localization(), and gtopology::endnodes_localization().
double power_method | ( | double * | v, | |
long | ni, | |||
double | err | |||
) |
function performes the power method the method computes the largest eigenvalue of matrix
v | - array containing the eigenvector | |
ni | - maximum number of iterations | |
err | - required error |
JK, 28.5.2008
Definition at line 2197 of file gmatrix.cpp.
void prepmat | ( | double | limit, | |
long | mespr | |||
) |
function initializes general matrix
limit | - threshold for selection of matrix entries | |
mespr | - message printing indicator |
JK
Definition at line 656 of file gmatrix.cpp.
References compressed_rows, cr, elemmat::decompid, symcomprow::decompid, comprow::decompid, densemat::decompid, dense_matrix, dm, double_skyline, dsky, element_matrices, em, lapack_stor, symcomprow::negm, comprow::negm, petsc, print_err(), scr, dskyline::setnotfact(), skyline::setnotfact(), sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by dpfeti::arrmatrix(), capacity_matrix(), conductivity_matrix(), damping_matrix(), first_order_matrix(), initial_stiffness_matrix(), mass_matrix(), schurcompl::solve_red_sys_fin(), seqschur::solve_red_sys_fin(), stiffness_matrix(), and zero_order_matrix().
void prepmat2 | ( | gtopology * | top, | |
FILE * | out | |||
) |
function initializes some sparse solvers it copies data stored in the compressed row or symmetric compressed row format to a sparse solver
top | - pointer to general topology | |
out | - output file for auxiliary output |
Definition at line 769 of file gmatrix.cpp.
References symcomprow::a, comprow::a, symcomprow::adr, comprow::adr, symcomprow::ci, comprow::ci, compressed_rows, cr, dense_matrix, double_skyline, element_matrices, ISolver::IsAllocated(), lapack_stor, ISolver::LoadNumbers(), n, petsc, pmat, ISolver::PreFactorize(), print_err(), scr, sdirect, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by a12block(), condense(), and solve_system().
void printdiag | ( | FILE * | out | ) |
function prints diagonal entries of general matrix
out | - output stream |
JK, 17.3.2007
Definition at line 1862 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, print_err(), symcomprow::printdiag(), comprow::printdiag(), dskyline::printdiag(), skyline::printdiag(), densemat::printdiag(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
void printmat | ( | FILE * | out | ) |
function prints general matrix
out | - output stream |
JK, 17.3.2007
Definition at line 1814 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, print_err(), elemmat::printmat(), symcomprow::printmat(), comprow::printmat(), dskyline::printmat(), skyline::printmat(), densemat::printmat(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by arclength(), par_linear_nonstat_solv_vform(), solve_layered_linear_statics(), solve_load_balancing(), and solve_radiation_stationary_problem().
void scalgm | ( | double | a | ) |
function multiplies general matrix by a variable a
a | - multiplication constant |
JK, 17.3.2007
Definition at line 1689 of file gmatrix.cpp.
References compressed_rows, cr, dense_matrix, dm, double_skyline, dsky, element_matrices, em, print_err(), scr, sky, skyline_matrix, spdirect_stor_cr, spdirect_stor_scr, symm_comp_rows, and ts.
Referenced by difference_method(), lin_nonstat_dform(), lin_nonstat_dform_resistance(), linear_nonstat_radiation_solv_dform(), linear_nonstat_solv_dform(), linear_nonstat_solv_dform_subcycl(), linear_nonstat_solv_vform(), newmark_method(), newton_raphson_coupl(), newton_raphson_coupl_new(), newton_raphson_gparcoupl_lin(), newton_raphson_gparcoupl_nonlin(), newton_raphson_parcoupl_lin(), newton_raphson_parcoupl_nonlin(), newton_raphson_parcoupl_nonlin_new(), newton_raphson_parcoupl_nonlin_old(), nonlin_newmark_method(), nonlin_nonstat_dform(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_dform(), nonlinear_nonstat_solv_dform_dneska(), nonlinear_nonstat_solv_fnr_dform(), nonlinear_nonstat_solv_fnr_dform_old(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_nr_dform(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_oldd(), nonlinear_nonstat_solv_pokus(), nonlinear_nonstat_solv_vform(), one_step_linear(), one_step_nonlinear(), one_step_nonlinear_dform(), par_homogenization(), par_linear_nonstat_solv_vform(), par_newton_raphson_gparcoupl_lin(), par_newton_raphson_gparcoupl_nonlin(), par_newton_raphson_parcoupl_lin(), par_newton_raphson_parcoupl_lin_vform(), par_newton_raphson_parcoupl_nonlin(), par_one_step_linear(), par_one_step_nonlinear(), par_one_step_trfel_linear(), par_one_step_trfel_nonlinear(), par_solve_nonlinear_nonstationary_problem(), par_solve_nonlinear_nonstationary_problem_dform(), solve_nonstationary_growing_problem(), solve_nonstationary_growing_problem_nonlin(), and solve_nonstationary_growing_vform().
void setval | ( | slesolv * | ssle | ) |
function defines necessary parameters for the class gmatrix from the class slesolv
ssle | - object containing informations about solution of system of linear equations |
JK
Definition at line 422 of file gmatrix.cpp.
References slesolv::err, errcg, slesolv::iv, iv, slesolv::ni, nicg, slesolv::prec, precond::pt, slesolv::tlinsol, tlinsol, tprec, slesolv::tsol, and tsol.
Referenced by dpfeti::arrmatrix(), capacity_matrix(), conductivity_matrix(), damping_matrix(), first_order_matrix(), initial_stiffness_matrix(), mass_matrix(), schurcompl::solve_red_sys_fin(), seqschur::solve_red_sys_fin(), stiffness_matrix(), and zero_order_matrix().
function solves system of linear algebraic equations
top | - pointer to the general topology | |
prec | - preconditioner | |
lhs | - array containing solution of the system | |
rhs | - array containing the right hand side | |
out | - output file for auxiliary output |
JK
Definition at line 968 of file gmatrix.cpp.
References densemat::a, aerrcg, densemat::alloc(), anicg, comprow::bicg(), dskyline::bicg(), bicg, elemmat::cg(), symcomprow::cg(), densemat::cg(), cg, symcomprow::cg_prec(), comprow::cg_prec(), densemat::cg_prec_new(), symcomprow::changedecomp(), compressed_rows, conden, condense(), densemat::copy(), copyv(), cr, densemat::dealloc(), symcomprow::decomp(), dskyline::decomp(), skyline::decomp(), densemat::decomp(), dense_matrix, diagprec, dm, double_skyline, dsky, element_matrices, em, errcg, gauss_elim, densemat::gemp(), densemat::ill(), ill, incomdec, symcomprow::incomplete_ldl(), indegamma, ISolver::IsFactorized(), iv, lapack_sol, ldl, skyline::ldl_sky(), densemat::ll(), ll, densemat::lu(), lu, dskyline::lu_dsky(), nbdof, nicg, noprecond, omega, pardisolver, pmat, prepmat2(), print_err(), ISolver::ReFactorize(), scr, sdirect, sky, skyline_matrix, ISolver::Solve(), sparseindec, spdirldl, spdirll, spdirlu, ssorprec, symm_comp_rows, time, tlinsol, tprec, ts, and zero.
Referenced by arclength(), arclength15(), arclengthadapt(), displ_control(), newton_raphson(), newton_raphson_restart(), nonlinear_nonstat_solv(), nonlinear_nonstat_solv_linesearch(), nonlinear_nonstat_solv_new(), nonlinear_nonstat_solv_old(), nonlinear_nonstat_solv_pokus(), solve_molecular_dynamics(), seqschur::solve_red_sys_fin(), and slesolv::solve_system().
double aerrcg |
attained norm of residual vector
Definition at line 109 of file gmatrix.h.
Referenced by gmatrix(), and solve_system().
long anicg |
number of performed iterations
Definition at line 107 of file gmatrix.h.
Referenced by gmatrix(), and solve_system().
long* auxsd |
auxiliary information about block structure for sparse direct solver
Definition at line 127 of file gmatrix.h.
Referenced by auxdatsparsesolver(), gmatrix(), initiate(), and ~gmatrix().
unsigned char bsize |
block size in direct sparse solver
Definition at line 96 of file gmatrix.h.
Referenced by gmatrix(), and initiate().
Definition at line 135 of file gmatrix.h.
Referenced by add_entry(), addgm(), alloc(), aggregator::assemble_smoothed_prol2(), copygm(), dealloc(), estim_spect_radius(), give_entry(), give_negm(), gmatrix(), gmxv(), boundparcongrad::ilu_mat_petsc(), boundparcongrad::initialize_diag_prec(), initiate(), aggregator::local_matrices(), localize(), localized(), prepmat(), prepmat2(), printdiag(), printmat(), scalgm(), solve_system(), and ~gmatrix().
Definition at line 132 of file gmatrix.h.
Referenced by add_entry(), addgm(), alloc(), back_incomplete_fact(), back_substitution(), changedecomp(), condense(), copygm(), dealloc(), decomp(), decompose_matrix(), diag_scale(), estim_spect_radius(), give_entry(), give_negm(), glocalize(), gmatrix(), gmxv(), incomplete_fact(), initiate(), inverse_iteration(), kernel(), localize(), localized(), mult_localize(), prepmat(), printdiag(), printmat(), scalgm(), solve_system(), and ~gmatrix().
Definition at line 134 of file gmatrix.h.
Referenced by addgm(), alloc(), back_substitution(), changedecomp(), condense(), copygm(), dealloc(), decomp(), decompose_matrix(), diag_check(), give_negm(), gmatrix(), gmxv(), initiate(), localize(), localized(), mult_localize(), prepmat(), printdiag(), printmat(), scalgm(), solve_system(), and ~gmatrix().
Definition at line 137 of file gmatrix.h.
Referenced by addgm(), alloc(), dealloc(), gmatrix(), gmxv(), initiate(), localize(), localized(), prepmat(), printmat(), scalgm(), solve_system(), and ~gmatrix().
double errcg |
maximum norm of residual vector (required accuracy)
Definition at line 105 of file gmatrix.h.
Referenced by gmatrix(), setval(), and solve_system().
double indegamma |
Definition at line 118 of file gmatrix.h.
Referenced by gmatrix(), and solve_system().
long iv |
initial values in iterative methods iv=0 - the input vector is multiplied by zero the iteration starts from zero vector iv=1 - the input vector is used as a start vector
Definition at line 114 of file gmatrix.h.
Referenced by setval(), and solve_system().
double limit |
threshold for rejection from compressed storages
Definition at line 124 of file gmatrix.h.
Referenced by dpfeti::arrmatrix(), and gmatrix().
long n |
number of unknowns = number of rows/columns
Definition at line 99 of file gmatrix.h.
Referenced by condense(), gmatrix(), initiate(), precond::initiation(), inverse_iteration(), locmatrix::lm01xm(), locmatrix::lmxmxlmt(), power_method(), aggregator::prepare_boss(), prepmat2(), and slesolv::solve_system().
long nbdof |
number of rows which are not condensed
Definition at line 121 of file gmatrix.h.
Referenced by slesolv::solve_system(), and solve_system().
long nicg |
maximum number of iterations in CG methods
Definition at line 103 of file gmatrix.h.
Referenced by gmatrix(), setval(), and solve_system().
double omega |
parameters of preconditioning
Definition at line 117 of file gmatrix.h.
Referenced by gmatrix(), and solve_system().
long pmat |
describes status of cr/scr - sparse exchange
Definition at line 130 of file gmatrix.h.
Referenced by a12block(), alloc(), condense(), gmatrix(), prepmat2(), and solve_system().
Definition at line 136 of file gmatrix.h.
Referenced by add_entry(), addgm(), alloc(), copygm(), dealloc(), give_entry(), give_negm(), gmatrix(), gmxv(), boundparcongrad::ilu_mat_petsc(), boundparcongrad::initialize_diag_prec(), initiate(), localize(), localized(), prepmat(), prepmat2(), printdiag(), printmat(), scalgm(), solve_system(), seqschur::subdomain_matrices(), seqfeti::subdomain_matrices(), and ~gmatrix().
Definition at line 139 of file gmatrix.h.
Referenced by a12block(), alloc(), back_substitution(), condense(), dealloc(), decompgmxv(), decompose_matrix(), gmatrix(), initiate(), prepmat2(), solve_system(), and ~gmatrix().
Definition at line 133 of file gmatrix.h.
Referenced by a12block(), add_entry(), addgm(), alloc(), back_substitution(), changedecomp(), condense(), copygm(), dealloc(), decomp(), decompgmxv(), decompose_matrix(), diag_check(), diag_scale(), give_entry(), give_negm(), glocalize(), gmatrix(), gmxv(), initiate(), kernel(), ldl_feti(), locmatrix::lmxmxlmt01(), localize(), localized(), mult_localize(), prepmat(), printdiag(), printmat(), scalgm(), solve_system(), feti1::subdomain_matrix(), and ~gmatrix().
type of solver of system of linear algebraic equations
Definition at line 89 of file gmatrix.h.
Referenced by dpfeti::arrmatrix(), back_substitution(), decompose_matrix(), initiate(), setval(), and solve_system().
type of preconditioning
Definition at line 93 of file gmatrix.h.
Referenced by initiate(), setval(), and solve_system().
type of matrix storage
Definition at line 87 of file gmatrix.h.
Referenced by a12block(), add_entry(), addgm(), alloc(), dpfeti::arrmatrix(), back_incomplete_fact(), back_substitution(), capacity_matrix(), changedecomp(), condense(), conductivity_matrix(), copygm(), dealloc(), decomp(), decompgmxv(), decompose_matrix(), diag_check(), diag_scale(), estim_spect_radius(), give_entry(), give_negm(), glocalize(), gmxv(), boundparcongrad::ilu_mat_petsc(), incomplete_fact(), boundparcongrad::initialize_diag_prec(), initiate(), kernel(), ldl_feti(), localize(), localized(), mult_localize(), prepmat(), prepmat2(), printdiag(), printmat(), scalgm(), schurcompl::solve_red_sys_fin(), and solve_system().
type of condensation if tlinsol indicates condensation
Definition at line 91 of file gmatrix.h.
Referenced by initiate(), and setval().
double zero |
computer zero
Definition at line 101 of file gmatrix.h.
Referenced by dpfeti::arrmatrix(), back_incomplete_fact(), back_substitution(), condense(), decompose_matrix(), gmatrix(), incomplete_fact(), inverse_iteration(), and solve_system().