aggregator Class Reference

#include <aggregator.h>

List of all members.

Public Member Functions

 aggregator (void)
void assemble_aggr_unknowns (gtopology *gt)
void assemble_lnagr ()
void assemble_lnnagr ()
void assemble_lnuagr_sp (long agrid, long *i)
void assemble_lnuagr_sp (long *i)
void assemble_lnuagr_tp (long *i)
void assemble_smoothed_prol (long agrid, long cid, long *i, double *a)
void assemble_smoothed_prol (gtopology *gt, gmatrix *mtx)
void assemble_smoothed_prol2 (long agrid, long cid, long *i, compvect *cvi, compvect *cvo, gmatrix *mtx)
void assemble_tentative_prol (long agrid, long cid, long *i, double *a)
void boss (gmatrix *gm, double *u, double *v)
void clean_memory ()
void coarse_matrix (gmatrix *gm)
void define_degree (long i)
void define_degree ()
void define_graph (long nnod, long *nneigh, long **listneigh)
void define_matsize (long i, long j)
void define_na (long i)
void define_na (long i)
 defines number of aggregates
void gener_rbm_1 (gtopology *gt, long agid, double *v)
void gener_rbm_2 (gtopology *gt, long agid, long cnid, double *v)
long give_deg ()
long give_deg ()
void local_matrices (long bsize, gmatrix *gm)
void matrix_assemble (long *i, long *j, double *v)
void metis_aggr (gtopology *gt)
void mulA (long st, double *x, gmatrix *mtx)
void mulS (long st, double *x, gmatrix *mtx)
 lokalni metody - casem asi private
void prepare_boss (gtopology *gt, gmatrix *gm, FILE *out)
void prepare_lnagr ()
void prepare_tlnagr (void)
void print (FILE *out)
void read (gtopology *gt, XFILE *in, long mespr)
 ~aggregator (void)

Public Attributes

long ** adjnodnod
long * ci
densematcm
 coarse matrix
long cms
 size of the coarse matrix
long degree_k
long degree_r
long exinex
long impl
comprowlmcr
densematlmdm
skylinelmsky
long ** lnagr
long * lnnagr
long * lnntagr
 list of numbers of nodes in tentative aggregates (without overlap)
long ** lntagr
 list of node numbers in tentative aggregates (without overlap)
long * lnuaggr
long ** luaggr
long maxnu
 maximum number of unknowns in aggregate
long n
 number of unknowns in the whole problem
long na
 number of aggregates
long * nadjnodnod
long nn
 number of nodes in the finite element mesh
long nrbm
 number of rigid body modes of one aggregate
long nz
double * p
long * ri
ISolversdirect
double specrad
slesolvssle
 data about solver of system of linear equations
long trbm
 type of factorization of system of linear algebraic equations
double * val

Detailed Description

class aggregator deals with preconditioning of solvers of systems of linear algebraic equations the preconditioner is based on the BOSS method (Black-box Overlapping Schwarz with Smoothed Coarse Space) the BOSS method was developed ba M. Brezina in his Ph.D. thesis

JK

Definition at line 20 of file aggregator.h.


Constructor & Destructor Documentation

aggregator ( void   ) 

Definition at line 5 of file aggregator.cpp.

References cms, degree_k, degree_r, exinex, impl, lmcr, lmdm, lmsky, lnagr, lnnagr, lnntagr, lntagr, lnuaggr, luaggr, n, na, nn, nrbm, sdirect, specrad, ssle, and trbm.

~aggregator ( void   ) 

Definition at line 57 of file aggregator.cpp.

References lmcr, lmdm, lmsky, lnuaggr, luaggr, and sdirect.


Member Function Documentation

void assemble_aggr_unknowns ( gtopology gt  ) 

function assembles list of unknowns belonging to the aggregates with overlap

function assembles array luaggr which contains unknow numbers in usual (not C) notation it means, it starts from 1 and not from 0

Parameters:
gt - pointer to general topology

JK, 19.2.2007

Definition at line 745 of file aggregator.cpp.

