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
25
void
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
}
Close
void Close()
Definition
Close.c:25
global.h
nAtom
int nAtom
Definition
global.h:24
viscAcfAv
double * viscAcfAv
Definition
global.h:99
BondID
int * BondID
atomMass
double * atomMass
spacetimeCorrAv
double * spacetimeCorrAv
Definition
global.h:94
atom2
int * atom2
Definition
global.h:36
fay
double * fay
Definition
global.h:85
BondType
int * BondType
Definition
global.h:37
speed
double * speed
isBonded
int ** isBonded
nBuffAcf
int nBuffAcf
Definition
global.h:100
spacetimeCorr
double ** spacetimeCorr
Definition
global.h:94
molID
int * molID
cellList
int * cellList
ay
double * ay
Definition
global.h:17
indexCorr
int * indexCorr
vx
double * vx
Definition
global.h:17
ImageX
int * ImageX
ImageY
int * ImageY
Definition
global.h:50
indexAcf
double * indexAcf
ro
double * ro
Definition
global.h:38
atomIDInterface
int * atomIDInterface
atom1
int * atom1
rx
double * rx
ax
double * ax
Definition
global.h:17
fy
double * fy
Definition
global.h:17
kb
double * kb
viscAcf
double ** viscAcf
Definition
global.h:99
PairID
int * PairID
viscAcfOrg
double * viscAcfOrg
Definition
global.h:99
PairXij
double * PairXij
ryUnwrap
double * ryUnwrap
Definition
global.h:51
nBuffCorr
int nBuffCorr
Definition
global.h:95
atomRadius
double * atomRadius
Pairatom2
int * Pairatom2
Definition
global.h:63
cfOrg
double ** cfOrg
PairYij
double * PairYij
Definition
global.h:64
atomType
int * atomType
vy
double * vy
Definition
global.h:17
rxUnwrap
double * rxUnwrap
cfVal
double * cfVal
Definition
global.h:94
atomID
int * atomID
fx
double * fx
Definition
global.h:17
Pairatom1
int * Pairatom1
Definition
global.h:63
ry
double * ry
Definition
global.h:17
fax
double * fax
source
Close.c
Generated by
1.13.2