-
Notifications
You must be signed in to change notification settings - Fork 0
/
IsingParameters.h
84 lines (71 loc) · 2.49 KB
/
IsingParameters.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#ifndef ISING_PARAMETERS_H
#define ISING_PARAMETERS_H
#include "stdafx.h"
#include "Constants.h"
#include "Noise.h"
#include "ConfigReader.h"
class IsingParameters
{
public:
IsingParameters();
IsingParameters(int* _LatticeShape, double _n, double _K, double _Tau0, double _Omega, double _Beta,
const Noise &_AlphaNoise, bool _UsePBC, bool _UseNewEqn = true, int _avgType = AvgType::ARITMETIC);
IsingParameters(std::string sParamFile);
IsingParameters(const ConfigParams ¶ms);
~IsingParameters();
int LatticeShape[N_DIM];
bool UsePBC = true;
bool UseNewEqn = true;
double K = NULL;
double n = NULL;
double Tau0 = NULL;
double Omega = NULL;
double Beta = NULL;
double AlphaAverage = NULL;
int RateAvgType = AvgType::ARITMETIC;
int SBNoiseAvgType = AvgType::GEOMETRIC;
Noise AlphaNoise;
bool NoiseOnGlassiness = false;
bool ForbidUnphysicalAlpha = true;
bool SiteBasedNoise = true;
double Gamma0 = NULL;
double Gammac = NULL;
double Kc = NULL;
double gammac = NULL;
double psi = NULL;
double psi_min = NULL;
double Glassiness_MF = NULL;
double NormDistFromGmax_MF = NULL;
int NumSites(bool force_calc = false) const;
int ProjectionArea(int axis) const;
void GetSiteCoordinates(int site, int* res) const;
int SiteID(int* site_coords) const;
double GetPsiMin();
double GetGMax();
double GetCriticalGamma();
double CalcPsiMin() const;
double CalcGMax() const;
double CalcCriticalGamma() const;
double CalcPsiFromNormGlassiness(double norm_g) const;
double CalcAlphaFromNormGlassiness(double norm_g) const;
double CalcAlphaFromPsi(double psi_val) const;
double GetPsiFromAlpha(double alpha);
double GetGlassinessFromAlpha(double alpha = BAD_VALUE);
double GetNormGlassinessFromAlpha(double alpha = BAD_VALUE);
double GetDistFromGmax(double alpha = BAD_VALUE);
double CalcCriticalStrainFromAlpha(double alpha) const;
double CalcCriticalKFromAlpha(double alpha) const;
double GetYieldStrainFromAlpha(double alpha);
double CalcYieldStrainFromAlpha(double alpha) const;
double GetMeanFieldGamma(double rate, double custom_alpha = -1) const;
void Initialize(const ConfigParams ¶ms);
void UpdateDerivedParams();
void CopyFrom(const IsingParameters ¶ms, bool deep_copy = false);
private:
int _num_sites = 0;
bool _params_initialized = false;
double* _cbroots = NULL; // container for cubic roots used to compute yield strain
double _psi_normalization(); // it returns what was once psi_c in the old model (=8/3 for Beta=2)
};
#endif // !ISING_PARAMETERS_H