#include <boundparcongrad.h>
Public Member Functions | |
| void | add_bound (double *buff, double *v) |
| void | add_master_buff (double *buff, double *cv, long nd) |
| boundparcongrad (int np, int mr, long nd, long mes) | |
| void | ilu_mat_petsc (gmatrix *gm, FILE *out) |
| void | initialize_diag_prec (gmatrix *gm, double *precvec, FILE *out) |
| void | initiate (selnodes *selnodschur, partop *ptop, gtopology *top, FILE *out) |
| void | jacobi_precondition (double *precvec, double *invec, double *outvec, long ndof, FILE *out) |
| void | select_bound (double *buff, double *v) |
| void | select_master_buff (double *cv, double *buff, long nd) |
| void | solve_fact_mat_petsc (double *r, double *z, long ndof, FILE *out) |
| void | solve_system (partop *ptop, gtopology *top, gmatrix *gm, long *domproc, double *lhs, double *rhs, FILE *out, long iv) |
| double | uxv (double *u, double *v, long n) |
| double | v_ixu_i (double *u, double *v) |
| ~boundparcongrad () | |
Public Attributes | |
| int | Argc |
| char ** | Argv |
| long ** | bcn |
| double | err |
| double * | factmat |
| long * | lbdof |
| long * | lidof |
| long | maxnbdof |
| maximum number of boundary DOFs on one subdomain | |
| long | mespr |
| message printing | |
| int | myrank |
| rank of processor | |
| long | nbdof |
| number of boundary degrees of freedom on subdomain | |
| long * | nbdofdom |
| long | nbn |
| number of boundary nodes on subdomain | |
| long | ndof |
| number of degrees of freedom on subdomain | |
| long | ndofcp |
| DATA DEFINED ONLY ON MASTER. | |
| long | ndom |
| number of subdomain | |
| long | ni |
| long | nidof |
| number of internal degrees of freedom on subdomain | |
| long | nin |
| long | nn |
| int | nproc |
| number of processors | |
| PETSC_CONT * | petscpoint |
| long | prec |
Definition at line 16 of file boundparcongrad.h.
| boundparcongrad | ( | int | np, | |
| int | mr, | |||
| long | nd, | |||
| long | mes | |||
| ) |
| ~boundparcongrad | ( | ) |
Desctructor of class boundparcongrad JB
Definition at line 54 of file boundparcongrad.cpp.
References PETSC_CONT::fact, PETSC_CONT::ix, petscilu, petscpoint, prec, PETSC_CONT::r_rhs, PETSC_CONT::val, and PETSC_CONT::z_lhs.
| void add_bound | ( | double * | buff, | |
| double * | v | |||
| ) |
Definition at line 163 of file boundparcongrad.cpp.
Referenced by solve_system().
| void add_master_buff | ( | double * | buff, | |
| double * | cv, | |||
| long | nd | |||
| ) |
Definition at line 180 of file boundparcongrad.cpp.
Referenced by solve_system().
| void ilu_mat_petsc | ( | gmatrix * | gm, | |
| FILE * | out | |||
| ) |
Function computes incomplete factorization of subdomain matrix with PETSC-ILU with the help of PETSc library
| out | - output file for logs | |
| gm | - pointer to gmatrix class (../GEFEL/gmatrix.cpp) |
JB
Definition at line 219 of file boundparcongrad.cpp.
References symcomprow::a, comprow::a, symcomprow::adr, comprow::adr, symcomprow::ci, comprow::ci, compressed_rows, gmatrix::cr, PETSC_CONT::fact, PETSC_CONT::ix, myrank, symcomprow::n, comprow::n, ndof, par_print_err(), petscpoint, PETSC_CONT::r_rhs, gmatrix::scr, symm_comp_rows, gmatrix::ts, PETSC_CONT::val, and PETSC_CONT::z_lhs.
Referenced by solve_system().
| void initialize_diag_prec | ( | gmatrix * | gm, | |
| double * | precvec, | |||
| FILE * | out | |||
| ) |
Function initialises diagonal preconditioning
| gm | - pointer to gmatrix class (../GEFEL/gmatrix.cpp) | |
| precvec | - vector for preconditionig | |
| out | - output file for logs |
JB
Definition at line 431 of file boundparcongrad.cpp.
References symcomprow::a, comprow::a, symcomprow::adr, comprow::adr, symcomprow::ci, comprow::ci, compressed_rows, gmatrix::cr, mespr, symcomprow::n, comprow::n, gmatrix::scr, symm_comp_rows, and gmatrix::ts.
Referenced by solve_system().
Function initiate boundary version of paralell conjugate gradient solver
| selnodschur | - pointer to selnodes class (selnodes.cpp) | |
| ptop | - pointer to patrop class (patrop.cpp) | |
| top | - pointer to gtopology class (../GEFEL/gtopology.cpp) | |
| out | - output file |
JB 14.08.2007
Definition at line 81 of file boundparcongrad.cpp.
References Argc, Argv, bcn, maxnbdof, selnodes::maxsnndof, myrank, partop::nbdof, nbdof, nbdofdom, partop::ndof, ndof, ndofcp, partop::nidof, nidof, petscilu, and prec.
| void jacobi_precondition | ( | double * | precvec, | |
| double * | invec, | |||
| double * | outvec, | |||
| long | ndof, | |||
| FILE * | out | |||
| ) |
Function performs diagonal preconditioning
| precvec | - vector for preconditionig | |
| invec | - input vector | |
| outvec | - output vector outvec=precvec*inputvec | |
| out | - output file for logs JB |
Definition at line 488 of file boundparcongrad.cpp.
References mespr.
Referenced by solve_system().
| void select_bound | ( | double * | buff, | |
| double * | v | |||
| ) |
Definition at line 148 of file boundparcongrad.cpp.
Referenced by solve_system().
| void select_master_buff | ( | double * | cv, | |
| double * | buff, | |||
| long | nd | |||
| ) |
Definition at line 199 of file boundparcongrad.cpp.
Referenced by solve_system().
| void solve_fact_mat_petsc | ( | double * | r, | |
| double * | z, | |||
| long | ndof, | |||
| FILE * | out | |||
| ) |
Function performs back substitution with the help of PETSc library
| r | - residual vector | |
| z | - preconditoned vector z = PETscILUMAT^-1*r | |
| ndof | - number of degrees of freedom on subdomain | |
| out | - output file for logs |
JB
Definition at line 382 of file boundparcongrad.cpp.
References PETSC_CONT::fact, PETSC_CONT::ix, nullv(), petscpoint, PETSC_CONT::r_rhs, PETSC_CONT::val, and PETSC_CONT::z_lhs.
Referenced by solve_system().
| void solve_system | ( | partop * | ptop, | |
| gtopology * | top, | |||
| gmatrix * | gm, | |||
| long * | domproc, | |||
| double * | lhs, | |||
| double * | rhs, | |||
| FILE * | out, | |||
| long | iv | |||
| ) |
Function solves system of algebraic equations by boundary version of parallel conjugate gradient method
| top | - topology | |
| gm | - matrix of the system | |
| domproc | - domain-processor correspondence | |
| lhs | - array containing solution of the system | |
| rhs | - array containing right hand side | |
| out | - output stream | |
| iv | - initial values indicator |
iv=0 - initial vector is zero vector iv=1 - initial vector is taken from x array
Definition at line 517 of file boundparcongrad.cpp.
References add_bound(), add_master_buff(), copyv(), err, gmatrix::gmxv(), ilu_mat_petsc(), initialize_diag_prec(), jacobi_precondition(), maxnbdof, mespr, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_Barrier(), MPI_COMM_WORLD, MPI_DOUBLE, MPI_Recv(), MPI_Send(), MPI_Status::MPI_TAG, myrank, nbdof, nbdofdom, ndof, ndofcp, ni, nidof, noprec, nproc, nullv(), pardiagprec, petscilu, prec, select_bound(), select_master_buff(), solve_fact_mat_petsc(), ss(), stat, subv(), and v_ixu_i().
| double uxv | ( | double * | u, | |
| double * | v, | |||
| long | n | |||
| ) |
| double v_ixu_i | ( | double * | u, | |
| double * | v | |||
| ) |
| int Argc |
Definition at line 95 of file boundparcongrad.h.
Referenced by initiate().
| char** Argv |
Definition at line 96 of file boundparcongrad.h.
Referenced by initiate().
| long** bcn |
array containing boundary global code numbers bcn[i][j] = k - on i-th domain has j-th boundary DOF global code numbers k
Definition at line 91 of file boundparcongrad.h.
Referenced by add_master_buff(), boundparcongrad(), initiate(), and select_master_buff().
| double err |
Definition at line 48 of file boundparcongrad.h.
Referenced by boundparcongrad(), and solve_system().
| double* factmat |
Definition at line 52 of file boundparcongrad.h.
| long* lbdof |
list of boundary DOFs lbdof[i] = j - i-th boundary DOF has local number j
Definition at line 71 of file boundparcongrad.h.
Referenced by boundparcongrad().
| long* lidof |
list of internal DOFs lidof[i] = j - i-th internal DOF has local number j
Definition at line 74 of file boundparcongrad.h.
Referenced by boundparcongrad().
| long maxnbdof |
maximum number of boundary DOFs on one subdomain
Definition at line 68 of file boundparcongrad.h.
Referenced by boundparcongrad(), initiate(), and solve_system().
| long mespr |
message printing
Definition at line 36 of file boundparcongrad.h.
Referenced by boundparcongrad(), initialize_diag_prec(), jacobi_precondition(), and solve_system().
| int myrank |
rank of processor
Definition at line 41 of file boundparcongrad.h.
Referenced by boundparcongrad(), ilu_mat_petsc(), initiate(), and solve_system().
| long nbdof |
number of boundary degrees of freedom on subdomain
Definition at line 66 of file boundparcongrad.h.
Referenced by add_bound(), boundparcongrad(), initiate(), and solve_system().
| long* nbdofdom |
array containing numbers of boundary DOFs on subdomains nbdofdom[i] = j - i-th domain has j-th numbers of boundary DOFs
Definition at line 87 of file boundparcongrad.h.
Referenced by add_master_buff(), boundparcongrad(), initiate(), select_master_buff(), and solve_system().
| long nbn |
number of boundary nodes on subdomain
Definition at line 58 of file boundparcongrad.h.
| long ndof |
number of degrees of freedom on subdomain
Definition at line 62 of file boundparcongrad.h.
Referenced by boundparcongrad(), ilu_mat_petsc(), initiate(), select_bound(), and solve_system().
| long ndofcp |
DATA DEFINED ONLY ON MASTER.
TOPOLOGY number of global DOFs = total number of boundary DOFs number of DOFs of coarse problem
Definition at line 82 of file boundparcongrad.h.
Referenced by initiate(), and solve_system().
| long ndom |
number of subdomain
Definition at line 43 of file boundparcongrad.h.
Referenced by boundparcongrad().
| long ni |
Definition at line 46 of file boundparcongrad.h.
Referenced by boundparcongrad(), and solve_system().
| long nidof |
number of internal degrees of freedom on subdomain
Definition at line 64 of file boundparcongrad.h.
Referenced by add_bound(), boundparcongrad(), initiate(), select_bound(), solve_system(), and v_ixu_i().
| long nin |
Definition at line 60 of file boundparcongrad.h.
| long nn |
TOPOLOGY number of all nodes on subdomain
Definition at line 56 of file boundparcongrad.h.
| int nproc |
number of processors
Definition at line 39 of file boundparcongrad.h.
Referenced by boundparcongrad(), and solve_system().
Definition at line 92 of file boundparcongrad.h.
Referenced by boundparcongrad(), ilu_mat_petsc(), solve_fact_mat_petsc(), and ~boundparcongrad().
| long prec |
Definition at line 50 of file boundparcongrad.h.
Referenced by boundparcongrad(), initiate(), solve_system(), and ~boundparcongrad().
1.6.2