OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
plane_wave.cpp
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
19
20#include "types.hpp"
23
24
25namespace bem::rwg
26{
27
29{
30 Index rhs = 0;
31
33 { return eval(k, r_obs, rhs); };
34
36
37 for (rhs = 0; rhs < pos_.cols(); ++rhs)
38 result.col(rhs) = Rwg::test_field(obs_tri, eval_lambda, *tri_quad_);
39
40 return result;
41};
42
43
45{
46 Index rhs = 0;
47
49 { return eval(k, r_obs, rhs); };
50
52
53 for (rhs = 0; rhs < pos_.cols(); ++rhs)
54 result.col(rhs) = Rwg::test_field(obs_tri, eval_lambda, *tri_quad_, true);
55
56 return result;
57};
58
59}
60
EigMatNX< Complex, 3 > compute(const Complex k, const Triangle< 3 > &obs_tri) override
Computes the plane wave excitation coefficients when the field is tested with rotated RWG functions.
EigMatNX< Complex, 3 > eval(const Complex k, ConstEigRef< EigMatNX< Float, 3 > > r_obs, const Index idx=0)
Evaluates the plane wave vector field value at given observation points.
EigMatNX< Complex, 3 > compute(const Complex k, const Triangle< 3 > &obs_tri) override
Computes the plane wave excitation coefficients when the field is tested with RWG functions.
static EigColVecN< Complex, 3 > test_field(const Triangle< 3 > &tri, std::function< EigMatNX< Complex, 3 >(ConstEigRef< EigMatNX< Float, 3 > >)> field_eval, TriangleQuadratureBase< 3 > &tri_quad, const bool rotated=false)
Tests a field on the RWG functions associated with the edges of a given triangle.
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
Eigen::Matrix< T, N, Eigen::Dynamic > EigMatNX
Fixed-height matrix with N rows containing type T.
Definition types.hpp:78
std::size_t Index
Unsigned integer type for indices and container sizes.
Definition types.hpp:54
Namespace for RWG-based BEM functionality.