Ice Sheet System Model  4.18
Code documentation
Functions
MatFree.cpp File Reference

wrapper to MatDestroy More...

#include <petscmat.h>
#include <petscksp.h>

Go to the source code of this file.

Functions

void MatFree (Mat *pmat)
 

Detailed Description

wrapper to MatDestroy

Definition in file MatFree.cpp.

Function Documentation

◆ MatFree()

void MatFree ( Mat *  pmat)

Definition at line 16 of file MatFree.cpp.

16  {
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 }