18#ifndef BEM_RWG_ASSEMBLER_BASE_H
19#define BEM_RWG_ASSEMBLER_BASE_H
44template <u
int8_t obs_num_dof, u
int8_t src_num_dof>
48 static_assert((
obs_num_dof > 0),
"OperatorAssemblerBase: `obs_num_dof` must be greater than 0.");
49 static_assert((
src_num_dof > 0),
"OperatorAssemblerBase: `src_num_dof` must be greater than 0.");
114 template <
typename OperatorType>
123 std::is_base_of<OperatorBase<obs_num_dof, src_num_dof>,
OperatorType>::value,
124 "OperatorAssemblerBase::assemble(): `OperatorType` must derive from `OperatorBase<obs_num_dof, src_num_dof>`"
129#pragma omp parallel for firstprivate(op)
234template <u
int8_t obs_num_dof>
238 static_assert((
obs_num_dof > 0),
"ExcitationAssemblerBase: `obs_num_dof` must be greater than 0.");
288template <u
int8_t obs_dim, u
int8_t src_num_dof>
292 static_assert((
obs_dim > 0),
"`obs_dim` must be greater than 0.");
293 static_assert((
src_num_dof > 0),
"`src_num_dof` must be greater than 0.");
Triangle< dim > elem_primitive(Index elem) const
Returns a Triangle primitive object representing a specific element of the mesh.
Base class for generating excitation matrices for RWG-based BEM systems.
ExcitationAssemblerBase(const TriangleMesh< 3 > &mesh)
Constructs an ExcitationAssemblerBase for a given mesh.
ExcitationAssemblerBase(const TriangleMesh< 3 > &mesh, ConstEigRef< EigRowVec< Index > > elems)
Constructs an ExcitationAssemblerBase for a given mesh on given test elements.
virtual void assemble(MatrixBase< Complex > &mat, ExcitationBase< obs_num_dof > &exc, const Complex k)=0
Assembles the excitation matrix for a given excitation object and observation triangle mesh.
Base class for generating RWG-based BEM operator matrices.
static EigMatNX< Index, 2 > make_pairs(const TriangleMesh< 3 > &obs_mesh, const TriangleMesh< 3 > &src_mesh)
Generates all possible pairs of triangle indices for given observation and source triangle meshes.
virtual void fill_matrix(MatrixBase< Complex > &mat, ConstEigRef< EigColVecN< Index, 2 > > elem_pair, ConstEigRef< EigMatMN< Complex, obs_num_dof, src_num_dof > > values)=0
Fills operator values in the matrix based on source and observation meshes and degrees of freedom.
OperatorAssemblerBase(const TriangleMesh< 3 > &obs_mesh, const TriangleMesh< 3 > &src_mesh)
Constructs an OperatorAssemblerBase for given observation and source meshes.
void assemble(MatrixBase< Complex > &mat, OperatorType op, const Complex k)
Assembles the operator matrix for a given operator object and source and observation meshes.
static EigMatNX< Index, 2 > make_pairs(ConstEigRef< EigRowVec< Index > > obs_elems, ConstEigRef< EigRowVec< Index > > src_elems)
Makes all possible pairs of triangle indices for given observation and source triangle indices.
OperatorAssemblerBase(const TriangleMesh< 3 > &obs_mesh, const TriangleMesh< 3 > &src_mesh, ConstEigRef< EigMatNX< Index, 2 > > elem_pairs)
Constructs an OperatorAssemblerBase for given observation and source meshes.
virtual void prep_matrix(MatrixBase< Complex > &mat)=0
Prepares the matrix for assembly (e.g., resizing and preallocation).
OperatorAssemblerBase(const TriangleMesh< 3 > &mesh, ConstEigRef< EigMatNX< Index, 2 > > elem_pairs)
Constructs an OperatorAssemblerBase for a given mesh.
OperatorAssemblerBase(const TriangleMesh< 3 > &mesh)
Constructs an OperatorAssemblerBase for a given mesh.
Base class for generating RWG-based BEM projector matrices.
virtual void assemble(MatrixBase< Complex > &mat, ProjectorBase< src_num_dof > &op, const Complex k)=0
Assembles the projector matrix for a given projector object, source mesh, and observation points.
ProjectorAssemblerBase(const PointCloud< 3 > &obs_cloud, const TriangleMesh< 3 > &src_mesh, ConstEigRef< EigRowVec< Index > > elems)
Constructs a ProjectorAssemblerBase for given observation points and source mesh.
ProjectorAssemblerBase(const PointCloud< 3 > &obs_cloud, const TriangleMesh< 3 > &src_mesh)
Constructs a ProjectorAssemblerBase for given observation points and source mesh.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Eigen::Matrix< T, 1, Eigen::Dynamic > EigRowVec
Dynamic-size row vector containing type T.
std::complex< Float > Complex
Complex floating point number.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Eigen::Matrix< T, N, Eigen::Dynamic > EigMatNX
Fixed-height matrix with N rows containing type T.
std::size_t Index
Unsigned integer type for indices and container sizes.
Namespace for RWG-based BEM functionality.