409 std::unique_ptr<kubly::struktura>& bandsEc,
410 std::unique_ptr<kubly::struktura>& bandsEvhh,
411 std::unique_ptr<kubly::struktura>& bandsEvlh) {
413 if (!this->substrateMaterial)
throw ComputationError(this->getId(),
"no layer with role 'substrate' has been found");
415 for (
int i = 0; i < region.
size(); ++i) {
416 double e = (this->substrateMaterial->lattC(T,
'a') - region.
getLayerMaterial(i)->lattC(T,
'a')) /
418 if ((i == 0) || (i == region.
size() - 1))
e = 0.;
429 throw BadInput(this->getId(),
"Conduction QW depth negative for electrons, check CB values of active-region materials");
432 "Valence QW depth negative for both heavy holes and light holes, check VB values of "
433 "active-region materials");
436 bandsEc->gwiazdki.reserve(region.
QWs.size());
437 bandsEc->gwiazdki.assign(region.
QWs.begin(), region.
QWs.end());
440 bandsEvhh.reset(
Evhh);
441 bandsEvhh->gwiazdki.reserve(region.
QWs.size());
442 bandsEvhh->gwiazdki.assign(region.
QWs.begin(), region.
QWs.end());
445 bandsEvlh.reset(
Evlh);
446 bandsEvlh->gwiazdki.reserve(region.
QWs.size());
447 bandsEvlh->gwiazdki.assign(region.
QWs.begin(), region.
QWs.end());
958 if (solver->build_struct_once) {
959 if (!solver->region_levels[reg]) {
960 if (
isnan(solver->Tref))
961 throw ComputationError(solver->getId(),
"no reference temperature set for fast levels calculation");
962 solver->findEnergyLevels(solver->region_levels[reg], solver->regions[reg], solver->Tref);
964 levels = &solver->region_levels[reg];
966 this->levels.reset(
new Levels);
967 levels = this->levels.get();
968 solver->findEnergyLevels(*levels, solver->regions[reg], T);
970 gMod.reset(
new kubly::wzmocnienie(std::move(solver->getGainModule(wavelength, T,
n, solver->regions[reg], *levels))));
973 double E = nm_to_eV(wavelength);
974 double tau = solver->getLifeTime();
975 if (!
tau || solver->regions[reg].mod)
976 return Tensor2<double>(gMod->wzmocnienie_calk_bez_splotu(
E, 0.), gMod->wzmocnienie_calk_bez_splotu(
E, 1.));
979 return Tensor2<double>(gMod->wzmocnienie_calk_ze_splotem(
E, beta, 0.), gMod->wzmocnienie_calk_ze_splotem(
E, beta, 1.));
1002 if (solver->build_struct_once) {
1003 if (!solver->region_levels[reg]) {
1004 if (
isnan(solver->Tref))
1005 throw ComputationError(solver->getId(),
"no reference temperature set for fast levels calculation");
1006 solver->findEnergyLevels(solver->region_levels[reg], solver->regions[reg], solver->Tref);
1008 levels = &solver->region_levels[reg];
1010 this->levels.reset(
new Levels);
1011 levels = this->levels.get();
1012 solver->findEnergyLevels(*levels, solver->regions[reg], T);
1014 gMod.reset(
new kubly::wzmocnienie(std::move(solver->getGainModule(wavelength, T,
n, solver->regions[reg], *levels))));
1016 double QWfrac = solver->regions[reg].qwtotallen / solver->regions[reg].totallen;
1017 return sumLuminescence(*gMod, wavelength) /
QWfrac;