| 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_QUADRATURE_TENSORPRODUCTQUADRATUREVECTOR_HPP_ | ||
| 13 | #define BEMBEL_SRC_QUADRATURE_TENSORPRODUCTQUADRATUREVECTOR_HPP_ | ||
| 14 | |||
| 15 | namespace Bembel { | ||
| 16 | |||
| 17 | /** | ||
| 18 | * \ingroup Quadrature | ||
| 19 | * \todo add a desciption | ||
| 20 | */ | ||
| 21 | template <template <unsigned int qrOrder> class QuadratureRule, | ||
| 22 | unsigned int Order> | ||
| 23 | struct TensorProductQuadratureVector { | ||
| 24 |
1/2✓ Branch 2 taken 1935 times.
✗ Branch 3 not taken.
|
3870 | TensorProductQuadratureVector() { |
| 25 |
1/2✓ Branch 1 taken 1935 times.
✗ Branch 2 not taken.
|
3870 | QuadratureRule<Order + 1> GL; |
| 26 |
1/2✓ Branch 3 taken 1935 times.
✗ Branch 4 not taken.
|
3870 | Q_.xi_.resize(2, GL.xi_.size() * GL.xi_.size()); |
| 27 |
1/2✓ Branch 3 taken 1935 times.
✗ Branch 4 not taken.
|
3870 | Q_.w_.resize(GL.w_.size() * GL.w_.size()); |
| 28 |
2/2✓ Branch 1 taken 1545965 times.
✓ Branch 2 taken 1935 times.
|
3095800 | for (auto k = 0; k < Q_.xi_.cols(); ++k) { |
| 29 |
3/6✓ Branch 1 taken 1545965 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 1545965 times.
✗ Branch 7 not taken.
✓ Branch 11 taken 1545965 times.
✗ Branch 12 not taken.
|
3091930 | Q_.xi_.col(k) << GL.xi_[k / GL.xi_.size()], GL.xi_[k % GL.xi_.size()]; |
| 30 |
1/2✓ Branch 5 taken 1545965 times.
✗ Branch 6 not taken.
|
3091930 | Q_.w_(k) = GL.w_[k / GL.w_.size()] * GL.w_[k % GL.w_.size()]; |
| 31 | } | ||
| 32 | 3870 | } | |
| 33 | Cubature Q_; | ||
| 34 | TensorProductQuadratureVector<QuadratureRule, Order - 1> | ||
| 35 | remainingQuadratures_; | ||
| 36 | 3782880 | const Cubature &operator[](unsigned int i) const { | |
| 37 |
2/2✓ Branch 0 taken 39055 times.
✓ Branch 1 taken 1852385 times.
|
3782880 | return (i == Order) ? Q_ : remainingQuadratures_[i]; |
| 38 | } | ||
| 39 | }; | ||
| 40 | |||
| 41 | /** | ||
| 42 | * \ingroup Quadrature | ||
| 43 | * \todo add a desciption | ||
| 44 | */ | ||
| 45 | template <template <unsigned int qrOrder> class QuadratureRule> | ||
| 46 | struct TensorProductQuadratureVector<QuadratureRule, 0> { | ||
| 47 | 48 | TensorProductQuadratureVector() { | |
| 48 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | QuadratureRule<1> GL; |
| 49 |
1/2✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
|
48 | Q_.xi_.resize(2, GL.xi_.size() * GL.xi_.size()); |
| 50 |
1/2✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
|
48 | Q_.w_.resize(GL.w_.size() * GL.w_.size()); |
| 51 |
2/2✓ Branch 1 taken 48 times.
✓ Branch 2 taken 48 times.
|
96 | for (auto k = 0; k < Q_.xi_.cols(); ++k) { |
| 52 |
3/6✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 48 times.
✗ Branch 7 not taken.
✓ Branch 11 taken 48 times.
✗ Branch 12 not taken.
|
48 | Q_.xi_.col(k) << GL.xi_[k / GL.xi_.size()], GL.xi_[k % GL.xi_.size()]; |
| 53 |
1/2✓ Branch 5 taken 48 times.
✗ Branch 6 not taken.
|
48 | Q_.w_(k) = GL.w_[k / GL.w_.size()] * GL.w_[k % GL.w_.size()]; |
| 54 | } | ||
| 55 | 48 | } | |
| 56 | Cubature Q_; | ||
| 57 | ✗ | const Cubature &operator[](unsigned int i) const { return Q_; } | |
| 58 | }; | ||
| 59 | |||
| 60 | } // namespace Bembel | ||
| 61 | #endif // BEMBEL_SRC_QUADRATURE_TENSORPRODUCTQUADRATUREVECTOR_HPP_ | ||
| 62 |