17#include "fasp_functs.h"
60 for (i=0;i<nband;++i) A.
offsets[i]=offsets[i];
66 for (i=0;i<A.
nband;++i) {
115 for (i=0;i<nband;++i) A->
offsets[i]=offsets[i];
121 for (i=0;i<nband;++i) {
143 for ( i = 0; i < A->
nband; ++i ) {
165 const INT nc2 = (A->
nc)*(A->
nc);
178 for (i=0;i<A->
nband;++i) {
void fasp_mem_free(void *mem)
Free up previous allocated memory body and set pointer to NULL.
void * fasp_mem_calloc(const unsigned int size, const unsigned int type)
Allocate, initiate, and check memory.
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.
void fasp_dstr_free(dSTRmat *A)
Free STR sparse matrix data memeory space.
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.
void fasp_dstr_cp(const dSTRmat *A, dSTRmat *B)
Copy a dSTRmat to a new one B=A.
Main header file for the FASP project.
Structure matrix of REAL type.
INT * offsets
offsets of the off-diagonals (length is nband)
INT nx
number of grids in x direction
INT nxy
number of grids on x-y plane
INT ny
number of grids in y direction
INT nband
number of off-diag bands
REAL * diag
diagonal entries (length is ngrid*(nc^2))
INT nc
size of each block (number of components)
INT nz
number of grids in z direction
REAL ** offdiag
off-diagonal entries (dimension is nband * [(ngrid-|offsets|) * nc^2])