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

Check matrix properties. More...

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

Go to the source code of this file.

Functions

INT fasp_check_diagpos (dCSRmat *A)
 Check positivity of diagonal entries of a CSR sparse matrix. More...
 
SHORT fasp_check_diagzero (dCSRmat *A)
 Check wether a CSR sparse matrix has diagonal entries that are very close to zero. More...
 
INT fasp_check_diagdom (dCSRmat *A)
 Check whether a matrix is diagonal dominant. More...
 
INT fasp_check_symm (dCSRmat *A)
 Check symmetry of a sparse matrix of CSR format. More...
 
SHORT fasp_check_dCSRmat (dCSRmat *A)
 Check whether an dCSRmat matrix is valid or not. More...
 
SHORT fasp_check_iCSRmat (iCSRmat *A)
 Check whether an iCSRmat matrix is valid or not. More...
 

Detailed Description

Check matrix properties.

Definition in file checkmat.c.

Function Documentation

SHORT fasp_check_dCSRmat ( dCSRmat A)

Check whether an dCSRmat matrix is valid or not.

Parameters
APointer to the matrix in dCSRmat format
Author
Shuo Zhang
Date
03/29/2009

Definition at line 275 of file checkmat.c.

INT fasp_check_diagdom ( dCSRmat A)

Check whether a matrix is diagonal dominant.

INT fasp_check_diagdom (dCSRmat *A)

Parameters
APointer to the dCSRmat matrix
Returns
Number of the rows which are diagonal dominant
Note
The routine chechs whether the sparse matrix is diagonal dominant on every row. It will print out the percentage of the rows which are diagonal dominant and which are not; the routine will return the number of the rows which are diagonal dominant.
Author
Shuo Zhang
Date
03/29/2009

Definition at line 108 of file checkmat.c.

INT fasp_check_diagpos ( dCSRmat A)

Check positivity of diagonal entries of a CSR sparse matrix.

Parameters
APointer to dCSRmat matrix
Returns
Number of negative diagonal entries
Author
Shuo Zhang
Date
03/29/2009

Definition at line 27 of file checkmat.c.

SHORT fasp_check_diagzero ( dCSRmat A)

Check wether a CSR sparse matrix has diagonal entries that are very close to zero.

Parameters
Apointr to the dCSRmat matrix
Returns
FASP_SUCCESS if no diagonal entry is clase to zero, else ERROR
Author
Shuo Zhang
Date
03/29/2009

Definition at line 64 of file checkmat.c.

SHORT fasp_check_iCSRmat ( iCSRmat A)

Check whether an iCSRmat matrix is valid or not.

Parameters
APointer to the matrix in iCSRmat format
Author
Shuo Zhang
Date
03/29/2009

Definition at line 309 of file checkmat.c.

INT fasp_check_symm ( dCSRmat A)

Check symmetry of a sparse matrix of CSR format.

Parameters
APointer to the dCSRmat matrix
Returns
1 and 2 if the structure of the matrix is not symmetric; 0 if the structure of the matrix is symmetric,
Note
Print the maximal relative difference between matrix and its transpose.
Author
Shuo Zhang
Date
03/29/2009

Definition at line 153 of file checkmat.c.