42 shared_ptr<RectangularMesh<2>>
mesh;
64 bool diagonalQE(
size_t l)
const override {
return diagonals[l]; }
66 size_t matrixSize()
const override;
68 void prepareField()
override;
70 void cleanupField()
override;
73 const shared_ptr<const typename LevelsAdapter::Level>& level,
78 const shared_ptr<const typename LevelsAdapter::Level>& level,
81 double integratePoyntingVert(
const cvector& E,
const cvector& H)
override;
84 const std::function<std::pair<dcomplex,dcomplex>(
size_t,
size_t)>& vertical)
override;
87 inline std::pair<double,double> getTC(
size_t layer,
size_t ri) {
88 double T = 0., W = 0., C = 0.;
89 for (
size_t k = 0, v = ri * solver->verts->size(); k != mesh->vert()->size(); ++v, ++k) {
90 if (solver->stack[k] == layer) {
91 double w = (k == 0 || k == mesh->vert()->size() - 1) ? 1
e-6 : solver->vbounds->at(k) - solver->vbounds->at(k - 1);
92 T += w * temperature[v];
99 return std::make_pair(T, C);
148 void beforeLayersIntegrals(dcomplex lam, dcomplex glam)
override;
150 Tensor3<dcomplex> getEps(
size_t layer,
size_t ri,
double r,
double matz,
double lam,
double glam);
152 void layerIntegrals(
size_t layer,
double lam,
double glam)
override;
155 const dcomplex* datap,
const dcomplex* datar,
const dcomplex* dataz,
156 dcomplex datap0, dcomplex datar0, dcomplex dataz0) = 0;
164 void beforeGetEpsilon()
override;
166 void afterGetEpsilon()
override;
168 unsigned getM()
const {
return m; }
171 write_debug(
"{0}: m changed from {1} to {2}", solver->getId(), m,
n);
173 solver->recompute_integrals =
true;
174 solver->clearFields();
179 size_t idxs(
size_t i) {
return 2 * i; }
182 size_t idxp(
size_t i) {
return 2 * i + 1; }
194 std::vector<double> res;
195 res.reserve(kpts.size());
196 double ib = 1. / rbounds[rbounds.
size()-1];
197 for (
double k: kpts) res.push_back(k * ib);