References gtopology::give_dof(), gtopology::give_ndofn(), lnagr, lnnagr, lnuaggr, luaggr, maxnu, and na.

Referenced by prepare_boss().

void assemble_lnagr (  ) 
void assemble_lnnagr (  ) 
void assemble_lnuagr_sp ( long  agrid,
long *  i 
)
void assemble_lnuagr_sp ( long *  i  ) 
void assemble_lnuagr_tp ( long *  i  ) 
void assemble_smoothed_prol ( long  agrid,
long  cid,
long *  i,
double *  a 
)
void assemble_smoothed_prol ( gtopology gt,
gmatrix mtx 
)

vytvori zhlazeny prolongator input: agrid . cislo pozadovaneho agregatu cid ... cislo pozadovaneho sloupce v agregatu ? i ... pole indexu ? a ... pole hodnot (v pripade rigid body motions v mechanice) mtx ... matice problemu PM

Definition at line 515 of file aggregator.cpp.

References copyv(), degree_k, gener_rbm_1(), gener_rbm_2(), mulS(), n, na, nrbm, p, print_err(), and trbm.

Referenced by prepare_boss().

void assemble_smoothed_prol2 ( long  agrid,
long  cid,
long *  i,
compvect cvi,
compvect cvo,
gmatrix mtx 
)

Definition at line 479 of file aggregator.cpp.

References gmatrix::cr, comprow::crxcv_cv(), and compvect::nz.

void assemble_tentative_prol ( long  agrid,
long  cid,
long *  i,
double *  a 
)
void boss ( gmatrix gm,
double *  u,
double *  v 
)

function computes Black-box Overlapping Schwarz with Smoothed coarse space see Brezina, page 75 and 76

Parameters:
gm - matrix of the system
u - input vector
v - output vector

JK, 20.2.2007

Definition at line 1275 of file aggregator.cpp.

References slesolv::aerr, slesolv::ani, comprow::cg(), cms, copyv(), slesolv::err, exinex, fillv(), globloc(), gmatrix::gmxv(), skyline::ldl_sky(), lmcr, lmsky, lnuaggr, locglob(), luaggr, maxnu, n, na, slesolv::ni, ssle, subv(), and slesolv::zero.

Referenced by precond::preconditioning().

void clean_memory (  ) 

Definition at line 946 of file aggregator.cpp.

References lnagr, lnnagr, lnntagr, lntagr, and na.

Referenced by prepare_boss().

void coarse_matrix ( gmatrix gm  ) 

function computes coarse matrix of the problem

at this time, first and unefficient implementation is used the matrix is stored in the dense matrix storage scheme

Parameters:
gm - general matrix

JK, 27.8.2008

Definition at line 708 of file aggregator.cpp.

References densemat::add_entry(), densemat::alloc(), cm, cms, gmatrix::gmxv(), n, p, and ss().

Referenced by prepare_boss().

void define_degree ( long  i  ) 
void define_degree (  ) 

function sets up degree of recursion real degree of polynomial is equal to (3^dg-1)/2

function defines depth of recursion for smoothed prolongator dg = 0 .... use polynomial of degree 0

PM

Definition at line 471 of file aggregator.cpp.

References degree_k, and degree_r.

Referenced by prepare_boss().

void define_graph ( long  nnod,
long *  nneigh,
long **  listneigh 
)

vytvori graf matice nn - pocet uzlu nneigh - pocty sousednich uzlu listneigh - seznamy sousednich uzlu

function defines graph of the matrix

Parameters:
nnod - number of nodes
nneigh - numbers of adjacent nodes nneigh[i]=j - there are j adjacent nodes to the i-th node
listneigh - list of node numbers of adjacent nodes listneigh[i][j]=k - the j-th adjacent node to the i-th node has number k

JK, 4.2.2007

Definition at line 203 of file aggregator.cpp.

References adjnodnod, nadjnodnod, and nn.

void define_matsize ( long  i,
long  j 
)
void define_na ( long  i  ) 
void define_na ( long  i  ) 

