Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
BlaSparseCheck.c File Reference

Check properties of sparse matrices. More...

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

Go to the source code of this file.

Functions

INT fasp_check_diagpos (const dCSRmat *A)
 Check positivity of diagonal entries of a CSR sparse matrix. More...
 
SHORT fasp_check_diagzero (const dCSRmat *A)
 Check if a CSR sparse matrix has diagonal entries that are very close to zero. More...
 
INT fasp_check_diagdom (const dCSRmat *A)
 Check whether a matrix is diagonally dominant. More...
 
INT fasp_check_symm (const dCSRmat *A)
 Check symmetry of a sparse matrix of CSR format. More...
 
void fasp_check_dCSRmat (const dCSRmat *A)
 Check whether an dCSRmat matrix is supported or not. More...
 
SHORT fasp_check_iCSRmat (const iCSRmat *A)
 Check whether an iCSRmat matrix is valid or not. More...
 
void fasp_check_ordering (dCSRmat *A)
 Check whether each row of A is in ascending order w.r.t. column indices. More...
 

Detailed Description

Check properties of sparse matrices.

Note
This file contains Level-1 (Bla) functions. It requires: AuxMemory.c, AuxMessage.c, AuxVector.c, and BlaSparseCSR.c

Copyright (C) 2009–Present by the FASP team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Definition in file BlaSparseCheck.c.

Function Documentation

◆ fasp_check_dCSRmat()

void fasp_check_dCSRmat ( const dCSRmat A)

Check whether an dCSRmat matrix is supported or not.

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

Definition at line 281 of file BlaSparseCheck.c.

◆ fasp_check_diagdom()

INT fasp_check_diagdom ( const dCSRmat A)

Check whether a matrix is diagonally dominant.

INT fasp_check_diagdom (const dCSRmat *A)

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

Definition at line 114 of file BlaSparseCheck.c.

◆ fasp_check_diagpos()

INT fasp_check_diagpos ( const 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 35 of file BlaSparseCheck.c.

◆ fasp_check_diagzero()

SHORT fasp_check_diagzero ( const dCSRmat A)

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

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

Definition at line 72 of file BlaSparseCheck.c.

◆ fasp_check_iCSRmat()

SHORT fasp_check_iCSRmat ( const 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 318 of file BlaSparseCheck.c.

◆ fasp_check_ordering()

void fasp_check_ordering ( dCSRmat A)

Check whether each row of A is in ascending order w.r.t. column indices.

Parameters
APointer to the dCSRmat matrix
Author
Chensong Zhang
Date
02/26/2019

Definition at line 357 of file BlaSparseCheck.c.

◆ fasp_check_symm()

INT fasp_check_symm ( const 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 159 of file BlaSparseCheck.c.