12 #ifndef BEMBEL_SRC_MAXWELL_SINGLELAYEROPERATOR_HPP_
13 #define BEMBEL_SRC_MAXWELL_SINGLELAYEROPERATOR_HPP_
18 class MaxwellSingleLayerOperator;
24 typedef Eigen::VectorXcd EigenType;
25 typedef Eigen::VectorXcd::Scalar Scalar;
28 Form = DifferentialForm::DivConforming,
29 NumberOfFMMComponents = 2
45 void evaluateIntegrand_impl(
49 Eigen::Dynamic, Eigen::Dynamic> *intval)
const {
50 auto polynomial_degree = super_space.get_polynomial_degree();
51 auto polynomial_degree_plus_one_squared =
52 (polynomial_degree + 1) * (polynomial_degree + 1);
55 auto s = p1.segment<2>(0);
56 auto t = p2.segment<2>(0);
63 auto x_f = p1.segment<3>(3);
64 auto x_f_dx = p1.segment<3>(6);
65 auto x_f_dy = p1.segment<3>(9);
66 auto y_f = p2.segment<3>(3);
67 auto y_f_dx = p2.segment<3>(6);
68 auto y_f_dy = p2.segment<3>(9);
71 auto h = 1. / (1 << super_space.get_refinement_level());
75 auto integrand_vector = kernel_evaluation;
76 auto integrand_divergence = -kernel_evaluation / wavenumber2_ / h / h;
79 super_space.addScaledVectorBasisInteraction(intval, integrand_vector, s, t,
80 x_f_dx, x_f_dy, y_f_dx, y_f_dy);
84 super_space.addScaledVectorBasisDivergenceInteraction(
85 intval, integrand_divergence, s, t);
90 Eigen::Matrix<std::complex<double>, 4, 4> evaluateFMMInterpolation_impl(
93 auto s = p1.segment<2>(0);
94 auto t = p2.segment<2>(0);
97 auto x_f = p1.segment<3>(3);
98 auto x_f_dx = p1.segment<3>(6);
99 auto x_f_dy = p1.segment<3>(9);
100 auto y_f = p2.segment<3>(3);
101 auto y_f_dx = p2.segment<3>(6);
102 auto y_f_dy = p2.segment<3>(9);
108 Eigen::Matrix<std::complex<double>, 4, 4> intval;
110 intval(0, 0) = kernel * x_f_dx.dot(y_f_dx);
111 intval(0, 2) = kernel * x_f_dx.dot(y_f_dy);
112 intval(2, 0) = kernel * x_f_dy.dot(y_f_dx);
113 intval(2, 2) = kernel * x_f_dy.dot(y_f_dy);
114 intval(1, 1) = -kernel / wavenumber2_;
115 intval(1, 3) = -kernel / wavenumber2_;
116 intval(3, 1) = -kernel / wavenumber2_;
117 intval(3, 3) = -kernel / wavenumber2_;
126 const Eigen::Vector3d &y)
const {
127 auto r = (x - y).norm();
128 return std::exp(-std::complex<double>(0., 1.) * wavenumber_ * r) / 4. /
134 void set_wavenumber(std::complex<double> wavenumber) {
135 wavenumber_ = wavenumber;
136 wavenumber2_ = wavenumber_ * wavenumber_;
141 std::complex<double> get_wavenumber() {
return wavenumber_; }
144 std::complex<double> wavenumber_;
145 std::complex<double> wavenumber2_;
153 template <
typename InterpolationPo
ints>
155 static std::vector<Eigen::MatrixXd> compute2DMoment(
157 const int cluster_level,
const int cluster_refinements,
158 const int number_of_points) {
162 super_space, cluster_level, cluster_refinements, number_of_points);
166 super_space, cluster_level, cluster_refinements, number_of_points);
170 super_space, cluster_level, cluster_refinements, number_of_points);
172 Eigen::MatrixXd moment1(moment.rows() + moment_dx.rows(), moment.cols());
173 moment1 << moment, moment_dx;
174 Eigen::MatrixXd moment2(moment.rows() + moment_dy.rows(), moment.cols());
175 moment2 << moment, moment_dy;
177 std::vector<Eigen::MatrixXd> vector_of_moments;
178 vector_of_moments.push_back(moment1);
179 vector_of_moments.push_back(moment2);
181 return vector_of_moments;
This class implements the specification of the integration for the Electric Field Integral Equation.
std::complex< double > evaluateKernel(const Eigen::Vector3d &x, const Eigen::Vector3d &y) const
Fundamental solution of Helmholtz/Maxwell problem.
Eigen::Matrix< double, 12, 1 > SurfacePoint
typedef of SurfacePoint
Eigen::MatrixXd moment2DComputer(const SuperSpace< LinOp > &super_space, const int cluster_level, const int cluster_refinements, const int number_of_points)
Computes a single 2D moment for the FMM by tensorisation of the 1D moments.
Routines for the evalutation of pointwise errors.
Computes 1D moment for FMM using derivatives of the basis functions. All calculations ar performed on...
Computes 1D moment for FMM. All calculations ar performed on [0,1].
Computes all 2D moment for the FMM by tensorisation of the 1D moments. Specialice this for your linea...
linear operator base class. this serves as a common interface for existing linear operators.
struct containing specifications on the linear operator has to be specialized or derived for any part...
The superspace manages local polynomial bases on each element of the mesh and provides an interface t...