OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
quadrature.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_OBS_QUAD_H
19#define BEM_RWG_OPINT_OBS_QUAD_H
20
21#include "types.hpp"
25
29
30
31namespace bem::rwg
32{
33
48template <typename TriangleQuadratureType = GaussTriangleQuadrature<3>, typename SrcIntegratorType = SrcStrategic<>>
50{
51
52 using base = ObsIntegratorBase;
53 static_assert(
54 std::is_base_of<TriangleQuadratureBase<3>, TriangleQuadratureType>::value,
55 "ObsQuadrature: `TriangleQuadratureType` must derive from `TriangleQuadratureBase<3>`"
56 );
57 static_assert(
58 std::is_base_of<SrcIntegratorBase, SrcIntegratorType>::value,
59 "ObsQuadrature: `SrcIntegratorType` must derive from `SrcIntegratorBase`"
60 );
61
62public:
63
73
74
83 const Complex k,
84 const Triangle<3>& obs_tri,
85 const Triangle<2>& src_tri
86 ) override;
87
88
94 { return tri_quad_; };
95
96
102 { return tri_quad_; };
103
104
110 { return src_integrator_; };
111
112
118 { return src_integrator_; };
119
120
121private:
122
133 Complex g_term(const SrcResult& src_result);
134
135
147
148
159 EigRowVecN<Complex, 9> grad_g_terms(const SrcResult& src_result);
160
161
172 EigRowVecN<Complex, 15> rot_grad_g_terms(const SrcResult& src_result);
173
174
175 TriangleQuadratureType tri_quad_;
176 SrcIntegratorType src_integrator_;
177
178};
179
184}
185
187
188#endif
Base class for integration over the observation triangle for RWG-based BEM operators.
Definition base.hpp:49
Class for quadrature over the observation triangle for RWG-based BEM operators. Reference: O....
TriangleQuadratureType & quadrature_object()
Provides writable access to the triangle quadrature object.
const SrcIntegratorType & src_integrator() const
Provides read-only access to the source integrator for inspection.
ObsResult integrate(const Complex k, const Triangle< 3 > &obs_tri, const Triangle< 2 > &src_tri) override
Computes the integral over the observation triangle.
const TriangleQuadratureType & quadrature_object() const
Provides read-only access to the triangle quadrature object for inspection.
SrcIntegratorType & src_integrator()
Provides writable access to the source integrator object.
ObsQuadrature(const TriangleQuadratureType tri_quad=GaussTriangleQuadrature< 3 >(), const SrcIntegratorType src_integrator=SrcStrategic<>())
Constructs an ObsQuadrature with a specified triangle quadrature object.
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 observation triangle.
Definition base.hpp:37
Data structure to hold the results of integration over the source triangle.
Definition base.hpp:37