defines number of aggregates

function defines required number of aggregates

Parameters:
i - required number of aggregates

JK, 4.2.2007

Definition at line 187 of file aggregator.cpp.

References na.

void gener_rbm_1 ( gtopology gt,
long  agid,
double *  v 
)

function computes kernels for heat transfer, 1D mechancs, etc.

Parameters:
gt - pointer to the general topology
agid - aggregate id
v - array containing kernel

JK, 27.8.2008

Definition at line 638 of file aggregator.cpp.

References gtopology::give_dof(), lnagr, and lnnagr.

Referenced by assemble_smoothed_prol().

void gener_rbm_2 ( gtopology gt,
long  agid,
long  cnid,
double *  v 
)

function computes kernels for plane stress

Parameters:
gt - pointer to the general topology
agid - aggregate id
cnid - code number id
v - array containing kernel

JK, 27.8.2008

Definition at line 660 of file aggregator.cpp.

References gtopology::give_dof(), gtopology::gnodes, lnagr, lnnagr, gnode::x, and gnode::y.

Referenced by assemble_smoothed_prol().

long give_deg (  ) 
long give_deg (  ) 
void local_matrices ( long  bsize,
gmatrix gm 
)

function assembles local matrices of aggregates

Parameters:
bsize - size of blocks for sparse direct solvers only
gm - matrix of the system

JK, 20.2.2007

Definition at line 814 of file aggregator.cpp.

References comprow::adr, skyline::assemble_from_cr(), ci, gmatrix::cr, exinex, lmcr, lmsky, lnuaggr, luaggr, n, comprow::n, na, skyline::negm, and comprow::select_submatrix().

Referenced by prepare_boss().

void matrix_assemble ( long *  i,
long *  j,
double *  v 
)
void metis_aggr ( gtopology gt  ) 

function copies arrays lnntagr and lntagr from the object stop (class seqtop) allocated in class gtopology it is an alternative to the function void prepare_tlnagr(void);

function copies arrays lnntagr and lntagr from the object stop (class seqtop) allocated in class gtopology

it is an alternative to the function void prepare_tlnagr(void);

Parameters:
gt - global topology

JK, 31.5.2008

Definition at line 367 of file aggregator.cpp.

References lnntagr, lntagr, seqtop::ltg, na, seqtop::nnsd, and gtopology::stop.

Referenced by prepare_boss().

void mulA ( long  st,
double *  x,
gmatrix mtx 
)

st .... stupen S, t.j. dolni index x .... vektor mtx .... matice

Definition at line 597 of file aggregator.cpp.

References copyv(), gmatrix::gmxv(), n, and specrad.

Referenced by mulS().

void mulS ( long  st,
double *  x,
gmatrix mtx 
)

lokalni metody - casem asi private

provedena aplikaci s(st) na pozadovany vekor st .... stupen S, t.j. dolni index x .... vektor mtx .... matice

Definition at line 569 of file aggregator.cpp.

References copyv(), mulA(), n, and specrad.

Referenced by assemble_smoothed_prol().

void prepare_boss ( gtopology gt,
gmatrix gm,
FILE *  out 
)

function prepares all necessary variables, arrays, etc. for BOSS algorithm

Parameters:
gt - general topology
gm - matrix of the system stored in the class gmatrix
out - output stream

JK, 25.2.2007

Definition at line 976 of file aggregator.cpp.

References gtopology::adjacnodes(), gtopology::adjnodnod, adjnodnod, assemble_aggr_unknowns(), assemble_smoothed_prol(), clean_memory(), cm, cms, coarse_matrix(), define_degree(), gmatrix::estim_spect_radius(), exinex, gtopology::gnodes, impl, skyline::ldl_sky(), densemat::ll(), lmsky, lnagr, lnnagr, local_matrices(), metis_aggr(), gmatrix::n, n, na, gtopology::nadjnodnod, nadjnodnod, gnode::ndofn, gtopology::nn, nn, nrbm, gtopology::ns, prepare_lnagr(), prepare_tlnagr(), print_err(), specrad, time, and trbm.

