OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
aefie.hpp
Go to the documentation of this file.
1// OpenBEM - Copyright (C) 2026 Shashwat Sharma
2
3// This file is part of OpenBEM.
4
5// OpenBEM is free software: you can redistribute it and/or modify it under the terms of the
6// GNU General Public License as published by the Free Software Foundation, either version 3
7// of the License, or (at your option) any later version.
8
9// You should have received a copy of the GNU General Public License along with OpenBEM.
10// If not, see <https://www.gnu.org/licenses/>.
11
12
18#ifndef BEM_RWG_AEFIE_LUMPED_ELEM_H
19#define BEM_RWG_AEFIE_LUMPED_ELEM_H
20
21#include <vector>
22
23#include "types.hpp"
24#include "constants.hpp"
25
27#include "matrix/base.hpp"
29
34
35
36namespace bem::rwg
37{
38
48template <typename MatrixType = EigenDenseMatrix<Complex>>
49class AefieLumpedElement: public LumpedElementBase<MatrixType>
50{
51
53 using base::base;
54
55public:
56
62 MatrixType coupling_matrix(const Float f) const override
63 {
64 MatrixType mat;
66 return mat;
67 };
68
69
75 MatrixType voltage_matrix(const Float f) const override
76 {
79 MatrixType Lp = phi_matrix(f, port_mesh, base::structure_.mesh());
80
81 MatrixType mat;
82 mat.set_mat_mul(voltage_map, Lp, -one);
83
84 return mat;
85 };
86
87
93 MatrixType current_matrix(const Float f) const override
94 {
95 MatrixType mat (base::num_ports(), base::num_ports());
96 for (Index ii = 0; ii < base::num_ports(); ++ii)
97 mat.set_value(ii, ii, base::impedances()[ii]);
98 mat.assemble();
99 return mat;
100 };
101
102
103protected:
104
112 MatrixType phi_matrix(
113 const Float f,
116 ) const
117 {
118 Complex k = base::structure_.background_material().k(f);
119 Complex eps_eff = base::structure_.background_material().eps_eff(f);
120
123 MatrixType Lp;
124 assm_face.assemble(Lp, op_Lp, k);
125 Lp.scale(one / eps_eff);
126
127 return Lp;
128 };
129
130};
131
136}
137
138#endif
Class providing lumped elements functionality for the AEFIE.
Definition aefie.hpp:50
MatrixType phi_matrix(const Float f, const TriangleMesh< 3 > &obs_mesh, const TriangleMesh< 3 > &src_mesh) const
Returns the matrix associated with the scalar potential on given source and observation meshes.
Definition aefie.hpp:112
MatrixType coupling_matrix(const Float f) const override
Returns the matrix the couples the element port current to the AEFIE.
Definition aefie.hpp:62
MatrixType voltage_matrix(const Float f) const override
Returns the matrix associated with the potential differences between terminals.
Definition aefie.hpp:75
MatrixType current_matrix(const Float f) const override
Returns the matrix associated with terminal currents.
Definition aefie.hpp:93
Class for generating operator matrices for pulse observation and source functions.
Base class for generating excitation coefficients and coupling matrices for lumped ports.
Definition base.hpp:51
virtual MatrixType voltage_mapping_matrix() const
Returns the matrix that maps the scalar potential on terminal triangles to the average voltage on the...
Definition base.hpp:251
virtual MatrixType current_mapping_matrix() const
Returns the matrix that maps the total port currents to the volume current densities on terminal tria...
Definition base.hpp:219
Index num_ports() const
Returns the number of excitations (right-hand sides), which equals the number of ports.
Definition base.hpp:110
virtual MatrixType terminal_mapping_matrix() const
Returns the matrix that maps terminal triangles to their parent mesh triangles.
Definition base.hpp:281
MeshView< TriangleMesh< 3 > > port_mesh_view() const
Returns a mesh view consisting of all elements associated with the ports.
Definition base.hpp:145
const std::vector< Complex > & impedances() const
Returns a read-only reference to the lumped impedances.
Definition base.hpp:324
Class for computing the scalar single-layer potential operator.
double Float
Floating point number.
Definition types.hpp:47
std::complex< Float > Complex
Complex floating point number.
Definition types.hpp:51
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Definition types.hpp:86
std::size_t Index
Unsigned integer type for indices and container sizes.
Definition types.hpp:54
Namespace for RWG-based BEM functionality.