Lemina
A molecular dynamics package for network, granular material and point particles with a range of interaction potential.
 
Loading...
Searching...
No Matches
AccumVacf.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"global.h"
23
24double Integrate(double *, int);
25 void PrintVacf();
26 void ZeroVacf();
27 void AccumVacf(){
28 double fac;
29 int j, nb;
30 for(nb = 1 ; nb <= nBuffAcf ; nb ++){
31 if(indexAcf[nb] == nValAcf){
32 for(j = 1 ; j <= nValAcf; j ++){
33 viscAcfAv[j] += viscAcf[nb][j];
34 }
35 indexAcf[nb] = 0;
36 countAcfAv ++;
38 fac = 1./(kinEnergy*region[1]*region[2]*limitAcfAv);
40 PrintVacf();
41 ZeroVacf();
42} } } }
43
void PrintVacf()
Definition PrintVacf.c:25
double Integrate(double *, int)
Definition Integrate.c:25
void AccumVacf()
Definition AccumVacf.c:27
void ZeroVacf()
Definition ZeroVacf.c:25
double * viscAcfAv
Definition global.h:99
double viscAcfInt
Definition global.h:99
double region[2+1]
double kinEnergy
Definition global.h:20
int nValAcf
int nBuffAcf
Definition global.h:100
int stepAcf
Definition global.h:100
double * indexAcf
double deltaT
Definition global.h:20
double ** viscAcf
Definition global.h:99
int limitAcfAv
Definition global.h:100
int countAcfAv
Definition global.h:100