NiHu  2.0
elastodynamics_singular_integrals.hpp
Go to the documentation of this file.
1 // This file is a part of NiHu, a C++ BEM template library.
2 //
3 // Copyright (C) 2012-2014 Peter Fiala <fiala@hit.bme.hu>
4 // Copyright (C) 2012-2014 Peter Rucz <rucz@hit.bme.hu>
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
22 #ifndef ELASTODYNAMICS_SINGULAR_INTEGRALS_HPP_INCLUDED
23 #define ELASTODYNAMICS_SINGULAR_INTEGRALS_HPP_INCLUDED
24 
25 #include "../core/integral_operator.hpp"
27 #include "guiggiani_1992.hpp"
28 #include "../core/singular_integral_shortcut.hpp"
29 
30 
31 namespace NiHu
32 {
33 
38 template <class TestField, class TrialField>
40  elastodynamics_3d_T_kernel, TestField, TrialField, match::match_2d_type,
41  typename std::enable_if<
42  std::is_same<typename get_formalism<TestField, TrialField>::type, formalism::collocational>::value
43  >::type
44 >
45 {
46 public:
53  template <class result_t>
54  static result_t &eval(
55  result_t &result,
57  field_base<TestField> const &,
58  field_base<TrialField> const &trial_field,
59  element_match const &)
60  {
62  auto const &elem = trial_field.get_elem();
63  guiggiani_t gui(elem, kernel.derived());
64 
65  auto const &xi0 = TestField::nset_t::corner_at(0);
66  gui.integrate(result, xi0, elem.get_normal(xi0));
67 
68  return result;
69  }
70 };
71 
72 }
73 
74 
75 #endif // ELASTODYNAMICS_SINGULAR_INTEGRALS_HPP_INCLUDED
76 
NiHu::singular_integral_shortcut< elastodynamics_3d_T_kernel, TestField, TrialField, match::match_2d_type, typename std::enable_if< std::is_same< typename get_formalism< TestField, TrialField >::type, formalism::collocational >::value >::type >::eval
static result_t & eval(result_t &result, kernel_base< elastodynamics_3d_T_kernel > const &kernel, field_base< TestField > const &, field_base< TrialField > const &trial_field, element_match const &)
evaluate singular integral
Definition: elastodynamics_singular_integrals.hpp:54
guiggiani_1992.hpp
Guiggiani's method for CPV and HPF collocational integrals.
NiHu::kernel_base< elastodynamics_3d_T_kernel >
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::elastodynamics_3d_T_kernel
Definition: elastodynamics_kernel.hpp:165
NiHu::singular_integral_shortcut
a shortcut for the user to define customised singular integral methods
Definition: double_integral.hpp:709
NiHu::field_base::get_elem
const elem_t & get_elem() const
return underlying element
Definition: field.hpp:149
NiHu::field_base
CRTP base class of all fields.
Definition: field.hpp:111
elastodynamics_kernel.hpp
implementation of fundamental solutions of elastodynamics
NiHu::guiggiani
Implementation of Guiggiani's method.
Definition: guiggiani_1992.hpp:84