-
Notifications
You must be signed in to change notification settings - Fork 2
/
layer.h
61 lines (58 loc) · 1.51 KB
/
layer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include<sstream>
#include"atom.h"
#include"parameters.h"
#include"myGrace.h"
class neighbour
{
public:
int ni;
int pos;
int flag;
double arg;
rxy r;
double r2;
vector<neighbour>::iterator next;
neighbour(void);
neighbour(int ,int ,double ,rxy ,double );
};
class layer
// simulating box
{
public:
int n;
double lx, ly;
vector < atom >p, oldc;
double nrx, nry;
int bx, by;
vector < vector < vector < int > > >cells;
double rvs, drvs;
//vector < double >vz, esave;
vector < vector < int > >pv1;
vector < vector < double > >v_nb;
//vector < vector < int > >pv_nb; // position of potential in neighbour's list
//double temperature, tkpb,q0t,u_average;
//int op_steps;
//vector<vector < neighbour >::iterator> pvnb;
vector<int> nlist;
string fn_data,fn_op, fn_data_chkpt, fn_data_chkpt_bak;
//layer () { };
void init (double);
void voronoi(), write_data (), read_data ();
void add_nb (int, int, double),add_vnb(int,int);
double old_v (int), new_v (int),u_total(),gtop(),goop();
int read_data_chk (string);
void w_voronoi ();
private:
double halflx, halfly,half3lx,half3ly, sigma,sigma01, xi, yi, zi, vznew;
atom new_atom;
double vnrx,vnry;
int vbx,vby;
vector < vector < vector < int > > >vcells;
vector<vector < neighbour > > vnb;
double vrvs;
//double r2 (int, int);
double dr2 (vector < atom >::iterator);
void accept (int);
rxy displ (rxy ,rxy );
};