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

Cleans up allocations specific to compact finite-difference methods. More...

#include <stdlib.h>
#include <interpolation.h>
#include <mpivars.h>
#include <hypar.h>

Go to the source code of this file.

Functions

int CompactSchemeCleanup (void *s)
 

Detailed Description

Cleans up allocations specific to compact finite-difference methods.

Author
Debojyoti Ghosh

Definition in file CompactSchemeCleanup.c.

Function Documentation

◆ CompactSchemeCleanup()

int CompactSchemeCleanup ( void *  s)

Cleans up all allocations related to the compact finite difference methods.

Parameters
sCompactScheme object of type CompactScheme

Definition at line 14 of file CompactSchemeCleanup.c.

15 {
16  CompactScheme *compact = (CompactScheme*) s;
17 
18  if (compact->A) free(compact->A);
19  if (compact->B) free(compact->B);
20  if (compact->C) free(compact->C);
21  if (compact->R) free(compact->R);
22 
23  if (compact->sendbuf) free(compact->sendbuf);
24  if (compact->recvbuf) free(compact->recvbuf);
25 
26  return(0);
27 }
double * recvbuf
Structure of variables/parameters needed by the compact schemes.
double * sendbuf