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

Subroutines for matrix format conversion. More...

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

Go to the source code of this file.

Functions

SHORT fasp_format_dcoo_dcsr (dCOOmat *A, dCSRmat *B)
 Transform a REAL matrix from its IJ format to its CSR format. More...
 
SHORT fasp_format_dcsr_dcoo (dCSRmat *A, dCOOmat *B)
 Transform a REAL matrix from its CSR format to its IJ format. More...
 
SHORT fasp_format_dstr_dcsr (dSTRmat *A, dCSRmat *B)
 Transfer a 'dSTRmat' type matrix into a 'dCSRmat' type matrix. More...
 
dCSRmat fasp_format_bdcsr_dcsr (block_dCSRmat *Ab)
 Form the whole dCSRmat A using blocks given in Ab. More...
 
dCSRLmatfasp_format_dcsrl_dcsr (dCSRmat *A)
 Convert a dCSRmat into a dCSRLmat. More...
 
dCSRmat fasp_format_dbsr_dcsr (dBSRmat *B)
 Transfer a 'dBSRmat' type matrix into a dCSRmat. More...
 
dBSRmat fasp_format_dcsr_dbsr (dCSRmat *A, const INT nb)
 Transfer a dCSRmat type matrix into a dBSRmat. More...
 
dBSRmat fasp_format_dstr_dbsr (dSTRmat *B)
 Transfer a 'dSTRmat' type matrix to a 'dBSRmat' type matrix. More...
 
dCOOmatfasp_format_dbsr_dcoo (dBSRmat *B)
 Transfer a 'dBSRmat' type matrix to a 'dCOOmat' type matrix. More...
 

Detailed Description

Subroutines for matrix format conversion.

Definition in file formats.c.

Function Documentation

dCSRmat fasp_format_bdcsr_dcsr ( block_dCSRmat Ab)

Form the whole dCSRmat A using blocks given in Ab.

Parameters
AbPointer to block_dCSRmat matrix
Returns
dCSRmat matrix if succeed, NULL if fail
Author
Shiquan Zhang
Date
08/10/2010

Definition at line 292 of file formats.c.

dCOOmat * fasp_format_dbsr_dcoo ( dBSRmat B)

Transfer a 'dBSRmat' type matrix to a 'dCOOmat' type matrix.

Parameters
BPointer to dBSRmat matrix
Returns
Pointer to dCOOmat matrix
Author
Zhiyang Zhou
Date
2010/10/26

Definition at line 943 of file formats.c.

dCSRmat fasp_format_dbsr_dcsr ( dBSRmat B)

Transfer a 'dBSRmat' type matrix into a dCSRmat.

Parameters
BPointer to dBSRmat matrix
Returns
dCSRmat matrix
Author
Zhiyang Zhou
Date
10/23/2010

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/24/2012

Note
Works for general nb (Xiaozhe)

Definition at line 495 of file formats.c.

SHORT fasp_format_dcoo_dcsr ( dCOOmat A,
dCSRmat B 
)

Transform a REAL matrix from its IJ format to its CSR format.

Parameters
APointer to dCOOmat matrix
BPointer to dCSRmat matrix
Returns
FASP_SUCCESS if successed; otherwise, error information.
Author
Xuehai Huang
Date
08/10/2009

Definition at line 27 of file formats.c.

dBSRmat fasp_format_dcsr_dbsr ( dCSRmat A,
const INT  nb 
)

Transfer a dCSRmat type matrix into a dBSRmat.

Parameters
APointer to the dCSRmat type matrix
nbsize of each block
Returns
dBSRmat matrix
Author
Zheng Li
Date
03/27/2014
Note
modified by Xiaozhe Hu to avoid potential memory leakage problem

Definition at line 721 of file formats.c.

SHORT fasp_format_dcsr_dcoo ( dCSRmat A,
dCOOmat B 
)

Transform a REAL matrix from its CSR format to its IJ format.

Parameters
APointer to dCSRmat matrix
BPointer to dCOOmat matrix
Returns
FASP_SUCCESS if successed; otherwise, error information.
Author
Xuehai Huang
Date
08/10/2009

Modified by Chunsheng Feng, Zheng Li

Date
10/12/2012

Definition at line 80 of file formats.c.

dCSRLmat * fasp_format_dcsrl_dcsr ( dCSRmat A)

Convert a dCSRmat into a dCSRLmat.

Parameters
APointer to dCSRLmat matrix
Returns
Pointer to dCSRLmat matrix
Author
Zhiyang Zhou
Date
2011/01/07

Definition at line 361 of file formats.c.

dBSRmat fasp_format_dstr_dbsr ( dSTRmat B)

Transfer a 'dSTRmat' type matrix to a 'dBSRmat' type matrix.

Parameters
BPointer to dSTRmat matrix
Returns
dBSRmat matrix
Author
Zhiyang Zhou
Date
2010/10/26

Definition at line 839 of file formats.c.

SHORT fasp_format_dstr_dcsr ( dSTRmat A,
dCSRmat B 
)

Transfer a 'dSTRmat' type matrix into a 'dCSRmat' type matrix.

Parameters
APointer to dSTRmat matrix
BPointer to dCSRmat matrix
Returns
FASP_SUCCESS if successed; otherwise, error information.
Author
Zhiyang Zhou
Date
2010/04/29

Definition at line 117 of file formats.c.