-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLattice_3d.h
More file actions
100 lines (88 loc) · 2.6 KB
/
Lattice_3d.h
File metadata and controls
100 lines (88 loc) · 2.6 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
Library of functions for lattice gas simulations and otherwise. C++ implemntations, making them classes.
Note: the vast majority of this is not used for the red/blue cluster & interface analysis.
*/
#ifndef SOSGAURD
#define SOSGAURD
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <vector>
#include "Utilities.h"
#include "Cluster_analysis.h"
#endif
#define FLAG_MAX 2
using namespace std;
class Lattice_3d: public Utilities, public Cluster_analysis {
private:
int N, Lx, Ly, maxstep, size, asize, sollocprobe, nsol, hsol, cts;
double epsilon, Te, epsilon1;
int istheresolute;
int countlattice;
double v_e_HS;
double Umbrella;
double mu;
double rad;
double coarsegrain;
double K_umbrella;
int delta_rad;
double deltaint;
int extent;
int count[FLAG_MAX];
public:
int hstats_cap;
int countmovie;
ofstream freenergy,Covariance;
gsl_rng *r;
long int randomseed;
int SOSTYPEDEF;
int GAUSSIAN;
vector< vector < vector<int> > > nocc;
vector< vector < vector<int> > > nocc1;
vector< vector < vector<int> > > nocctemp;
double rsol[20][3];
vector< vector< vector < vector<double> > > > cv;
vector< vector< vector < vector<double> > > > cv1;
vector<double> cr;
vector<double> hstats;
vector<double> hstatscap;
vector<double> hinstant;
ofstream fileout,fileout1;
//fftw_complex *heightreal,*heightfourier,**heightfourier_sol;
//fftw_plan p;
Lattice_3d();
int box[3];
~Lattice_3d();
void initialize(int, int , int);
void initializenocc();
void writeoutlattice_XYZ(char *);
void writeoutnocclattice_XYZ(char *);
void runmontecarlopropagate_lattice(int ,int,double);
double montecarlopropagate_lattice(int,double);
void att_movesolute();
void att_changerad();
double energy_modify();
double Umbrellabias();
double volumeoccsolute();
double volumeincell(double *,int, int,int);
void writesolstats_lattice(int);
double energyint_lattice(int, int,int);
double r2(double,double,double);
void setnewrad(double);
int checkbox(double *,int, int,int);
void cube_sphere_overlap_MC();
void cube_cube_overlap_MC();
void whichbox(int*,double,double,double);
int deltafromrad(double);
void att_flip_rad();
double energy_lattice_total();
double energy_lattice_total(double,double);
void computehstats();
void computehstats_cap();
void computeinstantinterface();
void compute1Dcircularinterface(int);
void reinitialize_hstatscap();
void setnewepsilon(double);
void neighborlist(int *,int,int,int);
};