NiHu  2.0
normal_derivative_singular_integrals.hpp
1 #ifndef NORMAL_DERIVATIVE_SINGULAR_INTEGRALS_HPP_INCLUDED
2 #define NORMAL_DERIVATIVE_SINGULAR_INTEGRALS_HPP_INCLUDED
3 
5 #include "../core/singular_integral_shortcut.hpp"
6 #include "../core/element_match.hpp"
7 
8 namespace NiHu
9 {
10 
11 // The integral of any d/dy normal derivative kernel over a plane triangle
12 // is zero, if the singular point is inside the triangle
13 template <class DK, class TestField, class TrialField>
15  normal_derivative_kernel<DK, 0, 1>,
16  TestField, TrialField, match::match_2d_type,
17  typename std::enable_if<
18  std::is_same<typename TrialField::elem_t::lset_t, tria_1_shape_set>::value
19  >::type
20 >
21 {
22 public:
23  template <class result_t>
24  static constexpr result_t &eval(
25  result_t &result,
27  field_base<TestField> const &,
28  field_base<TrialField> const &,
29  element_match const &)
30  {
31  return result;
32  }
33 };
34 
35 
36 // The integral of any d/dx normal derivative kernel over a plane triangle
37 // is zero, if the singular point is inside the triangle
38 template <class DK, class TestField, class TrialField>
40  normal_derivative_kernel<DK, 1, 0>,
41  TestField, TrialField, match::match_2d_type,
42  typename std::enable_if<
43  std::is_same<typename TrialField::elem_t::lset_t, tria_1_shape_set>::value
44  >::type
45 >
46 {
47 public:
48  template <class result_t>
49  static constexpr result_t &eval(
50  result_t &result,
52  field_base<TestField> const &,
53  field_base<TrialField> const &,
54  element_match const &)
55  {
56  return result;
57  }
58 };
59 
60 
61 // The integral of any d/dy normal derivative kernel over a line
62 // is zero, if the singular point is inside the line
63 template <class DK, class TestField, class TrialField>
65  normal_derivative_kernel<DK, 0, 1>,
66  TestField, TrialField, match::match_1d_type,
67  typename std::enable_if<
68  std::is_same<typename TrialField::elem_t::lset_t, line_1_shape_set>::value
69  >::type
70 >
71 {
72 public:
73  template <class result_t>
74  static constexpr result_t &eval(
75  result_t &result,
77  field_base<TestField> const &,
78  field_base<TrialField> const &,
79  element_match const &)
80  {
81  return result;
82  }
83 };
84 
85 
86 // The integral of any d/dx normal derivative kernel over a line
87 // is zero, if the singular point is inside the line
88 template <class DK, class TestField, class TrialField>
90  normal_derivative_kernel<DK, 1, 0>,
91  TestField, TrialField, match::match_1d_type,
92  typename std::enable_if<
93  std::is_same<typename TrialField::elem_t::lset_t, line_1_shape_set>::value
94  >::type
95 >
96 {
97 public:
98  template <class result_t>
99  static constexpr result_t &eval(
100  result_t &result,
102  field_base<TestField> const &,
103  field_base<TrialField> const &,
104  element_match const &)
105  {
106  return result;
107  }
108 };
109 
110 
111 } // end of namespace NiHu
112 
113 #endif // NORMAL_DERIVATIVE_SINGULAR_INTEGRALS_HPP_INCLUDED
NiHu::kernel_base
CRTP base class of all BEM kernels.
Definition: kernel.hpp:133
NiHu::match::match_2d_type
std::integral_constant< int, 2 > match_2d_type
two elements are adjacent with a 2d (surface) match
Definition: match_types.hpp:42
NiHu::element_match
class describing the adjacency (match) state of two elements
Definition: element_match.hpp:39
NiHu::singular_integral_shortcut
a shortcut for the user to define customised singular integral methods
Definition: double_integral.hpp:709
NiHu::match::match_1d_type
std::integral_constant< int, 1 > match_1d_type
two elements are adjacent with a 1d (line) match
Definition: match_types.hpp:40
normal_derivative_kernel.hpp
Class NiHu::normal_derivative_kernel.
NiHu::field_base
CRTP base class of all fields.
Definition: field.hpp:111
NiHu::singular_integral_shortcut::eval
static result_t & eval(result_t &result, kernel_base< Kernel > const &kernel, field_base< TestField > const &test_field, field_base< TrialField > const &trial_field, element_match const &match)
evaluate singular integral
Definition: double_integral.hpp:780
NiHu::normal_derivative_kernel
Normal derivative of a distance dependent kernel.
Definition: normal_derivative_kernel.hpp:26