Lemina
A molecular dynamics package for network, granular material and point particles with a range of interaction potential.
Loading...
Searching...
No Matches
DumpPairs.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
22
#include<stdio.h>
23
#include"
global.h
"
24
25
void
DumpPairs
(){
26
int
n;
27
//Trajectory file in LAMMPS dump format for OVITO visualization
28
fprintf(
fppair
,
"ITEM: TIMESTEP\n"
);
29
fprintf(
fppair
,
"%lf\n"
,
timeNow
);
30
fprintf(
fppair
,
"ITEM: NUMBER OF ENTRIES\n"
);
31
fprintf(
fppair
,
"%d\n"
,
nPairActive
);
32
fprintf(
fppair
,
"ITEM: BOX BOUNDS pp ff pp\n"
);
33
fprintf(
fppair
,
"%lf %lf xlo xhi\n"
, -
regionH
[1],
regionH
[1]);
34
fprintf(
fppair
,
"%lf %lf ylo yhi\n"
, -
regionH
[2],
regionH
[2]);
35
fprintf(
fppair
,
"%lf %lf zlo zhi\n"
, -0.1, 0.1);
36
fprintf(
fppair
,
"ITEM: ENTRIES index, atom1 atom2 xij yij discDragx1 discDragy1\n"
);
37
38
for
(n=1; n<=
nPairActive
; n++)
39
fprintf(
fppair
,
"%d %d %d %0.16lf %0.16lf %0.16lf %0.16lf\n"
,
PairID
[n],
Pairatom1
[n],
Pairatom2
[n],
40
PairXij
[n],
PairYij
[n],
discDragx
[n],
discDragy
[n]);
41
42
}
43
44
45
DumpPairs
void DumpPairs()
Definition
DumpPairs.c:25
global.h
discDragy
double * discDragy
Definition
global.h:42
nPairActive
int nPairActive
Definition
global.h:62
PairID
int * PairID
PairXij
double * PairXij
fppair
FILE * fppair
timeNow
double timeNow
Definition
global.h:20
Pairatom2
int * Pairatom2
Definition
global.h:63
PairYij
double * PairYij
Definition
global.h:64
discDragx
double * discDragx
regionH
double regionH[2+1]
Definition
global.h:20
Pairatom1
int * Pairatom1
Definition
global.h:63
source
DumpPairs.c
Generated by
1.13.2