OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
singularity.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_OPINT_SRC_SINGULARITY_H
19#define BEM_RWG_OPINT_SRC_SINGULARITY_H
20
21#include "types.hpp"
25
26#include "kernels/base.hpp"
27#include "kernels/hgf.hpp"
30
31
32namespace bem::rwg
33{
34
51template <typename TriangleQuadratureType = GaussTriangleQuadrature<2>, typename ScalarKernelType = SingularitySubtractedTaylorHGF>
53{
54
55 using base = SrcIntegratorBase;
56 static_assert(
57 std::is_base_of<TriangleQuadratureBase<2>, TriangleQuadratureType>::value,
58 "SrcSingularity: `TriangleQuadratureType` must derive from `TriangleQuadratureBase<2>`"
59 );
60 static_assert(
61 std::is_base_of<ScalarKernelBase<3>, ScalarKernelType>::value,
62 "SrcSingularity: `ScalarKernelType` must derive from `ScalarKernelBase<3>`"
63 );
64
65public:
66
76
77
86 const Complex k,
87 const Triangle<2>& src_tri,
89 ) override;
90
91
97 { return src_quad_.quadrature_object(); };
98
99
105 { return src_quad_.quadrature_object(); };
106
107
108private:
109
115 void compute_integral_terms(
116 const Triangle<2>& src_tri,
118 );
119
120
128 SrcResult assemble_integrals(
129 const Complex k,
130 const Triangle<2>& src_tri,
132 );
133
134
136 EigRowVec<Float> z_, z_abs_;
137 EigRowVec<Float> beta_, t0_f2_;
138 EigMatNX<Float, 2> u_f2_, u_f3_;
139
140};
141
146}
147
149
150#endif
Class for computing the scalar Green's function for homogeneous, linear, and isotropic materials,...
Definition hgf.hpp:149
Base class for integration over the source triangle for RWG-based BEM operators.
Definition base.hpp:54
Class for 2D quadrature over the source triangle with singularity treatment for RWG-based BEM operato...
TriangleQuadratureType & quadrature_object()
Provides writable access to the triangle quadrature object.
SrcResult integrate(const Complex k, const Triangle< 2 > &src_tri, ConstEigRef< EigMatNX< Float, 3 > > r_obs) override
Computes the integral over the source triangle.
const TriangleQuadratureType & quadrature_object() const
Provides read-only access to the triangle quadrature object for inspection.
SrcSingularity(const TriangleQuadratureType tri_quad=GaussTriangleQuadrature< 2 >(), const ScalarKernelType kernel=SingularitySubtractedTaylorHGF())
Constructs a SrcSingularity with a specified triangle quadrature object.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Definition types.hpp:98
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
Namespace for RWG-based BEM functionality.
Data structure to hold the results of integration over the source triangle.
Definition base.hpp:37