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

Sparse matrix operations for dSTRmat matrices. More...

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

Go to the source code of this file.

Functions

void fasp_dstr_null (dSTRmat *A)
 Initialize sparse matrix on structured grid. More...
 
dSTRmat fasp_dstr_create (const INT nx, const INT ny, const INT nz, const INT nc, const INT nband, INT *offsets)
 Create STR sparse matrix data memory space. More...
 
void fasp_dstr_alloc (const INT nx, const INT ny, const INT nz, const INT nxy, const INT ngrid, const INT nband, const INT nc, INT *offsets, dSTRmat *A)
 Allocate STR sparse matrix memory space. More...
 
void fasp_dstr_free (dSTRmat *A)
 Free STR sparse matrix data memeory space. More...
 
void fasp_dstr_cp (dSTRmat *A, dSTRmat *A1)
 Copy a dSTRmat to a new one A1=A. More...
 

Detailed Description

Sparse matrix operations for dSTRmat matrices.

Definition in file sparse_str.c.

Function Documentation

void fasp_dstr_alloc ( const INT  nx,
const INT  ny,
const INT  nz,
const INT  nxy,
const INT  ngrid,
const INT  nband,
const INT  nc,
INT offsets,
dSTRmat A 
)

Allocate STR sparse matrix memory space.

Parameters
nxNumber of grids in x direction
nyNumber of grids in y direction
nzNumber of grids in z direction
nxyNumber of grids in x-y plane
ngridNumber of grids
nbandNumber of off-diagonal bands
ncNumber of components
offsetsShift from diagonal
APointer to the dSTRmat matrix
Author
Shiquan Zhang, Xiaozhe Hu
Date
05/17/2010

Definition at line 109 of file sparse_str.c.

void fasp_dstr_cp ( dSTRmat A,
dSTRmat A1 
)

Copy a dSTRmat to a new one A1=A.

Parameters
APointer to the dSTRmat matrix
A1Pointer to the dSTRmat matrix
Author
Zhiyang Zhou
Date
04/21/2010

Definition at line 181 of file sparse_str.c.

dSTRmat fasp_dstr_create ( const INT  nx,
const INT  ny,
const INT  nz,
const INT  nc,
const INT  nband,
INT offsets 
)

Create STR sparse matrix data memory space.

Parameters
nxNumber of grids in x direction
nyNumber of grids in y direction
nzNumber of grids in z direction
ncNumber of components
nbandNumber of off-diagonal bands
offsetsShift from diagonal
Returns
The dSTRmat matrix
Author
Shiquan Zhang, Xiaozhe Hu
Date
05/17/2010

Definition at line 57 of file sparse_str.c.

void fasp_dstr_free ( dSTRmat A)

Free STR sparse matrix data memeory space.

Parameters
APointer to the dSTRmat matrix
Author
Shiquan Zhang, Xiaozhe Hu
Date
05/17/2010

Definition at line 152 of file sparse_str.c.

void fasp_dstr_null ( dSTRmat A)

Initialize sparse matrix on structured grid.

Parameters
APointer to the dSTRmat matrix
Author
Shiquan Zhang, Xiaozhe Hu
Date
05/17/2010

Definition at line 25 of file sparse_str.c.