Referenced by precond::initiation().

void prepare_lnagr (  ) 

assembles list of numbers of nodes in aggregates with overlap pocet uzlu v agregatech s prekryvem assembles node numbers in aggregates with overlap seznamy uzlu v jednotlivych agregatech s prekryvem lnnagr[i] = k - v i-tem agregatu je k uzlu lnagr[i][j] = k - j-ty uzel v i-tem agregatu ma cislo k

pripravi seznamy smoothed prolongatoru

pred zavolanim teto funkce se musi zavolat funkce define_degree(long dg);

PM

Definition at line 397 of file aggregator.cpp.

References adjnodnod, degree_r, lnagr, lnnagr, lnntagr, lntagr, memset(), na, nadjnodnod, and nn.

Referenced by prepare_boss().

void prepare_tlnagr ( void   ) 

assembles list of numbers of nodes in aggregates without overlap pocet uzlu v agregatech bez prekryvu assembles node numbers in aggregates without overlap seznamy uzlu v jednotlivych agregatech bez prekryvu lnntagr[i] = k - v i-tem agregatu je k uzlu lntagr[i][j] = k - j-ty uzel v i-tem agregatu ma cislo k

functions creates disjoint covering of node graph set both list of sizes and list of lists

PM

Definition at line 220 of file aggregator.cpp.

References adjnodnod, lnntagr, lntagr, memset(), na, nadjnodnod, and nn.

Referenced by prepare_boss().

void print ( FILE *  out  ) 

function prints data about aggregation

Parameters:
out - output stream

31.5.2008, JK

Definition at line 155 of file aggregator.cpp.

References degree_k, exinex, impl, slesolv::print(), ssle, and trbm.

Referenced by precond::print().

void read ( gtopology gt,
XFILE in,
long  mespr 
)

function reads data about aggregation

Parameters:
in - input stream

31.5.2008, JK

Definition at line 75 of file aggregator.cpp.

References degree_k, exinex, impl, print_err(), slesolv::read(), ssle, trbm, and xfscanf().

Referenced by precond::read().


Member Data Documentation

long** adjnodnod

array of adjacent nodes to nodes adjnodnod[i][j]=k - the j-th adjacent node to the i-th node has number k

Definition at line 177 of file aggregator.h.

Referenced by define_graph(), prepare_boss(), prepare_lnagr(), and prepare_tlnagr().

long* ci

Definition at line 86 of file aggregator_old.h.

Referenced by local_matrices().

coarse matrix

Definition at line 205 of file aggregator.h.

Referenced by coarse_matrix(), and prepare_boss().

long cms

size of the coarse matrix

Definition at line 136 of file aggregator.h.

Referenced by aggregator(), boss(), coarse_matrix(), and prepare_boss().

long degree_k

Definition at line 192 of file aggregator.h.

Referenced by aggregator(), assemble_smoothed_prol(), define_degree(), print(), and read().

long degree_r

Definition at line 191 of file aggregator.h.

Referenced by aggregator(), define_degree(), and prepare_lnagr().

long exinex

type of solver - exact or inexact exinex=1 - exact solver is used exinex=2 - inexact solver is used

Definition at line 146 of file aggregator.h.

Referenced by aggregator(), boss(), local_matrices(), prepare_boss(), print(), and read().

long impl

type of BOSS algorithm impl=1 - own implementation of the BOSS algorithm impl=2 - implementation based on METIS

Definition at line 141 of file aggregator.h.

Referenced by aggregator(), input(), inputt(), prepare_boss(), print(), slesolv::read(), and read().

Definition at line 195 of file aggregator.h.

Referenced by aggregator(), boss(), local_matrices(), and ~aggregator().

Definition at line 208 of file aggregator.h.

Referenced by aggregator(), and ~aggregator().

Definition at line 197 of file aggregator.h.

Referenced by aggregator(), boss(), local_matrices(), prepare_boss(), and ~aggregator().

long ** lnagr

