GCC Code Coverage Report


Directory: Bembel/src/
File: Bembel/src/LaplaceBeltrami/LaplaceBeltramiOperatorBase.hpp
Date: 2024-03-19 14:38:05
Exec Total Coverage
Lines: 9 9 100.0%
Functions: 2 2 100.0%
Branches: 3 6 50.0%

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
3/6
✓ Branch 2 taken 54 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 54 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 54 times.
✗ Branch 9 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