HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
BandedMatrixDestroy.c File Reference

Destroy a banded matrix object. More...

#include <stdlib.h>
#include <bandedmatrix.h>

Go to the source code of this file.

Functions

int BandedMatrixDestroy (void *A)
 

Detailed Description

Destroy a banded matrix object.

Author
Debojyoti Ghosh

Definition in file BandedMatrixDestroy.c.

Function Documentation

◆ BandedMatrixDestroy()

int BandedMatrixDestroy ( void *  A)

Free up allocations inside a banded matrix object

Parameters
ABanded matrix object of type BandedMatrix

Definition at line 10 of file BandedMatrixDestroy.c.

11 {
12  BandedMatrix *B = (BandedMatrix*) A;
13 
14  if (B->ncol) free(B->ncol);
15  if (B->nrow) free(B->nrow);
16  if (B->data) free(B->data);
17 
18  return(0);
19 }
double * data
Definition: bandedmatrix.h:24
Structure for defining a banded block matrix.
Definition: bandedmatrix.h:18