PLaSK library

Loading...
Searching...
No Matches
optical.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__OPTICAL_H
15#define PLASK__OPTICAL_H
16
17#include <plask/math.hpp>
18#include <plask/provider/providerfor.hpp>
19#include <plask/provider/scaled_provider.hpp>
20#include <plask/provider/combined_provider.hpp>
21
22 namespace plask {
23
27 struct PLASK_API RefractiveIndex: MultiFieldProperty<dcomplex, dcomplex> {
28 enum EnumType {
29 COMPONENT_VERT = 0,
30 COMPONENT_LONG = 1,
31 COMPONENT_TRAN = 2
32 };
33 static constexpr size_t NUM_VALS = 3;
34 static constexpr const char* NAME = "refractive index";
35 static constexpr const char* UNIT = "-";
36 static inline dcomplex getDefaultValue() { return dcomplex(1.); }
37};
38
42 struct PLASK_API Epsilon: FieldProperty<Tensor3<dcomplex>, dcomplex> {
43 static constexpr const char* NAME = "permittivity tensor";
44 static constexpr const char* UNIT = "-";
45 static inline Tensor3<dcomplex> getDefaultValue() { return Tensor3<dcomplex>(1.); }
46};
47
51 struct PLASK_API LightMagnitude: public FieldProperty<double> {
52 static constexpr const char* NAME = "optical field magnitude";
53 static constexpr const char* UNIT = "W/m²";
54};
55
56
60 struct PLASK_API LightE: public FieldProperty<Vec<3,dcomplex>> {
61 static constexpr const char* NAME = "electric field";
62 static constexpr const char* UNIT = "V/m";
63};
64
65
69 struct PLASK_API LightH: public FieldProperty<Vec<3,dcomplex>> {
70 static constexpr const char* NAME = "magnetic field";
71 static constexpr const char* UNIT = "A/m";
72};
73
74
80 struct PLASK_API ModeLightMagnitude: public MultiFieldProperty<double> {
81 static constexpr const char* NAME = "optical field magnitude";
82 static constexpr const char* UNIT = "W/m²";
83};
84
88 template <typename SpaceT>
89 struct LightMagnitudeSumProvider: public FieldSumProvider<ModeLightMagnitude, SpaceT> {};
90
91
97 struct PLASK_API ModeLightE: public MultiFieldProperty<Vec<3,dcomplex>> {
98 static constexpr const char* NAME = "electric field";
99 static constexpr const char* UNIT = "V/m";
100};
101
102
108 struct PLASK_API ModeLightH: public MultiFieldProperty<Vec<3,dcomplex>> {
109 static constexpr const char* NAME = "magnetic field";
110 static constexpr const char* UNIT = "A/m";
111};
112
113
122 struct PLASK_API ModeWavelength: public MultiValueProperty<double> {
123 static constexpr const char* NAME = "wavelength";
124 static constexpr const char* UNIT = "nm";
125};
126
132 struct PLASK_API ModeLoss: public MultiValueProperty<double> {
133 static constexpr const char* NAME = "modal extinction";
134 static constexpr const char* UNIT = "1/cm";
135};
136
144 struct PLASK_API ModePropagationConstant: public MultiValueProperty<dcomplex> {
145 static constexpr const char* NAME = "propagation constant";
146 static constexpr const char* UNIT = "1/µm";
147};
148
156 struct PLASK_API ModeEffectiveIndex: public MultiValueProperty<dcomplex> {
157 static constexpr const char* NAME = "effective index";
158 static constexpr const char* UNIT = "-";
159};
160
161} // namespace plask
162
163#endif // PLASK__OPTICAL_H