Lemina
A molecular dynamics package for network, granular material and point particles with a range of interaction potential.
 
Loading...
Searching...
No Matches
Close.c
Go to the documentation of this file.
1/*
2 * This file is part of Lamina.
3 *
4 * Lamina is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Lamina is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Lamina. If not, see <https://www.gnu.org/licenses/>.
16
17 Copyright (C) 2025 Harish Charan, University of Durham, UK
18
19 */
20
21#include<stdio.h>
22#include<stdlib.h>
23#include"global.h"
24
25void Close(){
26 int n;
27 free(rx); free(ry); free(vx); free(vy); free(ax); free(ay); free(fx); free(fy);
28 free(fax);
29 free(fay);
30 free(cellList);
31
32 free(atomID); free(atomType); free(atomRadius); free(atomMass);
33 free(speed);
34 free(atom1); free(atom2); free(BondID);
35 free(BondType); free(kb); free(ro);
36 free(ImageX); free(ImageY); free(rxUnwrap); free(ryUnwrap);
37 free(atomIDInterface);
38 free(PairID); free(Pairatom1); free(Pairatom2);
39 free(PairXij); free(PairYij);
40 free(molID);
41
42 for (n = 0; n <= nAtom; n++) {
43 free(isBonded[n]);
44 }
45 free(isBonded);
46
47 for (n = 0; n <= nBuffCorr; n++){
48 free(cfOrg[n]);
49 free(spacetimeCorr[n]);
50 }
51 free(cfOrg);
52 free(spacetimeCorr);
53 free(cfVal);
54 free(indexCorr);
55 free(spacetimeCorrAv);
56
57 free(indexAcf);
58 free(viscAcfOrg);
59 free(viscAcfAv);
60 for(n = 0 ; n <= nBuffAcf ; n ++)
61 free(viscAcf[n]);
62 free(viscAcf);
63
64 }
void Close()
Definition Close.c:25
int nAtom
Definition global.h:24
double * viscAcfAv
Definition global.h:99
int * BondID
double * atomMass
double * spacetimeCorrAv
Definition global.h:94
int * atom2
Definition global.h:36
double * fay
Definition global.h:85
int * BondType
Definition global.h:37
double * speed
int ** isBonded
int nBuffAcf
Definition global.h:100
double ** spacetimeCorr
Definition global.h:94
int * molID
int * cellList
double * ay
Definition global.h:17
int * indexCorr
double * vx
Definition global.h:17
int * ImageX
int * ImageY
Definition global.h:50
double * indexAcf
double * ro
Definition global.h:38
int * atomIDInterface
int * atom1
double * rx
double * ax
Definition global.h:17
double * fy
Definition global.h:17
double * kb
double ** viscAcf
Definition global.h:99
int * PairID
double * viscAcfOrg
Definition global.h:99
double * PairXij
double * ryUnwrap
Definition global.h:51
int nBuffCorr
Definition global.h:95
double * atomRadius
int * Pairatom2
Definition global.h:63
double ** cfOrg
double * PairYij
Definition global.h:64
int * atomType
double * vy
Definition global.h:17
double * rxUnwrap
double * cfVal
Definition global.h:94
int * atomID
double * fx
Definition global.h:17
int * Pairatom1
Definition global.h:63
double * ry
Definition global.h:17
double * fax