GCC Code Coverage Report


Directory: Bembel/src/
File: Bembel/src/DuffyTrick/tau.hpp
Date: 2024-09-30 07:01:38
Exec Total Coverage
Lines: 15 15 100.0%
Functions: 1 1 100.0%
Branches: 10 16 62.5%

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_DUFFYTRICK_TAU_HPP_
13 #define BEMBEL_SRC_DUFFYTRICK_TAU_HPP_
14
15 namespace Bembel {
16 namespace DuffyTrick {
17 /**
18 * \ingroup DuffyTrick
19 * \brief computes rotations for the DuffyTrick.
20 *
21 * \param x x coordinate
22 * \param y y coordinate
23 * \param thecase Edge case denoting how the element needs to be turned.
24 * \return Point in rotated element.
25 */
26 59839128 Eigen::Vector2d tau(double x, double y, int thecase) {
27 59839128 Eigen::Vector2d retval;
28
4/4
✓ Branch 0 taken 14959782 times.
✓ Branch 1 taken 14959782 times.
✓ Branch 2 taken 14959782 times.
✓ Branch 3 taken 14959782 times.
59839128 switch (thecase) {
29 14959782 case 1:
30
2/4
✓ Branch 1 taken 14959782 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 14959782 times.
✗ Branch 5 not taken.
14959782 retval << 1 - y, x;
31 14959782 return retval;
32 14959782 case 2:
33
2/4
✓ Branch 1 taken 14959782 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 14959782 times.
✗ Branch 5 not taken.
14959782 retval << 1 - x, 1 - y;
34 14959782 return retval;
35 14959782 case 3:
36
1/2
✓ Branch 2 taken 14959782 times.
✗ Branch 3 not taken.
14959782 retval << y, 1 - x;
37 14959782 return retval;
38 14959782 default:
39
1/2
✓ Branch 2 taken 14959782 times.
✗ Branch 3 not taken.
14959782 retval << x, y;
40 14959782 return retval;
41 }
42 }
43 } // namespace DuffyTrick
44 } // namespace Bembel
45 #endif // BEMBEL_SRC_DUFFYTRICK_TAU_HPP_
46