Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
BlaFormat.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 (const dCOOmat *A, dCSRmat *B)
 Transform a REAL matrix from its IJ format to its CSR format. More...
 
SHORT fasp_format_dcsr_dcoo (const dCSRmat *A, dCOOmat *B)
 Transform a REAL matrix from its CSR format to its IJ format. More...
 
SHORT fasp_format_dstr_dcsr (const dSTRmat *A, dCSRmat *B)
 Transfer a 'dSTRmat' type matrix into a 'dCSRmat' type matrix. More...
 
dCSRmat fasp_format_dblc_dcsr (const dBLCmat *Ab)
 Form the whole dCSRmat A using blocks given in Ab. More...
 
dCSRLmatfasp_format_dcsrl_dcsr (const dCSRmat *A)
 Convert a dCSRmat into a dCSRLmat. More...
 
dCSRmat fasp_format_dbsr_dcsr (const dBSRmat *B)
 Transfer a 'dBSRmat' type matrix into a dCSRmat. More...
 
dBSRmat fasp_format_dcsr_dbsr (const dCSRmat *A, const INT nb)
 Transfer a dCSRmat type matrix into a dBSRmat. More...
 
dBSRmat fasp_format_dstr_dbsr (const dSTRmat *B)
 Transfer a 'dSTRmat' type matrix to a 'dBSRmat' type matrix. More...
 
dCOOmatfasp_format_dbsr_dcoo (const dBSRmat *B)
 Transfer a 'dBSRmat' type matrix to a 'dCOOmat' type matrix. More...
 

Detailed Description

Subroutines for matrix format conversion.

Note
This file contains Level-1 (Bla) functions. It requires: AuxArray.c, AuxMemory.c, AuxThreads.c, BlaSparseBSR.c, BlaSparseCSR.c, and BlaSparseCSRL.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 BlaFormat.c.

Function Documentation

◆ fasp_format_dblc_dcsr()

dCSRmat fasp_format_dblc_dcsr ( const dBLCmat Ab)

Form the whole dCSRmat A using blocks given in Ab.

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

Definition at line 294 of file BlaFormat.c.

◆ fasp_format_dbsr_dcoo()

dCOOmat * fasp_format_dbsr_dcoo ( const 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 948 of file BlaFormat.c.

◆ fasp_format_dbsr_dcsr()

dCSRmat fasp_format_dbsr_dcsr ( const 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 497 of file BlaFormat.c.

◆ fasp_format_dcoo_dcsr()

SHORT fasp_format_dcoo_dcsr ( const 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 36 of file BlaFormat.c.

◆ fasp_format_dcsr_dbsr()

dBSRmat fasp_format_dcsr_dbsr ( const 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 723 of file BlaFormat.c.

◆ fasp_format_dcsr_dcoo()

SHORT fasp_format_dcsr_dcoo ( const 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 on 10/12/2012

Definition at line 83 of file BlaFormat.c.

◆ fasp_format_dcsrl_dcsr()

dCSRLmat * fasp_format_dcsrl_dcsr ( const 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 363 of file BlaFormat.c.

◆ fasp_format_dstr_dbsr()

dBSRmat fasp_format_dstr_dbsr ( const 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 844 of file BlaFormat.c.

◆ fasp_format_dstr_dcsr()

SHORT fasp_format_dstr_dcsr ( const 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 119 of file BlaFormat.c.