GCC Code Coverage Report


Directory: Bembel/src/
File: Bembel/src/DuffyTrick/integrate1.hpp
Date: 2024-03-19 14:38:05
Exec Total Coverage
Lines: 10 10 100.0%
Functions: 1 5 20.0%
Branches: 16 28 57.1%

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 #ifndef BEMBEL_SRC_DUFFYTRICK_INTEGRATE1_HPP_
12 #define BEMBEL_SRC_DUFFYTRICK_INTEGRATE1_HPP_
13
14 namespace Bembel {
15 namespace DuffyTrick {
16 /**
17 * \ingroup DuffyTrick
18 * \brief no-problem quadrature routine, elements are sufficiently far away from
19 *each other, but not far-field yet (this is just an isotropic tensor product
20 *quadrature!).
21 *
22 * \todo be sure that map2element computes the weight h*Q.w(i) such that the
23 *integrand may then be scaled by qp1.weight * qp2.weight
24 **/
25 template <typename Derived, class T>
26 256 void integrate1(const LinearOperatorBase<Derived> &LinOp, const T &super_space,
27 const ElementTreeNode &e1, int rot1, const ElementTreeNode &e2,
28 int rot2, const ElementSurfacePoints &ffield_qnodes1,
29 const ElementSurfacePoints &ffield_qnodes2, const Cubature &Q,
30 Eigen::Matrix<typename LinearOperatorTraits<Derived>::Scalar,
31 Eigen::Dynamic, Eigen::Dynamic> *intval) {
32 256 double h = e1.get_h();
33
1/2
✓ Branch 1 taken 256 times.
✗ Branch 2 not taken.
256 intval->setZero();
34
2/4
✓ Branch 1 taken 256 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 256 times.
✗ Branch 5 not taken.
256 SurfacePoint qp1, qp2;
35
2/2
✓ Branch 1 taken 73984 times.
✓ Branch 2 taken 256 times.
74240 for (auto i = 0; i < Q.w_.size(); ++i) {
36
4/8
✓ Branch 1 taken 73984 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 73984 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 73984 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 73984 times.
✗ Branch 11 not taken.
73984 super_space.map2surface(e1, Q.xi_.col(i), h * Q.w_(i), &qp1);
37
2/2
✓ Branch 1 taken 21381376 times.
✓ Branch 2 taken 73984 times.
21455360 for (auto j = 0; j < Q.w_.size(); ++j) {
38
4/8
✓ Branch 1 taken 21381376 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 21381376 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 21381376 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 21381376 times.
✗ Branch 11 not taken.
21381376 super_space.map2surface(e2, Q.xi_.col(j), h * Q.w_(j), &qp2);
39
1/2
✓ Branch 1 taken 21381376 times.
✗ Branch 2 not taken.
21381376 LinOp.evaluateIntegrand(super_space, qp1, qp2, intval);
40 }
41 }
42
43 BEMBEL_UNUSED_(rot1);
44 BEMBEL_UNUSED_(rot2);
45 BEMBEL_UNUSED_(ffield_qnodes1);
46 BEMBEL_UNUSED_(ffield_qnodes2);
47 512 return;
48 }
49 } // namespace DuffyTrick
50 } // namespace Bembel
51 #endif // BEMBEL_SRC_DUFFYTRICK_INTEGRATE1_HPP_
52