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_SRC_QUAD_H
19#define BEM_RWG_OPINT_SRC_QUAD_H
20
21#include "types.hpp"
25#include "kernels/hgf.hpp"
27
28
29namespace bem::rwg
30{
31
47template <typename TriangleQuadratureType = GaussTriangleQuadrature<2>, typename ScalarKernelType = HGF>
49{
50
51 using base = SrcIntegratorBase;
52 static_assert(
53 std::is_base_of<TriangleQuadratureBase<2>, TriangleQuadratureType>::value,
54 "SrcQuadrature: `TriangleQuadratureType` must derive from `TriangleQuadratureBase<2>`"
55 );
56 static_assert(
57 std::is_base_of<ScalarKernelBase<3>, ScalarKernelType>::value,
58 "SrcQuadrature: `ScalarKernelType` must derive from `ScalarKernelBase<3>`"
59 );
60
61public:
62
70 const ScalarKernelType kernel = HGF()
71 ): tri_quad_(tri_quad), kernel_(kernel) {};
72
73
82 const Complex k,
83 const Triangle<2>& src_tri,
85 ) override;
86
87
93 { return tri_quad_; };
94
95
101 { return tri_quad_; };
102
103
104private:
105
106 TriangleQuadratureType tri_quad_;
107 ScalarKernelType kernel_;
108
109};
110
115}
116
118
119#endif
Class for computing the scalar Green's function for homogeneous, linear, and isotropic materials.
Definition hgf.hpp:37
Base class for integration over the source triangle for RWG-based BEM operators.
Definition base.hpp:54
Class for quadrature over the source triangle for RWG-based BEM operators. Reference:
const TriangleQuadratureType & quadrature_object() const
Provides read-only access to the triangle quadrature object for inspection.
TriangleQuadratureType & quadrature_object()
Provides writable access to the triangle quadrature object.
SrcQuadrature(const TriangleQuadratureType tri_quad=GaussTriangleQuadrature< 2 >(), const ScalarKernelType kernel=HGF())
Constructs a SrcQuadrature with a specified 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 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