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

Find inversion of 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_smat_inv_nc2 (REAL *a)
 Compute the inverse matrix of a 2*2 full matrix A (in place) More...
 
void fasp_smat_inv_nc3 (REAL *a)
 Compute the inverse matrix of a 3*3 full matrix A (in place) More...
 
void fasp_smat_inv_nc4 (REAL *a)
 Compute the inverse matrix of a 4*4 full matrix A (in place) More...
 
void fasp_smat_inv_nc5 (REAL *a)
 Compute the inverse matrix of a 5*5 full matrix A (in place) More...
 
void fasp_smat_inv_nc7 (REAL *a)
 Compute the inverse matrix of a 7*7 matrix a. More...
 
void fasp_smat_inv_nc (REAL *a, const INT n)
 Compute the inverse of a matrix using Gauss Elimination. More...
 
SHORT fasp_smat_invp_nc (REAL *a, const INT n)
 Compute the inverse of a matrix using Gauss Elimination with Pivoting. More...
 
SHORT fasp_smat_inv (REAL *a, const INT n)
 Compute the inverse matrix of a small full matrix a. More...
 
REAL fasp_smat_Linf (const REAL *A, const INT n)
 Compute the L infinity norm of A. 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

Find inversion of small dense matrices in row-major format.

Note
This file contains Level-1 (Bla) functions. It requires: AuxMemory.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 BlaSmallMatInv.c.

Macro Definition Documentation

◆ SWAP

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

swap two numbers

Definition at line 17 of file BlaSmallMatInv.c.

Function Documentation

◆ fasp_smat_identity()

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 754 of file BlaSmallMatInv.c.

◆ fasp_smat_identity_nc2()

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 674 of file BlaSmallMatInv.c.

◆ fasp_smat_identity_nc3()

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 691 of file BlaSmallMatInv.c.

◆ fasp_smat_identity_nc5()

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 708 of file BlaSmallMatInv.c.

◆ fasp_smat_identity_nc7()

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 729 of file BlaSmallMatInv.c.

◆ fasp_smat_inv()

SHORT fasp_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 603 of file BlaSmallMatInv.c.

◆ fasp_smat_inv_nc()

void fasp_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 441 of file BlaSmallMatInv.c.

◆ fasp_smat_inv_nc2()

void fasp_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 33 of file BlaSmallMatInv.c.

◆ fasp_smat_inv_nc3()

void fasp_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 67 of file BlaSmallMatInv.c.

◆ fasp_smat_inv_nc4()

void fasp_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 111 of file BlaSmallMatInv.c.

◆ fasp_smat_inv_nc5()

void fasp_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 170 of file BlaSmallMatInv.c.

◆ fasp_smat_inv_nc7()

void fasp_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 425 of file BlaSmallMatInv.c.

◆ fasp_smat_invp_nc()

SHORT fasp_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 508 of file BlaSmallMatInv.c.

◆ fasp_smat_Linf()

REAL fasp_smat_Linf ( const 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 646 of file BlaSmallMatInv.c.