12 #ifndef BEMBEL_SRC_HOMOGENISEDLAPLACE_SINGLELAYEROPERATOR_HPP_
13 #define BEMBEL_SRC_HOMOGENISEDLAPLACE_SINGLELAYEROPERATOR_HPP_
18 class HomogenisedLaplaceSingleLayerOperator;
25 typedef Eigen::VectorXd EigenType;
26 typedef Eigen::VectorXd::Scalar Scalar;
29 Form = DifferentialForm::Discontinuous,
30 NumberOfFMMComponents = 1
40 HomogenisedLaplaceSingleLayerOperator> {
49 this->deg =
getDegree(HomogenisedLaplaceSingleLayerOperator::precision);
51 HomogenisedLaplaceSingleLayerOperator::precision);
55 void evaluateIntegrand_impl(
const T &super_space,
const SurfacePoint &p1,
59 >::Scalar, Eigen::Dynamic, Eigen::Dynamic> *intval)
const {
60 auto polynomial_degree = super_space.get_polynomial_degree();
61 auto polynomial_degree_plus_one_squared = (polynomial_degree + 1)
62 * (polynomial_degree + 1);
65 auto s = p1.segment < 2 > (0);
66 auto t = p2.segment < 2 > (0);
73 auto x_f = p1.segment < 3 > (3);
74 auto x_f_dx = p1.segment < 3 > (6);
75 auto x_f_dy = p1.segment < 3 > (9);
76 auto y_f = p2.segment < 3 > (3);
77 auto y_f_dx = p2.segment < 3 > (6);
78 auto y_f_dy = p2.segment < 3 > (9);
81 auto x_kappa = x_f_dx.cross(x_f_dy).norm();
82 auto y_kappa = y_f_dx.cross(y_f_dy).norm();
85 auto integrand =
evaluateKernel(x_f, y_f) * x_kappa * y_kappa * ws * wt;
91 super_space.addScaledBasisInteraction(intval, integrand, s, t);
96 Eigen::Matrix<double, 1, 1> evaluateFMMInterpolation_impl(
99 auto s = p1.segment < 2 > (0);
100 auto t = p2.segment < 2 > (0);
103 auto x_f = p1.segment < 3 > (3);
104 auto x_f_dx = p1.segment < 3 > (6);
105 auto x_f_dy = p1.segment < 3 > (9);
106 auto y_f = p2.segment < 3 > (3);
107 auto y_f_dx = p2.segment < 3 > (6);
108 auto y_f_dy = p2.segment < 3 > (9);
111 auto x_kappa = x_f_dx.cross(x_f_dy).norm();
112 auto y_kappa = y_f_dx.cross(y_f_dy).norm();
115 Eigen::Matrix<double, 1, 1> intval;
125 const Eigen::Vector3d &y)
const {
134 HomogenisedLaplaceSingleLayerOperator::precision = p;
141 return HomogenisedLaplaceSingleLayerOperator::precision;
150 static double precision;
153 double HomogenisedLaplaceSingleLayerOperator::precision = 0;
This class implements the specification of the integration for the single layer operator for the homo...
double evaluateKernel(const Eigen::Vector3d &x, const Eigen::Vector3d &y) const
Fundamental solution of the Homogenised Laplace problem.
static double getPrecision()
returns the precision of the periodicity of the kernel
HomogenisedLaplaceSingleLayerOperator()
Constructs an object initialising the coefficients and the degree via the static variable precision.
static void setPrecision(double p)
sets the precision of the periodicity of the kernel
Eigen::Matrix< double, 12, 1 > SurfacePoint
typedef of SurfacePoint
Routines for the evalutation of pointwise errors.
Eigen::VectorXd getCoefficients(double precision)
Calculates the coefficients for the solid harmonics expansion of the periodic kernel .
unsigned int getDegree(double precision)
Returns the degree of the sphericals expansion given a precision. Can be extended,...
double evaluate_solid_sphericals(Eigen::Vector3d x, Eigen::VectorXd cs, unsigned int deg, bool grad)
Evaluates the series for real coefficients cs if grad is false, and for real coefficients cs if gra...
double k_mod(Eigen::Vector3d in)
Returns the modified kernel .
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...