hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
propagating_mode.hpp
Go to the documentation of this file.
1#pragma once
16
17#include <vector>
18
19#include "hpfem/core/types.hpp"
22#include "hpfem/mesh/mesh.hpp"
24
25namespace hpfem::physics {
26
42
51
53template <int Dim = 2>
55 static_assert(Dim == 2, "waveguide cross-sections are two-dimensional");
56
57 public:
61 const fespace::DofMap<2>& longitudinal, WaveguideSetup setup);
62
63 [[nodiscard]] Real wavenumber() const noexcept { return k0_; }
64 [[nodiscard]] Real max_index() const noexcept { return max_index_; }
68 [[nodiscard]] std::vector<WaveguideMode> solve() const;
69
70 private:
71 const fespace::NedelecDofMap<2>* transverse_;
72 const fespace::DofMap<2>* longitudinal_;
73 WaveguideSetup setup_;
74 Real k0_ = 0;
75 Real max_index_ = 0;
76};
77
78extern template class PropagatingMode<2>;
79
80} // namespace hpfem::physics
Definition dof_map.hpp:51
Definition material.hpp:149
Assembles and solves the mode problem on a cross-section mesh.
Definition propagating_mode.hpp:54
std::vector< WaveguideMode > solve() const
Real wavenumber() const noexcept
Definition propagating_mode.hpp:63
Real max_index() const noexcept
Definition propagating_mode.hpp:64
PropagatingMode(const fespace::NedelecDofMap< 2 > &transverse, const fespace::DofMap< 2 > &longitudinal, WaveguideSetup setup)
Definition absorption.hpp:21
DirectSolverBackend
Direct solver backends.
Definition linear_solver.hpp:70
double Real
Definition types.hpp:15
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17
Eigen::Matrix< Complex, Eigen::Dynamic, 1 > Vector
Definition types.hpp:20
Definition propagating_mode.hpp:45
Vector longitudinal
E_z coefficients (full size)
Definition propagating_mode.hpp:49
Real effective_index
β / k0
Definition propagating_mode.hpp:47
Real beta
propagation constant [1/m]
Definition propagating_mode.hpp:46
Vector transverse
E_t coefficients (full size, zero on PEC DoFs)
Definition propagating_mode.hpp:48
Definition propagating_mode.hpp:27
std::vector< mesh::Tag > pec_tags
facets with n × E = 0 (E_t tangential and E_z)
Definition propagating_mode.hpp:30
Index krylov_dimension
0: 2 num_modes + 10
Definition propagating_mode.hpp:35
Index num_modes
Definition propagating_mode.hpp:31
solvers::DirectSolverBackend solver
Definition propagating_mode.hpp:40
materials::MaterialMap materials
lossless, by cell tag
Definition propagating_mode.hpp:29
Real max_index
Definition propagating_mode.hpp:34
Real tolerance
Definition propagating_mode.hpp:36
Real omega
angular frequency [rad/s]
Definition propagating_mode.hpp:28
int max_iterations
Definition propagating_mode.hpp:37