9#include <deal.II/base/numbers.h>
18std::pair<Tensor<1, dim, std::complex<double>>,
19 Tensor<1, dim, std::complex<double>>>
23 const Tensor<1, dim> &normal,
24 const std::complex<double> &effective_electric_permittivity,
25 const std::complex<double> &effective_magnetic_permeability,
26 const unsigned int waveguide_port_index)
32 if constexpr (dim != 3)
34 (void)time_harmonic_maxwell_parameters;
37 (void)effective_electric_permittivity;
38 (void)effective_magnetic_permeability;
39 (void)waveguide_port_index;
40 AssertThrow(
false, TimeHarmonicMaxwellDimensionNotSupported(dim));
41 return std::pair<Tensor<1, dim, std::complex<double>>,
42 Tensor<1, dim, std::complex<double>>>();
45 static constexpr std::complex<double> imag{0., 1.};
46 static constexpr double PI = numbers::PI;
51 const auto &waveguide_corners =
54 time_harmonic_maxwell_parameters.
waveguide_mode[waveguide_port_index];
56 time_harmonic_maxwell_parameters.
mode_order_m[waveguide_port_index];
58 time_harmonic_maxwell_parameters.
mode_order_n[waveguide_port_index];
62 Tensor<1, dim> transverse_vector_1 =
63 waveguide_corners[1] - waveguide_corners[0];
64 Tensor<1, dim> transverse_vector_2 =
65 waveguide_corners[2] - waveguide_corners[0];
66 double length_t1 = transverse_vector_1.norm();
67 double length_t2 = transverse_vector_2.norm();
68 Tensor<1, dim> e_t1 = transverse_vector_1 / length_t1;
69 Tensor<1, dim> e_t2 = transverse_vector_2 / length_t2;
74 std::abs(e_t1 * e_t2) < 1e-12,
76 "The transverse plane defined by the waveguide corners for the waveguide port at boundary ID " +
77 std::to_string(time_harmonic_maxwell_parameters
78 .waveguide_boundary_ids[waveguide_port_index]) +
79 " is not a perfect rectangle (i.e., the vector created by the waveguide corners are not orthogonal). Please check the waveguide corners definition in the input prm file."));
84 if ((std::abs(normal * e_t1) > 1e-12) || (std::abs(normal * e_t2) > 1e-12))
88 "The transverse plane defined by the waveguide corners for the waveguide port at boundary ID " +
89 std::to_string(time_harmonic_maxwell_parameters
90 .waveguide_boundary_ids[waveguide_port_index]) +
91 " is not orthogonal to the boundary face normal. Please check the waveguide corners definition in the input prm file."));
94 Tensor<1, dim> e_t3 = cross_product_3d(e_t1, e_t2);
106 if ((normal * e_t3) > 0)
108 std::swap(e_t1, e_t2);
109 std::swap(length_t1, length_t2);
112 cross_product_3d(e_t1, e_t2);
117 double k_t1 = m * PI / length_t1;
118 double k_t2 = n * PI / length_t2;
119 double k_c = std::sqrt(k_t1 * k_t1 + k_t2 * k_t2);
120 std::complex<double> k =
122 std::sqrt(effective_electric_permittivity *
123 effective_magnetic_permeability);
124 std::complex<double> k_l = std::sqrt(
125 k * k - std::complex<double>(k_c * k_c, 0));
131 std::norm(k) > (k_c * k_c),
132 ExcMessage(
"The chosen mode for the waveguide port at boundary ID " +
133 std::to_string(time_harmonic_maxwell_parameters
134 .waveguide_boundary_ids[waveguide_port_index]) +
135 " is evanescent at the given frequency. Please "
136 "choose another mode or increase the frequency."));
142 Tensor<1, dim> origin_local =
143 0.25 * (waveguide_corners[0] + waveguide_corners[1] + waveguide_corners[2] +
144 waveguide_corners[3]);
146 Tensor<1, dim> p_local =
149 const double x_local =
151 const double y_local =
158 Tensor<1, dim, std::complex<double>> E_inc_local;
159 Tensor<1, dim, std::complex<double>> H_inc_local;
163 const double sin_k_t1_x = std::sin(k_t1 * (x_local + 0.5 * length_t1));
164 const double cos_k_t1_x = std::cos(k_t1 * (x_local + 0.5 * length_t1));
165 const double sin_k_t2_y = std::sin(k_t2 * (y_local + 0.5 * length_t2));
166 const double cos_k_t2_y = std::cos(k_t2 * (y_local + 0.5 * length_t2));
170 std::complex<double> factor =
171 imag * omega * effective_magnetic_permeability / (k_c * k_c);
173 E_inc_local[0] = -factor * k_t2 * cos_k_t1_x * sin_k_t2_y;
174 E_inc_local[1] = factor * k_t1 * sin_k_t1_x * cos_k_t2_y;
175 E_inc_local[2] = 0.0;
178 -imag * k_l * k_t1 / (k_c * k_c) * sin_k_t1_x * cos_k_t2_y;
180 -imag * k_l * k_t2 / (k_c * k_c) * cos_k_t1_x * sin_k_t2_y;
181 H_inc_local[2] = cos_k_t1_x * cos_k_t2_y;
185 std::complex<double> factor =
186 imag * omega * effective_electric_permittivity / (k_c * k_c);
188 H_inc_local[0] = -factor * k_t2 * sin_k_t1_x * cos_k_t2_y;
189 H_inc_local[1] = factor * k_t1 * cos_k_t1_x * sin_k_t2_y;
190 H_inc_local[2] = 0.0;
193 imag * k_l * k_t1 / (k_c * k_c) * cos_k_t1_x * sin_k_t2_y;
195 imag * k_l * k_t2 / (k_c * k_c) * sin_k_t1_x * cos_k_t2_y;
196 E_inc_local[2] = sin_k_t1_x * sin_k_t2_y;
200 AssertThrow(
false, ExcMessage(
"Unknown waveguide mode type."));
205 const Tensor<1, dim, std::complex<double>> E_inc =
206 E_inc_local[0] * e_t1 + E_inc_local[1] * e_t2 + E_inc_local[2] * e_t3;
207 const Tensor<1, dim, std::complex<double>> H_inc =
208 H_inc_local[0] * e_t1 + H_inc_local[1] * e_t2 + H_inc_local[2] * e_t3;
210 return std::make_pair(E_inc, H_inc);
217 const types::boundary_id boundary_id)
221 const std::vector<int> &waveguide_boundary_ids =
223 const unsigned int waveguide_port_index =
static_cast<unsigned int>(
224 std::distance(waveguide_boundary_ids.begin(),
225 std::ranges::find(waveguide_boundary_ids,
226 static_cast<int>(boundary_id))));
228 return waveguide_port_index;
257 add_complex_block(LAPACKFullMatrix<double> &matrix,
258 const unsigned int row_real,
259 const unsigned int row_imag,
260 const unsigned int column_real,
261 const unsigned int column_imag,
262 const std::complex<double> &z)
264 matrix(row_real, column_real) += z.real();
265 matrix(row_real, column_imag) -= z.imag();
266 matrix(row_imag, column_real) += z.imag();
267 matrix(row_imag, column_imag) += z.real();
292 add_real_block(LAPACKFullMatrix<double> &matrix,
293 const unsigned int row_real,
294 const unsigned int row_imag,
295 const unsigned int column_real,
296 const unsigned int column_imag,
299 matrix(row_real, column_real) += z;
300 matrix(row_imag, column_imag) += z;
318 const unsigned int n_q_points = scratch_data.
n_q_points;
320 const unsigned int n_base_functions_trial_interior =
326 const std::vector<unsigned int> &test_dofs_F_real =
328 const std::vector<unsigned int> &test_dofs_F_imag =
330 const std::vector<unsigned int> &test_dofs_I_real =
332 const std::vector<unsigned int> &test_dofs_I_imag =
334 const std::vector<unsigned int> &trial_dofs_E_real =
336 const std::vector<unsigned int> &trial_dofs_E_imag =
338 const std::vector<unsigned int> &trial_dofs_H_real =
340 const std::vector<unsigned int> &trial_dofs_H_imag =
347 const std::vector<double> &JxW = scratch_data.
JxW;
348 const std::vector<double> &JxW_FF_container = scratch_data.
JxW_FF_container;
349 const std::vector<double> &JxW_II_container = scratch_data.
JxW_II_container;
350 const std::vector<std::complex<double>> &iweps_JxW_container =
352 const std::vector<std::complex<double>> &iwmu_JxW_container =
355 LAPACKFullMatrix<double> &G_matrix = copy_data.
G_matrix;
356 LAPACKFullMatrix<double> &B_matrix = copy_data.
B_matrix;
366 for (
unsigned int i = 0; i < n_base_functions_test; ++i)
368 const auto phi_i = scratch_data.
phi_test[i];
371 for (
unsigned int j = i; j < n_base_functions_test; ++j)
373 const auto phi_j = scratch_data.
phi_test[j];
378 std::complex<double> z_FI_ij(0.);
379 std::complex<double> z_FI_ji(0.);
380 for (
unsigned int q = 0; q < n_q_points; ++q)
383 const double phi_i_phi_j = phi_i[q] * phi_j[q];
384 const double curl_i_curl_j = curl_phi_i[q] * curl_phi_j[q];
385 const double phi_i_curl_j = phi_i[q] * curl_phi_j[q];
386 const double curl_i_phi_j = curl_phi_i[q] * phi_j[q];
389 JxW_FF_container[q] * phi_i_phi_j + JxW[q] * curl_i_curl_j;
391 JxW_II_container[q] * phi_i_phi_j + JxW[q] * curl_i_curl_j;
392 z_FI_ij += iweps_JxW_container[q] * phi_i_curl_j -
393 std::conj(iwmu_JxW_container[q]) * curl_i_phi_j;
394 z_FI_ji += iweps_JxW_container[q] * curl_i_phi_j -
395 std::conj(iwmu_JxW_container[q]) * phi_i_curl_j;
399 add_real_block(G_matrix,
405 add_real_block(G_matrix,
411 add_complex_block(G_matrix,
417 add_complex_block(G_matrix,
428 add_real_block(G_matrix,
434 add_real_block(G_matrix,
440 add_complex_block(G_matrix,
446 add_complex_block(G_matrix,
461 for (
unsigned int i = 0; i < n_base_functions_test; ++i)
463 const auto phi_i = scratch_data.
phi_test[i];
466 for (
unsigned int j = 0; j < n_base_functions_trial_interior; ++j)
470 std::complex<double> z_FE(0.);
472 std::complex<double> z_IH(0.);
473 for (
unsigned int q = 0; q < n_q_points; ++q)
475 const double phi_i_phi_j = phi_i[q] * phi_j[q];
476 const double curl_i_phi_j = curl_phi_i[q] * phi_j[q];
478 z_FE += iweps_JxW_container[q] * phi_i_phi_j;
479 z_FH += JxW[q] * curl_i_phi_j;
480 z_IH -= iwmu_JxW_container[q] * phi_i_phi_j;
483 add_complex_block(B_matrix,
486 trial_dofs_E_real[j],
487 trial_dofs_E_imag[j],
489 add_real_block(B_matrix,
492 trial_dofs_H_real[j],
493 trial_dofs_H_imag[j],
497 add_real_block(B_matrix,
500 trial_dofs_E_real[j],
501 trial_dofs_E_imag[j],
503 add_complex_block(B_matrix,
506 trial_dofs_H_real[j],
507 trial_dofs_H_imag[j],
521 Vector<double> &l_vector = copy_data.
l_vector;
529 for (
unsigned int q = 0; q < scratch_data.
n_q_points; ++q)
533 l_vector[scratch_data
535 l_vector[scratch_data
559 const std::vector<unsigned int> &test_dofs_F_real =
561 const std::vector<unsigned int> &test_dofs_F_imag =
563 const std::vector<unsigned int> &test_dofs_I_real =
565 const std::vector<unsigned int> &test_dofs_I_imag =
567 const std::vector<unsigned int> &trial_dofs_E_hat_real =
569 const std::vector<unsigned int> &trial_dofs_E_hat_imag =
571 const std::vector<unsigned int> &trial_dofs_H_hat_real =
573 const std::vector<unsigned int> &trial_dofs_H_hat_imag =
576 const std::vector<double> &face_JxW = scratch_data.
face_JxW;
578 LAPACKFullMatrix<double> &B_hat_matrix = copy_data.
B_hat_matrix;
588 for (
const unsigned int i :
593 for (
const unsigned int j :
595 .trial_skeleton_tangential_base_functions[scratch_data.
face_no])
597 const auto n_cross_phi_j =
602 z_IE += face_JxW[q] * (phi_i[q] * n_cross_phi_j[q]);
604 add_real_block(B_hat_matrix,
607 trial_dofs_E_hat_real[j],
608 trial_dofs_E_hat_imag[j],
616 add_real_block(B_hat_matrix,
619 trial_dofs_H_hat_real[j],
620 trial_dofs_H_hat_imag[j],
638 const std::vector<double> &waveguide_ports_electric_amplitudes)
651 const double max_port_electric_amplitude =
654 amplitude /= max_port_electric_amplitude;
658std::pair<Tensor<1, dim, std::complex<double>>, std::complex<double>>
661 const Tensor<1, dim> &normal,
662 const std::complex<double> &effective_electric_permittivity,
663 const std::complex<double> &effective_magnetic_permeability,
664 const unsigned int waveguide_port_index)
const
670 if constexpr (dim != 3)
674 (void)effective_electric_permittivity;
675 (void)effective_magnetic_permeability;
676 (void)waveguide_port_index;
677 AssertThrow(
false, TimeHarmonicMaxwellDimensionNotSupported(dim));
678 return std::pair<Tensor<1, dim, std::complex<double>>,
679 std::complex<double>>();
682 static constexpr double PI = numbers::PI;
683 const auto incident_fields =
687 effective_electric_permittivity,
688 effective_magnetic_permeability,
689 waveguide_port_index);
694 const auto &waveguide_corners =
703 const double k_t1 = m * PI /
704 (waveguide_corners[1] - waveguide_corners[0])
706 const double k_t2 = n * PI /
707 (waveguide_corners[2] - waveguide_corners[0])
709 const std::complex<double> k_l =
710 std::sqrt(omega * omega * effective_electric_permittivity *
711 effective_magnetic_permeability -
712 (k_t1 * k_t1 + k_t2 * k_t2));
714 std::complex<double> surface_admittance =
716 k_l / (omega * effective_magnetic_permeability) :
717 omega * effective_electric_permittivity / k_l;
719 const Tensor<1, dim, std::complex<double>> &E_inc = incident_fields.first;
720 const Tensor<1, dim, std::complex<double>> &H_inc = incident_fields.second;
722 const Tensor<1, dim, std::complex<double>> excitation =
724 (cross_product_3d(normal, H_inc) +
727 return std::make_pair(excitation, surface_admittance);
731std::pair<Tensor<1, dim, std::complex<double>>, std::complex<double>>
734 const unsigned int q,
736 const unsigned int waveguide_port_index)
const
738 static constexpr std::complex<double> imag{0., 1.};
740 Tensor<1, dim, std::complex<double>> g_inc;
741 std::complex<double> boundary_surface_admittance;
749 boundary_surface_admittance =
757 boundary_surface_admittance =
765 if constexpr (dim == 3)
783 AssertThrow(
false, TimeHarmonicMaxwellDimensionNotSupported(dim));
788 std::tie(g_inc, boundary_surface_admittance) =
794 waveguide_port_index);
797 return std::make_pair(g_inc, boundary_surface_admittance);
814 const unsigned int waveguide_port_index =
826 const std::vector<unsigned int> &test_tangential_base_functions =
828 const unsigned int n_test_tangential_base_functions =
829 test_tangential_base_functions.size();
834 const std::vector<unsigned int> &test_dofs_F_real =
836 const std::vector<unsigned int> &test_dofs_F_imag =
838 const std::vector<unsigned int> &test_dofs_I_real =
840 const std::vector<unsigned int> &test_dofs_I_imag =
842 const std::vector<unsigned int> &trial_dofs_E_hat_real =
844 const std::vector<unsigned int> &trial_dofs_E_hat_imag =
847 const std::vector<double> &face_JxW = scratch_data.
face_JxW;
849 LAPACKFullMatrix<double> &G_matrix = copy_data.
G_matrix;
850 LAPACKFullMatrix<double> &B_hat_matrix = copy_data.
B_hat_matrix;
855 std::vector<double> YY_JxW_container(n_face_q_points);
856 std::vector<std::complex<double>> Y_JxW_container(n_face_q_points);
857 for (
unsigned int q = 0; q < n_face_q_points; ++q)
859 const std::complex<double> boundary_surface_admittance =
863 waveguide_port_index)
865 YY_JxW_container[q] =
866 std::norm(boundary_surface_admittance) * face_JxW[q];
867 Y_JxW_container[q] = boundary_surface_admittance * face_JxW[q];
884 for (
unsigned int position_i = 0;
885 position_i < n_test_tangential_base_functions;
888 const unsigned int i = test_tangential_base_functions[position_i];
892 for (
unsigned int position_j = position_i;
893 position_j < n_test_tangential_base_functions;
896 const unsigned int j = test_tangential_base_functions[position_j];
902 std::complex<double> z_FI_ij(0.);
903 std::complex<double> z_FI_ji(0.);
904 for (
unsigned int q = 0; q < n_face_q_points; ++q)
908 const double n_cross_i_n_cross_j =
909 n_cross_phi_i[q] * n_cross_phi_j[q];
911 z_FF += YY_JxW_container[q] * n_cross_i_n_cross_j;
912 z_II += face_JxW[q] * n_cross_i_n_cross_j;
913 z_FI_ij += Y_JxW_container[q] * (phi_i[q] * n_cross_phi_j[q]);
914 z_FI_ji += Y_JxW_container[q] * (phi_j[q] * n_cross_phi_i[q]);
918 add_real_block(G_matrix,
924 add_real_block(G_matrix,
930 add_complex_block(G_matrix,
936 add_complex_block(G_matrix,
947 add_real_block(G_matrix,
953 add_real_block(G_matrix,
959 add_complex_block(G_matrix,
965 add_complex_block(G_matrix,
981 for (
const unsigned int i : test_tangential_base_functions)
985 for (
const unsigned int j :
987 .trial_skeleton_tangential_base_functions[scratch_data.
face_no])
989 const auto tangential_phi_j =
992 std::complex<double> z_FE(0.);
993 for (
unsigned int q = 0; q < n_face_q_points; ++q)
994 z_FE -= Y_JxW_container[q] * (phi_i[q] * tangential_phi_j[q]);
996 add_complex_block(B_hat_matrix,
999 trial_dofs_E_hat_real[j],
1000 trial_dofs_E_hat_imag[j],
1020 const unsigned int waveguide_port_index =
1033 const std::vector<unsigned int> &test_dofs_F_real =
1035 const std::vector<unsigned int> &test_dofs_F_imag =
1038 Vector<double> &l_vector = copy_data.
l_vector;
1046 std::vector<Tensor<1, dim, std::complex<double>>> g_inc_JxW_container(
1048 for (
unsigned int q = 0; q < n_face_q_points; ++q)
1049 g_inc_JxW_container[q] =
1051 scratch_data, q, bc_type, waveguide_port_index)
1060 for (
const unsigned int i :
1065 std::complex<double> w(0.);
1066 for (
unsigned int q = 0; q < n_face_q_points; ++q)
1067 w += g_inc_JxW_container[q] * phi_i[q];
1069 l_vector[test_dofs_F_real[i]] -= w.real();
1070 l_vector[test_dofs_F_imag[i]] -= w.imag();
1075template std::pair<Tensor<1, 2, std::complex<double>>,
1076 Tensor<1, 2, std::complex<double>>>
1080 const Tensor<1, 2> &normal,
1081 const std::complex<double> &effective_electric_permittivity,
1082 const std::complex<double> &effective_magnetic_permeability,
1083 const unsigned int waveguide_port_index);
1084template std::pair<Tensor<1, 3, std::complex<double>>,
1085 Tensor<1, 3, std::complex<double>>>
1089 const Tensor<1, 3> &normal,
1090 const std::complex<double> &effective_electric_permittivity,
1091 const std::complex<double> &effective_magnetic_permeability,
1092 const unsigned int waveguide_port_index);
1094template unsigned int
1097 const types::boundary_id boundary_id);
1098template unsigned int
1101 const types::boundary_id boundary_id);
This class manages the boundary conditions for Time Harmonic Maxwell solver. It introduces the bounda...
Class responsible for storing the local system of an ultraweak Discontinuous Petrov-Galerkin (DPG) di...
Vector< double > l_vector
LAPACKFullMatrix< double > B_hat_matrix
LAPACKFullMatrix< double > G_matrix
LAPACKFullMatrix< double > B_matrix
Class that assembles the cell terms of the ultraweak DPG formulation of the time-harmonic Maxwell equ...
void assemble_matrix(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, DPGCopyData ©_data) override
Assemble the Gram matrix and the interior bilinear form.
void assemble_rhs(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, DPGCopyData ©_data) override
Assemble the interior load vector, which is zero since no volume source term is considered at the mom...
TimeHarmonicMaxwellAssemblerCore(const Parameters::TimeHarmonicMaxwell< dim > &time_harmonic_maxwell_parameters)
Constructor.
Class that assembles the Robin boundary conditions of the time-harmonic Maxwell equations (silver_mul...
void assemble_rhs(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, DPGCopyData ©_data) override
Assemble the excitation of the Robin boundary conditions in the load vector.
std::pair< Tensor< 1, dim, std::complex< double > >, std::complex< double > > compute_waveguide_port_excitation(const Point< dim > &p, const Tensor< 1, dim > &normal, const std::complex< double > &effective_electric_permittivity, const std::complex< double > &effective_magnetic_permeability, const unsigned int waveguide_port_index) const
Compute the excitation and the surface admittance of the Robin boundary condition of a rectangular wa...
std::vector< double > waveguide_ports_relative_amplitudes
TimeHarmonicMaxwellAssemblerRobinBC(const Parameters::TimeHarmonicMaxwell< dim > &time_harmonic_maxwell_parameters, const BoundaryConditions::TimeHarmonicMaxwellBoundaryConditions< dim > &boundary_conditions, const std::vector< double > &waveguide_ports_electric_amplitudes)
Constructor.
void assemble_matrix(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, DPGCopyData ©_data) override
Assemble the Robin boundary terms of the Gram matrix and of the skeleton bilinear form.
const Parameters::TimeHarmonicMaxwell< dim > & time_harmonic_maxwell_parameters
const BoundaryConditions::TimeHarmonicMaxwellBoundaryConditions< dim > & boundary_conditions
std::pair< Tensor< 1, dim, std::complex< double > >, std::complex< double > > compute_robin_boundary_data(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, const unsigned int q, const BoundaryConditions::TimeHarmonicMaxwellBoundaryType bc_type, const unsigned int waveguide_port_index) const
Compute the excitation and the surface admittance of the Robin boundary condition at a quadrature poi...
Class that assembles the skeleton terms of the ultraweak DPG formulation of the time-harmonic Maxwell...
void assemble_matrix(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, DPGCopyData ©_data) override
Assemble the skeleton terms of the bilinear form.
void assemble_rhs(const TimeHarmonicMaxwellScratchData< dim > &scratch_data, DPGCopyData ©_data) override
There is no skeleton term in the load vector, since the boundary data is imposed through the constrai...
const BoundaryConditions::TimeHarmonicMaxwellBoundaryConditions< dim > & boundary_conditions
Class that stores the information required by the assembly of the Discontinuous Petrov-Galerkin (DPG)...
unsigned int n_base_functions_trial_interior
Table< 2, Tensor< 1, dim > > phi_test_face
types::boundary_id face_boundary_id
unsigned int n_base_functions_test
std::vector< std::complex< double > > face_effective_electric_permittivities
std::vector< double > JxW
Table< 2, Tensor< 1, dim > > n_cross_phi_test_face
std::vector< Point< dim > > face_quadrature_points
Table< 2, Tensor< 1, dim > > tangential_phi_trial_skeleton
std::array< std::vector< unsigned int >, n_electromagnetic_fields > trial_skeleton_local_dof_index_map
std::vector< Tensor< 1, dim > > face_normals
Table< 2, Tensor< 1, dim > > n_cross_tangential_phi_trial_skeleton
std::array< std::vector< unsigned int >, n_electromagnetic_fields > trial_interior_local_dof_index_map
unsigned int n_face_q_points
Table< 2, Tensor< 1, dim > > phi_trial_interior
std::vector< std::complex< double > > iwmu_JxW_container
std::vector< double > JxW_II_container
std::array< std::vector< unsigned int >, n_electromagnetic_fields > test_local_dof_index_map
Table< 2, Tensor< 1, dim > > curl_phi_test
std::vector< std::complex< double > > face_effective_magnetic_permeabilities
std::vector< double > face_JxW
std::vector< std::complex< double > > iweps_JxW_container
std::vector< std::vector< unsigned int > > test_tangential_base_functions
Table< 2, Tensor< 1, dim > > phi_test
std::vector< double > JxW_FF_container
TimeHarmonicMaxwellBoundaryType
Boundary condition types of the time-harmonic Maxwell equations.
WaveguideMode
Types of waveguide port modes:
@ TE
Transverse Electric mode.
@ TM
Transverse Magnetic mode.
TimeHarmonicMaxwell - Defines the parameters for time-harmonic Maxwell simulations.
std::vector< unsigned int > mode_order_n
double electromagnetic_frequency
std::vector< std::array< Tensor< 1, dim >, Utilities::fixed_power< 2 >(dim - 1)> > waveguide_corners
std::vector< int > waveguide_boundary_ids
std::vector< Parameters::WaveguideMode > waveguide_mode
std::vector< unsigned int > mode_order_m
DEAL_II_ALWAYS_INLINE Tensor< 1, dim, Number > tangential_component(const Tensor< 1, dim, Number > &tensor, const Tensor< 1, dim > &normal)
Compute the tangential component of a vector on a surface defined by its unit normal vector,...
std::pair< Tensor< 1, dim, std::complex< double > >, Tensor< 1, dim, std::complex< double > > > compute_waveguide_port_incident_fields(const Parameters::TimeHarmonicMaxwell< dim > &time_harmonic_maxwell_parameters, const Point< dim > &p, const Tensor< 1, dim > &normal, const std::complex< double > &effective_electric_permittivity, const std::complex< double > &effective_magnetic_permeability, const unsigned int waveguide_port_index)
Compute the incident electromagnetic fields of a rectangular waveguide port from the input parameters...
template unsigned int get_waveguide_port_index< 2 >(const Parameters::TimeHarmonicMaxwell< 2 > &time_harmonic_maxwell_parameters, const types::boundary_id boundary_id)
template unsigned int get_waveguide_port_index< 3 >(const Parameters::TimeHarmonicMaxwell< 3 > &time_harmonic_maxwell_parameters, const types::boundary_id boundary_id)
template std::pair< Tensor< 1, 2, std::complex< double > >, Tensor< 1, 2, std::complex< double > > > compute_waveguide_port_incident_fields< 2 >(const Parameters::TimeHarmonicMaxwell< 2 > &time_harmonic_maxwell_parameters, const Point< 2 > &p, const Tensor< 1, 2 > &normal, const std::complex< double > &effective_electric_permittivity, const std::complex< double > &effective_magnetic_permeability, const unsigned int waveguide_port_index)
template std::pair< Tensor< 1, 3, std::complex< double > >, Tensor< 1, 3, std::complex< double > > > compute_waveguide_port_incident_fields< 3 >(const Parameters::TimeHarmonicMaxwell< 3 > &time_harmonic_maxwell_parameters, const Point< 3 > &p, const Tensor< 1, 3 > &normal, const std::complex< double > &effective_electric_permittivity, const std::complex< double > &effective_magnetic_permeability, const unsigned int waveguide_port_index)
unsigned int get_waveguide_port_index(const Parameters::TimeHarmonicMaxwell< dim > &time_harmonic_maxwell_parameters, const types::boundary_id boundary_id)
Get the index of the waveguide port condition applied on a boundary, that is the index of the wavegui...
bool is_robin_boundary_type(const BoundaryConditions::TimeHarmonicMaxwellBoundaryType type)
Check if a boundary condition type of the time-harmonic Maxwell equations is a Robin boundary conditi...