Bembel
 
Loading...
Searching...
No Matches
IdentityOperatorBase.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_IDENTITY_IDENTITYOPERATORBASE_HPP_
13#define BEMBEL_SRC_IDENTITY_IDENTITYOPERATORBASE_HPP_
14
15namespace Bembel {
16
21template <typename Derived>
22class IdentityOperatorBase : public LocalOperatorBase<Derived> {
23 // implementation of the kernel evaluation, which may be based on the
24 // information available from the superSpace
25 public:
27 template <class T>
28 void evaluateIntegrand_impl(const T &super_space, const SurfacePoint &p1,
29 const SurfacePoint &p2,
30 Eigen::MatrixXd *intval) const {
31 // get evaluation points on unit square
32 const auto s = p1.segment<2>(0);
33
34 // get quadrature weights
35 const auto ws = p1(2);
36
37 // get points on geometry and tangential derivatives
38 const auto &x_f = p1.segment<3>(3);
39 const auto &x_f_dx = p1.segment<3>(6);
40 const auto &x_f_dy = p1.segment<3>(9);
41
42 // compute surface measures from tangential derivatives
43 const auto x_kappa = x_f_dx.cross(x_f_dy).norm();
44
45 // integrand without basis functions
46 const auto integrand = x_kappa * ws;
47
48 super_space.addScaledBasisInteraction(intval, integrand, s, s);
49
50 return;
51 }
52};
53
54} // namespace Bembel
55#endif // BEMBEL_SRC_IDENTITY_IDENTITYOPERATORBASE_HPP_
This class is the base for all mass matrices.
Eigen::Matrix< double, 12, 1 > SurfacePoint
typedef of SurfacePoint
Routines for the evalutation of pointwise errors.
constexpr int getFunctionSpaceOutputDimension()
local operator base class. this serves as a common interface for existing local operators