Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
smoother_str.c File Reference

Smoothers for dSTRmat matrices. More...

#include <math.h>
#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Functions

void fasp_smoother_dstr_jacobi (dSTRmat *A, dvector *b, dvector *u)
 Jacobi method as the smoother. More...
 
void fasp_smoother_dstr_jacobi1 (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv)
 Jacobi method as the smoother with diag_inv given. More...
 
void fasp_smoother_dstr_gs (dSTRmat *A, dvector *b, dvector *u, const INT order, INT *mark)
 Gauss-Seidel method as the smoother. More...
 
void fasp_smoother_dstr_gs1 (dSTRmat *A, dvector *b, dvector *u, const INT order, INT *mark, REAL *diaginv)
 Gauss-Seidel method as the smoother with diag_inv given. More...
 
void fasp_smoother_dstr_gs_ascend (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv)
 Gauss-Seidel method as the smoother in the ascending manner. More...
 
void fasp_smoother_dstr_gs_descend (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv)
 Gauss-Seidel method as the smoother in the descending manner. More...
 
void fasp_smoother_dstr_gs_order (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv, INT *mark)
 Gauss method as the smoother in the user-defined order. More...
 
void fasp_smoother_dstr_gs_cf (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv, INT *mark, const INT order)
 Gauss method as the smoother in the C-F manner. More...
 
void fasp_smoother_dstr_sor (dSTRmat *A, dvector *b, dvector *u, const INT order, INT *mark, const REAL weight)
 SOR method as the smoother. More...
 
void fasp_smoother_dstr_sor1 (dSTRmat *A, dvector *b, dvector *u, const INT order, INT *mark, REAL *diaginv, const REAL weight)
 SOR method as the smoother. More...
 
void fasp_smoother_dstr_sor_ascend (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv, REAL weight)
 SOR method as the smoother in the ascending manner. More...
 
void fasp_smoother_dstr_sor_descend (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv, REAL weight)
 SOR method as the smoother in the descending manner. More...
 
void fasp_smoother_dstr_sor_order (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv, INT *mark, REAL weight)
 SOR method as the smoother in the user-defined order. More...
 
void fasp_smoother_dstr_sor_cf (dSTRmat *A, dvector *b, dvector *u, REAL *diaginv, INT *mark, const INT order, const REAL weight)
 SOR method as the smoother in the C-F manner. More...
 
void fasp_generate_diaginv_block (dSTRmat *A, ivector *neigh, dvector *diaginv, ivector *pivot)
 Generate inverse of diagonal block for block smoothers. More...
 
void fasp_smoother_dstr_schwarz (dSTRmat *A, dvector *b, dvector *u, dvector *diaginv, ivector *pivot, ivector *neigh, ivector *order)
 Schwarz method as the smoother. More...
 

Detailed Description

Smoothers for dSTRmat matrices.

Definition in file smoother_str.c.

Function Documentation

void fasp_generate_diaginv_block ( dSTRmat A,
ivector neigh,
dvector diaginv,
ivector pivot 
)

Generate inverse of diagonal block for block smoothers.

Parameters
APointer to dCSRmat: the coefficient matrix
neighPointer to ivector: neighborhoods
diaginvPointer to dvector: the inverse of the diagonals
pivotPointer to ivector: the pivot of diagonal blocks
Author
Xiaozhe Hu
Date
10/01/2011

Definition at line 1521 of file smoother_str.c.

void fasp_smoother_dstr_gs ( dSTRmat A,
dvector b,
dvector u,
const INT  order,
INT mark 
)

Gauss-Seidel method as the smoother.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
orderFlag to indicate the order for smoothing If mark = NULL ASCEND 12: in ascending manner DESCEND 21: in descending manner If mark != NULL USERDEFINED 0 : in the user-defined manner CPFIRST 1 : C-points first and then F-points FPFIRST -1 : F-points first and then C-points
markPointer to the user-defined ordering(when order=0) or CF_marker array(when order!=0)
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 203 of file smoother_str.c.

void fasp_smoother_dstr_gs1 ( dSTRmat A,
dvector b,
dvector u,
const INT  order,
INT mark,
REAL diaginv 
)

Gauss-Seidel method as the smoother with diag_inv given.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
orderFlag to indicate the order for smoothing If mark = NULL ASCEND 12: in ascending manner DESCEND 21: in descending manner If mark != NULL USERDEFINED 0 : in the user-defined manner CPFIRST 1 : C-points first and then F-points FPFIRST -1 : F-points first and then C-points
markPointer to the user-defined ordering(when order=0) or CF_marker array(when order!=0)
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 263 of file smoother_str.c.

