HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BandedMatrixPreallocate.c
Go to the documentation of this file.
1 
6 #include <stdlib.h>
7 #include <bandedmatrix.h>
8 
11  void *A,
12  int nbands,
13  int nrows_local,
14  int BlockSize
15  )
16 {
17  BandedMatrix *B = (BandedMatrix*) A;
18 
19  B->nbands = nbands;
20  B->nrows_local = nrows_local;
21  B->BlockSize = BlockSize;
22 
23  B->ncol = (int*) calloc (nrows_local*nbands, sizeof(int));
24  B->nrow = (int*) calloc (nrows_local, sizeof(int));
25  B->data = (double*) calloc (nrows_local*nbands*BlockSize*BlockSize, sizeof(double));
26 
27  return(0);
28 }
double * data
Definition: bandedmatrix.h:24
Structure for defining a banded block matrix.
Definition: bandedmatrix.h:18
Data structure and some function declarations for banded block matrices.
int BandedMatrixPreallocate(void *, int, int, int)