Bembel
 
Loading...
Searching...
No Matches
SingleLayerPotential.hpp
1// This file is part of Bembel, the higher order C++ boundary element library.
2//
3// Copyright (C) 2022 see <http://www.bembel.eu>
4//
5// It was written as part of a cooperation of J. Doelz, H. Harbrecht, S. Kurz,
6// M. Multerer, S. Schoeps, and F. Wolf at Technische Universitaet Darmstadt,
7// Universitaet Basel, and Universita della Svizzera italiana, Lugano. This
8// source code is subject to the GNU General Public License version 3 and
9// provided WITHOUT ANY WARRANTY, see <http://www.bembel.eu> for further
10// information.
11
12#ifndef BEMBEL_SRC_HOMOGENISEDLAPLACE_SINGLELAYERPOTENTIAL_HPP_
13#define BEMBEL_SRC_HOMOGENISEDLAPLACE_SINGLELAYERPOTENTIAL_HPP_
14
15namespace Bembel {
16// forward declaration of class HomogenisedLaplaceSingleLayerPotential
17// in order to define traits
18template<typename LinOp>
19class HomogenisedLaplaceSingleLayerPotential;
20
24template<typename LinOp>
26 typedef Eigen::VectorXd::Scalar Scalar;
27 static constexpr int OutputSpaceDimension = 1;
28};
29
35template<typename LinOp>
37 HomogenisedLaplaceSingleLayerPotential<LinOp>, LinOp> {
38 // implementation of the kernel evaluation, which may be based on the
39 // information available from the superSpace
40
41 public:
52 Eigen::Matrix<
53 typename PotentialReturnScalar<
55 double>::Scalar, 1, 1> evaluateIntegrand_impl(
57 const Eigen::Vector3d &point, const SurfacePoint &p) const {
58 // get evaluation points on unit square
59 auto s = p.segment < 2 > (0);
60
61 // get quadrature weights
62 auto ws = p(2);
63
64 // get points on geometry and tangential derivatives
65 auto x_f = p.segment < 3 > (3);
66 auto x_f_dx = p.segment < 3 > (6);
67 auto x_f_dy = p.segment < 3 > (9);
68
69 // compute surface measures from tangential derivatives
70 auto x_kappa = x_f_dx.cross(x_f_dy).norm();
71
72 // evaluate kernel
74
75 // assemble Galerkin solution
76 auto cauchy_value = fun_ev.evaluate(element, p);
77
78 // integrand without basis functions
80
81 return integrand;
82 }
83
87 double evaluateKernel(const Eigen::Vector3d &x,
88 const Eigen::Vector3d &y) const {
89 return k_mod(x - y)
90 + evaluate_solid_sphericals(x - y, this->cs, this->deg, false);
91 }
92
93 private:
95 unsigned int deg;
97 Eigen::VectorXd cs;
98};
99
100} // namespace Bembel
101
102#endif // BEMBEL_SRC_HOMOGENISEDLAPLACE_SINGLELAYERPOTENTIAL_HPP_
The ElementTreeNode corresponds to an element in the element tree.
The FunctionEvaluator provides means to evaluate coefficient vectors as functions on the geometry.
static double getPrecision()
returns the precision of the periodicity of the kernel
This class implements the specification of the integration for the single layer potential for the hom...
double evaluateKernel(const Eigen::Vector3d &x, const Eigen::Vector3d &y) const
Fundamental solution of the homogenised Laplace problem.
HomogenisedLaplaceSingleLayerPotential()
Constructs an object initialising the coefficients and the degree via the static variable Homogenised...
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 .
constexpr int getFunctionSpaceOutputDimension()
struct containing specifications on the linear operator has to be specialized or derived for any part...
functional base class. this serves as a common interface for existing functionals.
Definition Potential.hpp:81
Base case for specifying the return type of the potential.
Definition Potential.hpp:36
struct containing specifications on the functional has to be specialized or derived for any particula...
Definition Potential.hpp:28