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

Simple operations for small dense matrices in row-major format. More...

#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Macros

#define SWAP(a, b)   {temp=(a);(a)=(b);(b)=temp;}
 

Functions

void fasp_blas_smat_inv_nc2 (REAL *a)
 Compute the inverse matrix of a 2*2 full matrix A (in place) More...
 
void fasp_blas_smat_inv_nc3 (REAL *a)
 Compute the inverse matrix of a 3*3 full matrix A (in place) More...
 
void fasp_blas_smat_inv_nc4 (REAL *a)
 Compute the inverse matrix of a 4*4 full matrix A (in place) More...
 
void fasp_blas_smat_inv_nc5 (REAL *a)
 Compute the inverse matrix of a 5*5 full matrix A (in place) More...
 
void fasp_blas_smat_inv_nc7 (REAL *a)
 Compute the inverse matrix of a 7*7 matrix a. More...
 
void fasp_blas_smat_inv_nc (REAL *a, const INT n)
 Compute the inverse of a matrix using Gauss Elimination. More...
 
void fasp_blas_smat_invp_nc (REAL *a, const INT n)
 Compute the inverse of a matrix using Gauss Elimination with Pivoting. More...
 
INT fasp_blas_smat_inv (REAL *a, const INT n)
 Compute the inverse matrix of a small full matrix a. More...
 
REAL fasp_blas_smat_Linfinity (REAL *A, const INT n)
 Compute the L infinity norm of A. More...
 
void fasp_iden_free (idenmat *A)
 Free idenmat sparse matrix data memeory space. More...
 
void fasp_smat_identity_nc2 (REAL *a)
 Set a 2*2 full matrix to be a identity. More...
 
void fasp_smat_identity_nc3 (REAL *a)
 Set a 3*3 full matrix to be a identity. More...
 
void fasp_smat_identity_nc5 (REAL *a)
 Set a 5*5 full matrix to be a identity. More...
 
void fasp_smat_identity_nc7 (REAL *a)
 Set a 7*7 full matrix to be a identity. More...
 
void fasp_smat_identity (REAL *a, const INT n, const INT n2)
 Set a n*n full matrix to be a identity. More...
 

Detailed Description

Simple operations for small dense matrices in row-major format.

Definition in file smat.c.

Macro Definition Documentation

#define SWAP (   a,
 
)    {temp=(a);(a)=(b);(b)=temp;}

swap two numbers

Definition at line 9 of file smat.c.

Function Documentation

INT fasp_blas_smat_inv ( REAL a,
const INT  n 
)

Compute the inverse matrix of a small full matrix a.

Parameters
aPointer to the REAL array which stands a n*n matrix
nDimension of the matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
04/21/2010

Definition at line 554 of file smat.c.

void fasp_blas_smat_inv_nc ( REAL a,
const INT  n 
)

Compute the inverse of a matrix using Gauss Elimination.

Parameters
aPointer to the REAL array which stands a n*n matrix
nDimension of the matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 405 of file smat.c.

void fasp_blas_smat_inv_nc2 ( REAL a)

Compute the inverse matrix of a 2*2 full matrix A (in place)

Parameters
aPointer to the REAL array which stands a 2*2 matrix
Author
Xiaozhe Hu
Date
18/11/2011

Definition at line 25 of file smat.c.

void fasp_blas_smat_inv_nc3 ( REAL a)

Compute the inverse matrix of a 3*3 full matrix A (in place)

Parameters
aPointer to the REAL array which stands a 3*3 matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 61 of file smat.c.

void fasp_blas_smat_inv_nc4 ( REAL a)

Compute the inverse matrix of a 4*4 full matrix A (in place)

Parameters
aPointer to the REAL array which stands a 4*4 matrix
Author
Xiaozhe Hu
Date
01/12/2013

Modified by Hongxuan Zhang on 06/13/2014: Fix a bug in M23.

Definition at line 115 of file smat.c.

void fasp_blas_smat_inv_nc5 ( REAL a)

Compute the inverse matrix of a 5*5 full matrix A (in place)

Parameters
aPointer to the REAL array which stands a 5*5 matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 173 of file smat.c.

void fasp_blas_smat_inv_nc7 ( REAL a)

Compute the inverse matrix of a 7*7 matrix a.

Parameters
aPointer to the REAL array which stands a 7*7 matrix
Note
This is NOT implemented yet!
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 389 of file smat.c.

void fasp_blas_smat_invp_nc ( REAL a,
const INT  n 
)

Compute the inverse of a matrix using Gauss Elimination with Pivoting.

Parameters
aPointer to the REAL array which stands a n*n matrix
nDimension of the matrix
Author
Chensong Zhang
Date
04/03/2015
Note
This routine is based on gaussj() from "Numerical Recipies in C"!

Definition at line 472 of file smat.c.

REAL fasp_blas_smat_Linfinity ( REAL A,
const INT  n 
)

Compute the L infinity norm of A.

Parameters
APointer to the n*n dense matrix
nthe dimension of the dense matrix
Author
Xiaozhe Hu
Date
05/26/2014

Definition at line 595 of file smat.c.

void fasp_iden_free ( idenmat A)

Free idenmat sparse matrix data memeory space.

Parameters
APointer to the idenmat matrix
Author
Chensong Zhang
Date
2010/04/03

Definition at line 628 of file smat.c.

void fasp_smat_identity ( REAL a,
const INT  n,
const INT  n2 
)

Set a n*n full matrix to be a identity.

Parameters
aPointer to the REAL vector which stands for a n*n full matrix
nSize of full matrix
n2Length of the REAL vector which stores the n*n full matrix
Author
Xiaozhe Hu
Date
2010/12/25

Definition at line 728 of file smat.c.

void fasp_smat_identity_nc2 ( REAL a)

Set a 2*2 full matrix to be a identity.

Parameters
aPointer to the REAL vector which stands for a 2*2 full matrix
Author
Xiaozhe Hu
Date
2011/11/18

Definition at line 648 of file smat.c.

void fasp_smat_identity_nc3 ( REAL a)

Set a 3*3 full matrix to be a identity.

Parameters
aPointer to the REAL vector which stands for a 3*3 full matrix
Author
Xiaozhe Hu
Date
2010/12/25

Definition at line 665 of file smat.c.

void fasp_smat_identity_nc5 ( REAL a)

Set a 5*5 full matrix to be a identity.

Parameters
aPointer to the REAL vector which stands for a 5*5 full matrix
Author
Xiaozhe Hu
Date
2010/12/25

Definition at line 682 of file smat.c.

void fasp_smat_identity_nc7 ( REAL a)

Set a 7*7 full matrix to be a identity.

Parameters
aPointer to the REAL vector which stands for a 7*7 full matrix
Author
Xiaozhe Hu
Date
2010/12/25

Definition at line 703 of file smat.c.