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_INTEGRATE2_HPP_ | ||
12 | #define BEMBEL_SRC_DUFFYTRICK_INTEGRATE2_HPP_ | ||
13 | |||
14 | namespace Bembel { | ||
15 | namespace DuffyTrick { | ||
16 | /** | ||
17 | * \ingroup DuffyTrick | ||
18 | * \brief quadrature routine for identical elements | ||
19 | * \todo be sure that map2element computes the weight h*Q.w(i) such that the | ||
20 | *integrand may then be scaled by qp1.weight * qp2.weight here we just set one | ||
21 | *weight to the actual weight, while the other one will be set to 1. This is to | ||
22 | *remain conforming to the structure of integrate0/1. | ||
23 | * | ||
24 | * Information that map2element has to provide: | ||
25 | * xi; w; Chi(xi); dChidx(xi); dChidy(xi); | ||
26 | **/ | ||
27 | template <typename Derived, class T> | ||
28 | 622 | void integrate2(const LinearOperatorBase<Derived> &LinOp, const T &super_space, | |
29 | const ElementTreeNode &e1, int rot1, const ElementTreeNode &e2, | ||
30 | int rot2, const ElementSurfacePoints &ffield_qnodes1, | ||
31 | const ElementSurfacePoints &ffield_qnodes2, const Cubature &Q, | ||
32 | Eigen::Matrix<typename LinearOperatorTraits<Derived>::Scalar, | ||
33 | Eigen::Dynamic, Eigen::Dynamic> *intval) { | ||
34 |
1/2✓ Branch 1 taken 622 times.
✗ Branch 2 not taken.
|
622 | intval->setZero(); |
35 | 622 | double h = e1.get_h(); | |
36 | 622 | double t1 = 0; | |
37 | 622 | double t2 = 0; | |
38 | 622 | double t3 = 0; | |
39 | 622 | double t4 = 0; | |
40 |
1/2✓ Branch 1 taken 622 times.
✗ Branch 2 not taken.
|
622 | Eigen::Matrix<double, 2, 8> pts; |
41 |
2/4✓ Branch 1 taken 622 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 622 times.
✗ Branch 5 not taken.
|
622 | SurfacePoint qp1, qp2; |
42 | // llc of the element wrt [0,1]^2 | ||
43 |
2/2✓ Branch 1 taken 12136 times.
✓ Branch 2 taken 622 times.
|
12758 | for (auto i = 0; i < Q.w_.size(); ++i) { |
44 |
3/6✓ Branch 1 taken 12136 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12136 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12136 times.
✗ Branch 8 not taken.
|
12136 | double w = h * h * Q.w_(i) * Q.xi_(0, i) * (1 - Q.xi_(0, i)) * |
45 |
2/4✓ Branch 1 taken 12136 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12136 times.
✗ Branch 5 not taken.
|
12136 | (1 - Q.xi_(0, i) * Q.xi_(1, i)); |
46 |
2/2✓ Branch 1 taken 1436872 times.
✓ Branch 2 taken 12136 times.
|
1449008 | for (auto j = 0; j < Q.w_.size(); ++j) { |
47 |
2/4✓ Branch 1 taken 1436872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1436872 times.
✗ Branch 5 not taken.
|
1436872 | t1 = Q.xi_(0, j) * (1 - Q.xi_(0, i)); |
48 |
3/6✓ Branch 1 taken 1436872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1436872 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1436872 times.
✗ Branch 8 not taken.
|
1436872 | t2 = Q.xi_(1, j) * (1 - Q.xi_(0, i) * Q.xi_(1, i)); |
49 |
3/6✓ Branch 1 taken 1436872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1436872 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1436872 times.
✗ Branch 8 not taken.
|
1436872 | t3 = Q.xi_(0, j) * (1 - Q.xi_(0, i)) + Q.xi_(0, i); |
50 |
3/6✓ Branch 1 taken 1436872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1436872 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1436872 times.
✗ Branch 8 not taken.
|
1436872 | t4 = Q.xi_(1, j) * (1 - Q.xi_(0, i) * Q.xi_(1, i)) + |
51 |
2/4✓ Branch 1 taken 1436872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1436872 times.
✗ Branch 5 not taken.
|
1436872 | Q.xi_(0, i) * Q.xi_(1, i); |
52 |
16/32✓ Branch 1 taken 1436872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1436872 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1436872 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1436872 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1436872 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1436872 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1436872 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1436872 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1436872 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1436872 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1436872 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 1436872 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 1436872 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 1436872 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 1436872 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 1436872 times.
✗ Branch 47 not taken.
|
1436872 | pts << t1, t3, t1, t3, t2, t4, t2, t4, t2, t4, t4, t2, t1, t3, t3, t1; |
53 |
2/2✓ Branch 0 taken 5747488 times.
✓ Branch 1 taken 1436872 times.
|
7184360 | for (auto k = 0; k < 4; ++k) { |
54 |
3/6✓ Branch 1 taken 5747488 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5747488 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5747488 times.
✗ Branch 8 not taken.
|
5747488 | super_space.map2surface(e1, pts.col(2 * k), w, &qp1); |
55 |
4/8✓ Branch 1 taken 5747488 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5747488 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5747488 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5747488 times.
✗ Branch 11 not taken.
|
5747488 | super_space.map2surface(e1, pts.col(2 * k + 1), Q.w_(j), &qp2); |
56 |
1/2✓ Branch 1 taken 5747488 times.
✗ Branch 2 not taken.
|
5747488 | LinOp.evaluateIntegrand(super_space, qp1, qp2, intval); |
57 |
1/2✓ Branch 1 taken 5747488 times.
✗ Branch 2 not taken.
|
5747488 | LinOp.evaluateIntegrand(super_space, qp2, qp1, intval); |
58 | } | ||
59 | } | ||
60 | } | ||
61 | BEMBEL_UNUSED_(e2); | ||
62 | BEMBEL_UNUSED_(rot1); | ||
63 | BEMBEL_UNUSED_(rot2); | ||
64 | BEMBEL_UNUSED_(ffield_qnodes1); | ||
65 | BEMBEL_UNUSED_(ffield_qnodes2); | ||
66 | 1244 | return; | |
67 | } | ||
68 | } // namespace DuffyTrick | ||
69 | } // namespace Bembel | ||
70 | |||
71 | #endif // BEMBEL_SRC_DUFFYTRICK_INTEGRATE2_HPP_ | ||
72 |