50 shared_ptr<StackContainer<2>>
layers;
66 size_t size()
const {
return layers->getChildrenCount(); }
71 if (
auto m = block->singleMaterial())
return m;
87 bool contains(
const Vec<2>& point)
const {
return getBoundingBox().contains(point); }
91 if (!contains(point))
return false;
92 assert(
layers->getChildForHeight(point.c1 - origin.c1));
93 return layers->getChildForHeight(point.c1 - origin.c1)->getChild()->hasRole(
"QW");
102 1e4 * (
layers->getBoundingBox().height() -
103 static_pointer_cast<GeometryObjectD<GeometryType::DIM>>(
layers->getChildNo(0))->getBoundingBox().height() -
104 static_pointer_cast<GeometryObjectD<GeometryType::DIM>>(
layers->getChildNo(
layers->getChildrenCount() - 1))
109 bool lastbarrier =
true;
110 for (
const auto& layer :
layers->children) {
113 if (!material)
throw plask::Exception(
"FermiNewGainSolver requires solid layers.");
120 qwtotallen += bbox.upper[1] - bbox.lower[1];
124 solver->writelog(
LOG_WARNING,
"Considering two adjacent quantum wells as one");
144 qwlen = qwtotallen / qwn;
152 boost::optional<ActiveRegionData>
mod;
164 bool explicitSubstrate =
false;
197 if (geometry == this->geometry_mod)
return;
199 disconnectModGeometry();
200 this->geometry_mod = geometry;
201 if (this->geometry_mod)
206 void disconnectModGeometry() {
207 if (this->geometry_mod)
212 friend struct DataBase<GeometryType, double>;
213 friend struct GainData<GeometryType>;
214 friend struct DgDnData<GeometryType>;
217 std::vector<Levels> region_levels;
234 void buildStructure(
double T,
236 std::unique_ptr<kubly::struktura>& bandsEc,
237 std::unique_ptr<kubly::struktura>& bandsEvhh,
238 std::unique_ptr<kubly::struktura>& bandsEvlh);
243 void showEnergyLevels(std::string str,
const std::unique_ptr<kubly::struktura>& structure,
double nQW);
250 virtual void onInitialize();
253 virtual void onInvalidate();
260 outGain.fireChanged();
261 outLuminescence.fireChanged();
267 std::list<ActiveRegionData> detectActiveRegions(
const shared_ptr<GeometryType>& geometry);
273 void prepareActiveRegionsInfo();
283 const shared_ptr<
const MeshD<2>>& dst_mesh,
298 if (strains != value) {
300 if (build_struct_once) this->invalidate();
305 shared_ptr<Material>
getSubstrate()
const {
return substrateMaterial; }
308 bool invalid = substrateMaterial != material;
309 substrateMaterial = material;
310 explicitSubstrate = bool(material);
311 if (invalid) this->invalidate();
316 if (adjust_widths != value) {
317 adjust_widths = value;
324 if (build_struct_once != value) {
325 build_struct_once = value;
332 if (roughness != value) {
334 if (build_struct_once) this->invalidate();
340 if (lifetime != value) {
348 if (matrixElem != value) {
350 if (build_struct_once) this->invalidate();
356 if (condQWshift != value) {
358 if (build_struct_once) this->invalidate();
364 if (valeQWshift != value) {
366 if (build_struct_once) this->invalidate();
374 if (build_struct_once) this->invalidate();