list of node numbers in aggregates with overlap lnagr[i][j]=k - the j-th node in the i-th aggregate has the number k

Definition at line 165 of file aggregator.h.

Referenced by aggregator(), assemble_aggr_unknowns(), clean_memory(), gener_rbm_1(), gener_rbm_2(), smaggreg::localization_matrices(), prepare_boss(), and prepare_lnagr().

long * lnnagr

list of numbers of nodes in aggregates with overlap lnnagr[i]=j - the i-th aggregate contains j nodes

Definition at line 162 of file aggregator.h.

Referenced by aggregator(), assemble_aggr_unknowns(), clean_memory(), gener_rbm_1(), gener_rbm_2(), smaggreg::localization_matrices(), prepare_boss(), and prepare_lnagr().

long* lnntagr

list of numbers of nodes in tentative aggregates (without overlap)

Definition at line 168 of file aggregator.h.

Referenced by aggregator(), clean_memory(), metis_aggr(), prepare_lnagr(), and prepare_tlnagr().

long** lntagr

list of node numbers in tentative aggregates (without overlap)

Definition at line 170 of file aggregator.h.

Referenced by aggregator(), clean_memory(), metis_aggr(), prepare_lnagr(), and prepare_tlnagr().

long* lnuaggr

list of numbers of unknowns on aggregates with overlap lnuaggr[i]=j - the i-th aggregate contains j unknowns

Definition at line 181 of file aggregator.h.

Referenced by aggregator(), assemble_aggr_unknowns(), boss(), local_matrices(), and ~aggregator().

long** luaggr

list of unknown numbers on aggregates with overlap luaggr[i][j]=k - the j-th unknown on the i-th aggregate has number k

Definition at line 184 of file aggregator.h.

Referenced by aggregator(), assemble_aggr_unknowns(), boss(), local_matrices(), and ~aggregator().

long maxnu

maximum number of unknowns in aggregate

Definition at line 132 of file aggregator.h.

Referenced by assemble_aggr_unknowns(), and boss().

long n

number of unknowns in the whole problem

Definition at line 134 of file aggregator.h.

Referenced by aggregator(), assemble_smoothed_prol(), boss(), coarse_matrix(), local_matrices(), mulA(), mulS(), and prepare_boss().

long na
long* nadjnodnod

numbers of adjacent nodes to nodes nadjnodnod[i]=j - the i-th node has j adjacent nodes

Definition at line 174 of file aggregator.h.

Referenced by define_graph(), prepare_boss(), prepare_lnagr(), and prepare_tlnagr().

long nn

number of nodes in the finite element mesh

Definition at line 128 of file aggregator.h.

Referenced by aggregator(), define_graph(), prepare_boss(), prepare_lnagr(), and prepare_tlnagr().

long nrbm

number of rigid body modes of one aggregate

Definition at line 155 of file aggregator.h.

Referenced by aggregator(), assemble_smoothed_prol(), and prepare_boss().

long nz

Definition at line 80 of file aggregator_old.h.

double* p

smoothed prolongator it is a matrix with ndof rows and na*nrbm columns the matrix is stored column after column in onedimensional array

Definition at line 202 of file aggregator.h.

Referenced by assemble_smoothed_prol(), and coarse_matrix().

long* ri

Definition at line 84 of file aggregator_old.h.

Definition at line 210 of file aggregator.h.

Referenced by aggregator(), and ~aggregator().

double specrad

Definition at line 188 of file aggregator.h.

Referenced by aggregator(), mulA(), mulS(), and prepare_boss().

data about solver of system of linear equations

Definition at line 158 of file aggregator.h.

Referenced by aggregator(), boss(), print(), and read().

long trbm

type of factorization of system of linear algebraic equations

type of rigid body modes (kernels)

Definition at line 153 of file aggregator.h.

Referenced by aggregator(), assemble_smoothed_prol(), prepare_boss(), print(), and read().

double* val

Definition at line 88 of file aggregator_old.h.


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

Generated by  doxygen 1.6.2