23#include <external/Eigen/Dense>
47 points.colwise() -
tri.v((
edge + 2) % 3)
82 throw std::runtime_error(
"Rwg::reconstruct_field(): `coeffs` should be a column vector."
93 if (!
tri.point_in_triangle(points.col(
point)))
130 if (
coeffs.num_cols() > 1)
131 throw std::runtime_error(
"Pulse::reconstruct_field(): `coeffs` should be a column vector."
142 if (!
tri.point_in_triangle(points.col(
point)))
Index num_elems() const
Returns the number of elements in the mesh.
Triangle< dim > elem_primitive(Index elem) const
Returns a Triangle primitive object representing a specific element of the mesh.
const EigMatNX< Index, 3 > & elem_edges() const
Returns the edge indices of each element in the mesh.
static EigRowVec< Complex > reconstruct_field(const TriangleMesh< 3 > &mesh, const MatrixBase< Complex > &coeffs, ConstEigRef< EigMatNX< Float, 3 > > points)
Reconstructs a scalar field expressed with pulse functions on a given triangle mesh.
static EigRowVec< Float > value(const Triangle< 3 > &tri, ConstEigRef< EigMatNX< Float, 3 > > points)
Evaluates the value of the pulse function associated with a given triangle at a given set of points i...
static Complex test_field(const Triangle< 3 > &tri, std::function< EigRowVec< Complex >(ConstEigRef< EigMatNX< Float, 3 > >)> field_eval, TriangleQuadratureBase< 3 > &tri_quad)
Tests a field on the pulse function associated with a given triangle.
static EigMatNX< Complex, 3 > reconstruct_field(const TriangleMesh< 3 > &mesh, const MatrixBase< Complex > &coeffs, ConstEigRef< EigMatNX< Float, 3 > > points, const bool rotated=false)
Reconstructs a vector field expressed with RWG functions on a given triangle mesh.
static EigMatNX< Float, 3 > value(const Triangle< 3 > &tri, uint8_t edge, ConstEigRef< EigMatNX< Float, 3 > > points, const bool rotated=false)
Evaluates the value of the RWG function associated with a given edge of a given triangle at a given s...
static EigColVecN< Complex, 3 > test_field(const Triangle< 3 > &tri, std::function< EigMatNX< Complex, 3 >(ConstEigRef< EigMatNX< Float, 3 > >)> field_eval, TriangleQuadratureBase< 3 > &tri_quad, const bool rotated=false)
Tests a field on the RWG functions associated with the edges of a given triangle.
static EigRowVecN< Float, 3 > normalization(const Triangle< 3 > &tri)
Defines the normalization factor for each RWG function associated with a given triangle.
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.