OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
base.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_KERNEL_BASE_H
19#define BEM_KERNEL_BASE_H
20
21#include <cassert>
22
23#include "types.hpp"
24#include "constants.hpp"
25
26
27namespace bem
28{
29
30const Float KERNEL_DEFAULT_TOL = 1.0e-6;
31
41template <uint8_t dim>
43{
44
45 static_assert((dim == 2 || dim == 3), "`dim` must be 2 or 3.");
46
47public:
48
56 virtual Complex kernel(
59 const Complex k
60 ) const = 0;
61
62
73 const Complex k
74 ) const = 0;
75
76};
77
82}
83
84#endif
Base class for scalar kernels.
Definition base.hpp:43
virtual EigColVecN< Complex, dim > grad_kernel(ConstEigRef< EigColVecN< Float, dim > > r_obs, ConstEigRef< EigColVecN< Float, dim > > r_src, const Complex k) const =0
Computes the gradient of the scalar kernel for given observation and source points.
virtual Complex kernel(ConstEigRef< EigColVecN< Float, dim > > r_obs, ConstEigRef< EigColVecN< Float, dim > > r_src, const Complex k) const =0
Computes the scalar kernel for given observation and source points.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Definition types.hpp:98
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
Primary namespace for the OpenBEM library.
Definition constants.hpp:31