GCC Code Coverage Report


Directory: Bembel/src/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 9 / 0 / 9
Functions: 100.0% 2 / 0 / 2
Branches: 50.0% 4 / 0 / 8

LaplaceBeltrami/LaplaceBeltramiOperatorBase.hpp
Line Branch Exec Source
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_LAPLACEBELTRAMI_LAPLACEBELTRAMIOPERATORBASE_HPP_
13 #define BEMBEL_SRC_LAPLACEBELTRAMI_LAPLACEBELTRAMIOPERATORBASE_HPP_
14
15 namespace Bembel {
16
17 /**
18 * \ingroup LocalOperator
19 * \brief This class is the base for Laplace Beltrami operator
20 */
21 template <typename Derived>
22 class LaplaceBeltramiOperatorBase : public LocalOperatorBase<Derived> {
23 public:
24 1 LaplaceBeltramiOperatorBase() {}
25 template <class T>
26 54 void evaluateIntegrand_impl(const T &super_space, const SurfacePoint &p1,
27 const SurfacePoint &p2,
28 Eigen::MatrixXd *intval) const {
29 // get basic information
30 54 const unsigned int elements_per_direction =
31 54 (1 << super_space.get_refinement_level());
32 54 const double h = 1. / ((double)(elements_per_direction));
33
34 // compute surface measures from tangential derivatives
35
4/8
✓ Branch 1 taken 54 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 54 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 54 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 54 times.
✗ Branch 11 not taken.
54 double x_kappa = p1.segment<3>(6).cross(p1.segment<3>(9)).norm();
36
37 // integrand without basis functions
38 54 double integrand = x_kappa * p1(2) / (h * h);
39
40 54 super_space.addScaledSurfaceGradientInteraction(intval, integrand, p1, p2);
41
42 54 return;
43 }
44 };
45
46 } // namespace Bembel
47 #endif // BEMBEL_SRC_LAPLACEBELTRAMI_LAPLACEBELTRAMIOPERATORBASE_HPP_
48