22 #ifndef ELASTOSTATICS_SINGULAR_INTEGRALS_HPP_INCLUDED
23 #define ELASTOSTATICS_SINGULAR_INTEGRALS_HPP_INCLUDED
25 #include <boost/math/constants/constants.hpp>
27 #include "../core/integral_operator.hpp"
28 #include "../core/singular_integral_shortcut.hpp"
31 #include "field_type_helpers.hpp"
42 typedef Eigen::Matrix<double, 2, 2> result_t;
52 using boost::math::double_constants::pi;
54 auto const &
C = elem.get_coords();
55 auto rvec = (
C.col(1) -
C.col(0)).
eval();
57 auto gradr = rvec.normalized();
60 - (3.-4.*nu) * result_t::Identity() * (r * (std::log(r/2) - 1.))
62 (gradr * gradr.transpose()) * r
63 ) / (8. * pi * mu * (1. - nu));
71 template <
class TestField,
class TrialField>
74 typename std::enable_if<
75 is_collocational<TestField, TrialField>::value &&
76 is_constant_line<TrialField>::value
88 template <
class result_t>
97 trial_field.
get_elem(), kernel.derived().get_poisson_ratio(), kernel.derived().get_shear_modulus());
107 template <
class TestField,
class TrialField>
110 typename std::enable_if<
111 is_collocational<TestField, TrialField>::value &&
112 is_constant_line<TrialField>::value
124 template <
class result_t>
142 template <
class TestField,
class TrialField>
145 typename std::enable_if<
146 std::is_same<typename get_formalism<TestField, TrialField>::type, formalism::collocational>::value
157 template <
class result_t>
166 auto const &elem = trial_field.
get_elem();
167 guiggiani_t gui(elem, kernel.derived());
169 auto const &xi0 = TestField::nset_t::corner_at(0);
170 gui.integrate(result, xi0, elem.get_normal(xi0));
184 typedef Eigen::Matrix<double, 2, 2> result_t;
194 using namespace boost::math::double_constants;
196 auto const &
C = elem.get_coords();
197 auto rvec = (
C.col(1) -
C.col(0)).
eval();
198 auto r = rvec.norm();
199 auto gradr = rvec.normalized();
202 -(3. - 4.*nu) * result_t::Identity() * (std::log(r) - 1.5)
203 + gradr * gradr.transpose()
204 ) / (8. * pi * mu * (1. - nu));
213 template <
class TestField,
class TrialField>
216 typename std::enable_if<
217 std::is_same<typename get_formalism<TestField, TrialField>::type, formalism::general>::value &&
218 std::is_same<typename TrialField::elem_t::lset_t, line_1_shape_set>::value &&
219 std::is_same<typename TestField::nset_t, line_0_shape_set>::value &&
220 std::is_same<typename TrialField::nset_t, line_0_shape_set>::value
232 template <
class result_t>
241 trial_field.
get_elem(), kernel.derived().get_poisson_ratio(), kernel.derived().get_shear_modulus());
253 template <
class TestField,
class TrialField>
256 typename std::enable_if<
257 std::is_same<typename get_formalism<TestField, TrialField>::type, formalism::general>::value &&
258 std::is_same<typename TestField::elem_t::lset_t, line_1_shape_set>::value &&
259 std::is_same<typename TrialField::elem_t::lset_t, line_1_shape_set>::value &&
260 std::is_same<typename TestField::nset_t, line_0_shape_set>::value &&
261 std::is_same<typename TrialField::nset_t, line_0_shape_set>::value
274 template <
class result_t>
291 #endif // ELASTOSTATICS_SINGULAR_INTEGRALS_HPP_INCLUDED