PLaSK library
Loading...
Searching...
No Matches
freecarrier3d.hpp
Go to the documentation of this file.
1/*
2 * This file is part of PLaSK (https://plask.app) by Photonics Group at TUL
3 * Copyright (c) 2022 Lodz University of Technology
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#ifndef PLASK__SOLVER__GAIN_FREECARRIER_FREECARRIER3D_HPP
15#define PLASK__SOLVER__GAIN_FREECARRIER_FREECARRIER3D_HPP
16
17#include "freecarrier.hpp"
18
19namespace plask { namespace gain { namespace freecarrier {
20
24struct PLASK_SOLVER_API FreeCarrierGainSolver3D : public FreeCarrierGainSolver<SolverOver<Geometry3D>> {
25 using typename FreeCarrierGainSolver<SolverOver<Geometry3D>>::ActiveRegionInfo;
26 using typename FreeCarrierGainSolver<SolverOver<Geometry3D>>::ActiveRegionParams;
27 using typename FreeCarrierGainSolver<SolverOver<Geometry3D>>::GeometryType;
28 using typename FreeCarrierGainSolver<SolverOver<Geometry3D>>::GainSpectrumType;
29
30 FreeCarrierGainSolver3D(const std::string& name = "");
31
32 std::string getClassName() const override;
33
34 private:
35 struct Region {
36 size_t bottom, top, lon, tra;
37 std::vector<bool> isQW;
38 std::vector<shared_ptr<Material>> materials;
39 Region() {}
40 Region(size_t b,
41 size_t t,
42 size_t x,
43 size_t y,
44 const std::vector<bool>& isQW,
45 const std::vector<shared_ptr<Material>>& materials)
46 : bottom(b),
47 top(t),
48 lon(x),
49 tra(y),
50 isQW(isQW),
51 materials(materials.begin() + bottom - 1, materials.begin() + top + 1) {}
52 };
53
54 protected:
55 void detectActiveRegions() override;
56
57 template <typename DT> struct DataBase;
58 struct ComputedData;
59 struct GainData;
60 struct DgdnData;
61 struct EnergyLevelsData;
62
65
66 friend struct ActiveRegionMesh;
67
68 const LazyData<Tensor2<double>> getGainData(Gain::EnumType what,
69 const shared_ptr<const MeshD<3>>& dst_mesh,
70 double wavelength,
71 InterpolationMethod interp = INTERPOLATION_DEFAULT) override;
72
73 const LazyData<std::vector<double>> getEnergyLevels(EnergyLevels::EnumType which,
74 const shared_ptr<const MeshD<3>>& dst_mesh,
75 InterpolationMethod interp = INTERPOLATION_DEFAULT) override;
76};
77
78}}} // namespace plask::gain::freecarrier
79
80#endif // PLASK__SOLVER__GAIN_FREECARRIER_FREECARRIER3D_HPP