Bembel
 
Loading...
Searching...
No Matches
integrate4.hpp
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_INTEGRATE4_HPP_
12#define BEMBEL_SRC_DUFFYTRICK_INTEGRATE4_HPP_
13
14namespace Bembel {
15namespace DuffyTrick {
27template <typename Derived, class T>
29 const ElementTreeNode &e1, int rot1, const ElementTreeNode &e2,
32 Eigen::Matrix<typename LinearOperatorTraits<Derived>::Scalar,
33 Eigen::Dynamic, Eigen::Dynamic> *intval) {
34 intval->setZero();
35 double h = e1.get_h();
36 double t1 = 0;
37 double t2 = 0;
38 double t3 = 0;
39 double t4 = 0;
41 Eigen::Vector2d pt1;
42 // llc of the element wrt [0,1]^2
43 for (auto i = 0; i < Q.w_.size(); ++i) {
44 Eigen::Vector2d xi = Q.xi_.col(i);
45 double w = h * h * Q.w_(i) * std::pow(xi(0), 3.);
46 xi(1) *= xi(0);
47 super_space.map2surface(e1, tau(xi(0), xi(1), rot1), w, &qp1);
48 super_space.map2surface(e1, tau(xi(1), xi(0), rot1), w, &qp2);
49 super_space.map2surface(e2, tau(xi(0), xi(1), rot2), w, &qp3);
50 super_space.map2surface(e2, tau(xi(1), xi(0), rot2), w, &qp4);
51 for (auto j = 0; j < Q.w_.size(); ++j) {
52 auto eta = xi(0) * Q.xi_.col(j);
53 super_space.map2surface(e2, tau(eta(0), eta(1), rot2), Q.w_(j), &qp5);
54 super_space.map2surface(e1, tau(eta(0), eta(1), rot1), Q.w_(j), &qp6);
55 LinOp.evaluateIntegrand(super_space, qp1, qp5, intval);
56 LinOp.evaluateIntegrand(super_space, qp2, qp5, intval);
57 LinOp.evaluateIntegrand(super_space, qp6, qp3, intval);
58 LinOp.evaluateIntegrand(super_space, qp6, qp4, intval);
59 }
60 }
61 BEMBEL_UNUSED_(ffield_qnodes1);
62 BEMBEL_UNUSED_(ffield_qnodes2);
63 return;
64}
65} // namespace DuffyTrick
66} // namespace Bembel
67
68#endif // BEMBEL_SRC_DUFFYTRICK_INTEGRATE4_HPP_
The ElementTreeNode corresponds to an element in the element tree.
void integrate4(const LinearOperatorBase< Derived > &LinOp, const T &super_space, const ElementTreeNode &e1, int rot1, const ElementTreeNode &e2, int rot2, const ElementSurfacePoints &ffield_qnodes1, const ElementSurfacePoints &ffield_qnodes2, const Cubature &Q, Eigen::Matrix< typename LinearOperatorTraits< Derived >::Scalar, Eigen::Dynamic, Eigen::Dynamic > *intval)
quadrature routine for common vertex case.
Eigen::Vector2d tau(double x, double y, int thecase)
computes rotations for the DuffyTrick.
Definition tau.hpp:26
Eigen::Matrix< double, 12, 1 > SurfacePoint
typedef of SurfacePoint
std::vector< SurfacePoint, Eigen::aligned_allocator< SurfacePoint > > ElementSurfacePoints
typedef std::vector<SurfacePoint> with aligned allocator of Eigen for compatibility with older compil...
Routines for the evalutation of pointwise errors.
constexpr int getFunctionSpaceOutputDimension()
linear operator base class. this serves as a common interface for existing linear operators.
struct containing specifications on the linear operator has to be specialized or derived for any part...