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_RWG_PROJ_BASE_H
19#define BEM_RWG_PROJ_BASE_H
20
21#include "types.hpp"
24
25
26namespace bem::rwg
27{
28
38template <uint8_t src_num_dof>
40{
41
42 static_assert((src_num_dof > 0), "ProjectorBase: `src_num_dof` must be greater than 0.");
43
44public:
45
60 const Complex k,
62 const Triangle<3>& src_tri
63 ) = 0;
64
65
78 const Triangle<3>& src_tri
79 )
80 {
81 EigMatMN<Float, 3, 3> local_uvw = src_tri.local_coordinate_basis();
82 EigColVecN<Float, 3> local_origin = src_tri.local_origin();
83
85 obs_points, local_origin, local_uvw
86 );
87
88 src_tri_local.set_v(
90 src_tri.v(), local_origin, local_uvw
91 ).topRows(2),
92 src_tri.edge_polarities()
93 );
94
95 return;
96 };
97
98};
99
104}
105
106#endif
Geometry operations class.
static EigMatNX< Float, dim > transform_coordinate_system(ConstEigRef< EigMatNX< Float, dim > > v_in, ConstEigRef< EigColVecN< Float, dim > > new_origin, ConstEigRef< EigMatMN< Float, dim, dim > > new_uvw)
Transforms the given coordinates to a new coordinate system defined by a new origin and orthogonal un...
Base class for RWG-based BEM projectors.
Definition base.hpp:40
static void transform_coordinates(EigMatNX< Float, 3 > &obs_points_local, Triangle< 2 > &src_tri_local, ConstEigRef< EigMatNX< Float, 3 > > obs_points, const Triangle< 3 > &src_tri)
Transforms the coordinates of the observation points and source triangle into a local coordinate syst...
Definition base.hpp:74
virtual EigMatXN< Complex, src_num_dof > compute(const Complex k, ConstEigRef< EigMatNX< Float, 3 > > obs_points, const Triangle< 3 > &src_tri)=0
Computes projector values for the given observation and source triangles.
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.