40 std::vector < std::pair<shared_ptr<Material>,
double> >
materials;
45 template<
typename ...Args>
53 void normalizeWeights();
65 std::string name()
const override;
67 Kind kind()
const override;
69 double lattC(
double T,
char x)
const override;
71 double Eg(
double T,
double e=0.,
char point=
'*')
const override;
73 double CB(
double T,
double e=0.,
char point=
'*')
const override;
75 double VB(
double T,
double e=0.,
char point=
'*',
char hole=
'H')
const override;
77 double Dso(
double T,
double e=0.)
const override;
79 double Mso(
double T,
double e=0.)
const override;
89 double ac(
double T)
const override;
91 double av(
double T)
const override;
93 double b(
double T)
const override;
95 double d(
double T)
const override;
97 double c11(
double T)
const override;
99 double c12(
double T)
const override;
101 double c44(
double T)
const override;
103 double eps(
double T)
const override;
105 double chi(
double T,
double e=0.,
char point=
'*')
const override;
107 double Ni(
double T=0.)
const override;
109 double Nf(
double T=0.)
const override;
111 double EactD(
double T)
const override;
113 double EactA(
double T)
const override;
119 ConductivityType condtype()
const override;
121 double A(
double T)
const override;
123 double B(
double T)
const override;
125 double C(
double T)
const override;
127 double D(
double T)
const override;
131 double dens(
double T)
const override;
133 double cp(
double T)
const override;
135 double nr(
double lam,
double T,
double n = 0.0)
const override;
137 double absp(
double lam,
double T)
const override;
139 dcomplex Nr(
double lam,
double T,
double n = 0.0)
const override;
147 double taue(
double T)
const override;
149 double tauh(
double T)
const override;
151 double Ce(
double T)
const override;
153 double Ch(
double T)
const override;
155 double e13(
double T)
const override;
157 double e15(
double T)
const override;
159 double e33(
double T)
const override;
161 double c13(
double T)
const override;
163 double c33(
double T)
const override;
165 double Psp(
double T)
const override;
167 double Na()
const override;
169 double Nd()
const override;
179 template <
typename Functor>
180 auto avg(
Functor f)
const ->
typename std::remove_cv<
decltype(f(*((
const Material*)0)))>::type {
181 typename std::remove_cv<
decltype(f(*((
const Material*)0)))>::type
w_sum = 0.;
182 for (
auto& p: materials) {
183 w_sum += std::get<1>(p) * f(*std::get<0>(p));
194 template <
typename Functor>
195 auto avg_pairs(
Functor f)
const -> Tensor2<double> {
196 Tensor2<double>
w_sum(0., 0.);
197 for (
auto& p: materials) {
198 Tensor2<double> m = f(*std::get<0>(p));
199 w_sum.c00 += std::get<1>(p) * m.c00;
200 w_sum.c11 += std::get<1>(p) * m.c11;