27#include "fasp_functs.h"
59 REAL setup_start, setup_end;
67 printf(
"### DEBUG: [-Begin-] %s ...\n", __FUNCTION__);
68 printf(
"### DEBUG: nr=%d, nc=%d, nnz=%d\n",
69 mgl[0].A.row, mgl[0].
A.
col, mgl[0].
A.
nnz);
77 while ( (mgl[level].A.row > min_cdof) && (level < max_levels-1) ) {
80 i_n = mgl[level].
A.
row-1;
109 for ( level = 1; level < max_levels; ++level ) {
120 fasp_cputime(
"Compatible relaxation setup", setup_end - setup_start);
126 printf(
"### DEBUG: [--End--] %s ...\n", __FUNCTION__);
void fasp_cputime(const char *message, const REAL cputime)
Print CPU walltime.
void fasp_amgcomplexity(const AMG_data *mgl, const SHORT prtlvl)
Print level and complexity information of AMG.
void fasp_gettime(REAL *time)
Get system time.
void fasp_ivec_free(ivector *u)
Free vector data space of INT type.
dvector fasp_dvec_create(const INT m)
Create dvector data space of REAL type.
ivector fasp_ivec_create(const INT m)
Create vector data space of INT type.
void fasp_dcsr_diagpref(dCSRmat *A)
Re-order the column and data arrays of a CSR matrix, so that the first entry in each row is the diago...
INT fasp_amg_coarsening_cr(const INT i_0, const INT i_n, dCSRmat *A, ivector *vertices, AMG_param *param)
CR coarsening.
SHORT fasp_amg_setup_cr(AMG_data *mgl, AMG_param *param)
Set up phase of Brannick Falgout CR coarsening for classic AMG.
Main header file for the FASP project.
#define SHORT
FASP integer and floating point numbers.
#define MAX(a, b)
Definition of max, min, abs.
#define FASP_SUCCESS
Definition of return status and error messages.
#define PRINT_NONE
Print level for all subroutines – not including DEBUG output.
dCSRmat A
pointer to the matrix at level level_num
dvector b
pointer to the right-hand side at level level_num
dvector x
pointer to the iterative solution at level level_num
SHORT num_levels
number of levels in use <= max_levels
dvector w
temporary work space
Parameters for AMG methods.
SHORT print_level
print level for AMG
INT coarse_dof
max number of coarsest level DOF
SHORT max_levels
max number of levels of AMG
INT col
column of matrix A, n
INT row
row number of matrix A, m
INT nnz
number of nonzero entries
Vector with n entries of INT type.