void fasp_smoother_dstr_gs_ascend ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv 
)

Gauss-Seidel method as the smoother in the ascending manner.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 308 of file smoother_str.c.

void fasp_smoother_dstr_gs_cf ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv,
INT mark,
const INT  order 
)

Gauss method as the smoother in the C-F manner.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
markPointer to the user-defined order array
orderFlag to indicate the order for smoothing CPFIRST 1 : C-points first and then F-points FPFIRST -1 : F-points first and then C-points
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 663 of file smoother_str.c.

void fasp_smoother_dstr_gs_descend ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv 
)

Gauss-Seidel method as the smoother in the descending manner.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 423 of file smoother_str.c.

void fasp_smoother_dstr_gs_order ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv,
INT mark 
)

Gauss method as the smoother in the user-defined order.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
markPointer to the user-defined order array
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 540 of file smoother_str.c.

void fasp_smoother_dstr_jacobi ( dSTRmat A,
dvector b,
dvector u 
)

Jacobi method as the smoother.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 31 of file smoother_str.c.

void fasp_smoother_dstr_jacobi1 ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv 
)

Jacobi method as the smoother with diag_inv given.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 79 of file smoother_str.c.

void fasp_smoother_dstr_schwarz ( dSTRmat A,
dvector b,
dvector u,
dvector diaginv,
ivector pivot,
ivector neigh,
ivector order 
)

Schwarz method as the smoother.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvPointer to dvector: the inverse of the diagonals
pivotPointer to ivector: the pivot of diagonal blocks
neighPointer to ivector: neighborhoods
orderPointer to ivector: the smoothing order
Author
Xiaozhe Hu
Date
10/01/2011

Definition at line 1643 of file smoother_str.c.

void fasp_smoother_dstr_sor ( dSTRmat A,
dvector b,
dvector u,
const INT  order,
INT mark,
const REAL  weight 
)

SOR method as the smoother.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
orderFlag to indicate the order for smoothing If mark = NULL ASCEND 12: in ascending manner DESCEND 21: in descending manner If mark != NULL USERDEFINED 0 : in the user-defined manner CPFIRST 1 : C-points first and then F-points FPFIRST -1 : F-points first and then C-points
markPointer to the user-defined ordering(when order=0) or CF_marker array(when order!=0)
weightOver-relaxation weight
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 855 of file smoother_str.c.

void fasp_smoother_dstr_sor1 ( dSTRmat A,
dvector b,
dvector u,
const INT  order,
INT mark,
REAL diaginv,
const REAL  weight 
)

SOR method as the smoother.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
orderFlag to indicate the order for smoothing If mark = NULL ASCEND 12: in ascending manner DESCEND 21: in descending manner If mark != NULL USERDEFINED 0 : in the user-defined manner CPFIRST 1 : C-points first and then F-points FPFIRST -1 : F-points first and then C-points
markPointer to the user-defined ordering(when order=0) or CF_marker array(when order!=0)
diaginvInverse of the diagonal entries
weightOver-relaxation weight
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 916 of file smoother_str.c.

void fasp_smoother_dstr_sor_ascend ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv,
REAL  weight 
)

SOR method as the smoother in the ascending manner.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
weightOver-relaxation weight
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 962 of file smoother_str.c.

void fasp_smoother_dstr_sor_cf ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv,
INT mark,
const INT  order,
const REAL  weight 
)

SOR method as the smoother in the C-F manner.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
markPointer to the user-defined order array
orderFlag to indicate the order for smoothing CPFIRST 1 : C-points first and then F-points FPFIRST -1 : F-points first and then C-points
weightOver-relaxation weight
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 1334 of file smoother_str.c.

void fasp_smoother_dstr_sor_descend ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv,
REAL  weight 
)

SOR method as the smoother in the descending manner.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
weightOver-relaxation weight
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 1082 of file smoother_str.c.

void fasp_smoother_dstr_sor_order ( dSTRmat A,
dvector b,
dvector u,
REAL diaginv,
INT mark,
REAL  weight 
)

SOR method as the smoother in the user-defined order.

Parameters
APointer to dCSRmat: the coefficient matrix
bPointer to dvector: the right hand side
uPointer to dvector: the unknowns
diaginvAll the inverse matrices for all the diagonal block of A when (A->nc)>1, and NULL when (A->nc)=1
markPointer to the user-defined order array
weightOver-relaxation weight
Author
Shiquan Zhang, Zhiyang Zhou
Date
10/10/2010

Definition at line 1203 of file smoother_str.c.