Ice Sheet System Model  4.18
Code documentation
MatFree.cpp
Go to the documentation of this file.
1 
5 #ifdef HAVE_CONFIG_H
6  #include <config.h>
7 #else
8 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
9 #endif
10 
11 /*Petsc includes: */
12 #include <petscmat.h>
13 #include <petscmat.h>
14 #include <petscksp.h>
15 
16 void MatFree(Mat* pmat){
17 
18  #if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2)
19  if(*pmat)MatDestroy(*pmat);
20  *pmat=NULL;
21  #else
22  if(*pmat)MatDestroy(pmat);
23  *pmat=NULL;
24  #endif
25 
26 }
MatFree
void MatFree(Mat *pmat)
Definition: MatFree.cpp:16