Lemina
A molecular dynamics package for network, granular material and point particles with a range of interaction potential.
Loading...
Searching...
No Matches
AllocArrays.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
AllocArrays
(){
26
int
n;
27
28
// SPACETIME CORRELATIONS
29
cfOrg
= (
double
**) malloc ((
nBuffCorr
+1)*
sizeof
(
double
*));
30
for
(n = 0; n <=
nBuffCorr
; n++)
31
cfOrg
[n] = (
double
*) malloc ((2*
nFunCorr
+1)*
sizeof
(
double
));
32
33
cfVal
= (
double
*) malloc ((2*
nFunCorr
+1)*
sizeof
(
double
));
34
indexCorr
= (
int
*) malloc ((
nBuffCorr
+1)*
sizeof
(
int
));
35
36
spacetimeCorr
= (
double
**) malloc ((
nBuffCorr
+1)*
sizeof
(
double
));
37
for
(n = 0; n <=
nBuffCorr
; n++)
38
spacetimeCorr
[n] = (
double
*) malloc ((
nFunCorr
*
nValCorr
+1)*
sizeof
(
double
));
39
40
spacetimeCorrAv
= (
double
*) malloc ((
nFunCorr
*
nValCorr
+1)*
sizeof
(
double
));
41
42
// VISCOSITY
43
indexAcf
= (
double
*)malloc((
nBuffAcf
+1)*
sizeof
(
double
));
44
viscAcf
= (
double
**)malloc((
nBuffAcf
+1)*
sizeof
(
double
*));
45
for
(n = 0 ; n <=
nBuffAcf
; n ++)
46
viscAcf
[n] = (
double
*)malloc((
nValAcf
+1)*
sizeof
(
double
));
47
48
viscAcfOrg
= (
double
*)malloc((
nBuffAcf
+1)*
sizeof
(
double
));
49
viscAcfAv
= (
double
*)malloc((
nValAcf
+1)*
sizeof
(
double
));
50
51
// RDF
52
histRdf
= (
double
*)malloc((
sizeHistRdf
+1)*
sizeof
(
double
));
53
}
AllocArrays
void AllocArrays()
Definition
AllocArrays.c:25
global.h
viscAcfAv
double * viscAcfAv
Definition
global.h:99
nValCorr
int nValCorr
Definition
global.h:95
spacetimeCorrAv
double * spacetimeCorrAv
Definition
global.h:94
nValAcf
int nValAcf
nBuffAcf
int nBuffAcf
Definition
global.h:100
spacetimeCorr
double ** spacetimeCorr
Definition
global.h:94
indexCorr
int * indexCorr
indexAcf
double * indexAcf
histRdf
double * histRdf
viscAcf
double ** viscAcf
Definition
global.h:99
viscAcfOrg
double * viscAcfOrg
Definition
global.h:99
nBuffCorr
int nBuffCorr
Definition
global.h:95
sizeHistRdf
int sizeHistRdf
Definition
global.h:104
cfOrg
double ** cfOrg
cfVal
double * cfVal
Definition
global.h:94
nFunCorr
int nFunCorr
Definition
global.h:95
source
AllocArrays.c
Generated by
1.13.2