-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUndamagedDiamondModel.h
73 lines (59 loc) · 1.43 KB
/
UndamagedDiamondModel.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
#ifndef JMG_UNDAMAGED_DIAMOND_MODEL_H
#define JMG_UNDAMAGED_DIAMOND_MODEL_H
#include <complex>
#include <string>
#include "DamageModelInterface.h"
class UndamagedDiamondModel : public DamageModelInterface
{
private:
double _n, _kappa, _p12;
public:
UndamagedDiamondModel();
UndamagedDiamondModel(double n, double kappa, double p12);
double n(double vacancy_concentration) const
{
return _n;
}
double kappa(double vacancy_concentration) const
{
return _kappa;
}
double p12(double vacancy_concentration) const
{
return _p12;
}
std::string description() const
{
std::stringstream ss;
ss << "No damage dependence, n = " << _n << ", kappa = " << _kappa << ", p12 = " << _p12;
return ss.str();
}
std::string name() const
{
return "undamaged";
}
unsigned int ParameterCount() const
{
return 0;
}
std::vector <Parameter> parameters() const
{
std::vector <Parameter> out;
return out;
}
void _set_parameters(const std::vector <double> & new_parameters)
{ }
UndamagedDiamondModel * clone() const
{
UndamagedDiamondModel * out = new UndamagedDiamondModel();
std::vector <Parameter> params_all = parameters();
std::vector <double> params_values;
for (unsigned int i = 0; i < ParameterCount(); i++)
{
params_values.push_back(params_all[i].value);
}
out->set_parameters(params_values);
return out;
}
};
#endif