HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
PetscCleanup.cpp
Go to the documentation of this file.
1 
6 #ifdef with_petsc
7 
8 #include <stdlib.h>
10 
12 int PetscCleanup(void *obj )
13 {
14  PETScContext *ctxt = (PETScContext*) obj;
15  for (int i = 0; i < ctxt->globalDOF.size(); i++) {
16  free(ctxt->globalDOF[i]);
17  }
18  ctxt->globalDOF.clear();
19  for (int i = 0; i < ctxt->points.size(); i++) {
20  free(ctxt->points[i]);
21  }
22  ctxt->points.clear();
23  if (ctxt->offsets) free(ctxt->offsets);
24  return(0);
25 }
26 
27 #endif
std::vector< int * > points
int PetscCleanup(void *obj)
Structure containing the variables for time-integration with PETSc.
std::vector< double * > globalDOF
Contains structure that defines the interface for time integration with PETSc (https://petsc.org/release/)