NiHu  2.0
jacobian_computer.hpp
1 #ifndef NIHU_JACOBIAN_COMPUTER_HPP_INCLUDED
2 #define NIHU_JACOBIAN_COMPUTER_HPP_INCLUDED
3 
4 namespace NiHu
5 {
6 
7 template <class elem, class enable = void>
9 
10 template <class elem_t>
12  elem_t,
13  typename std::enable_if<
14  NiHu::element_traits::is_surface_element<elem_t>::value
15  >::type
16 >
17 {
18 public:
19  static double eval(elem_t const &elem, typename elem_t::xi_t const &xi)
20  {
21  return elem.get_normal(xi).norm();
22  }
23 };
24 
25 template <class elem_t>
27  elem_t,
28  typename std::enable_if<
29  !NiHu::element_traits::is_surface_element<elem_t>::value
30  >::type
31 >
32 {
33 public:
34  static double eval(elem_t const &elem, typename elem_t::xi_t const &xi)
35  {
36  return elem.get_dx(xi).determinant();
37  }
38 };
39 
40 }// namespace NiHu
41 
42 #endif // JACOBIAN_COMPUTER_HPP_INCLUDED
NiHu::volume_element
class describing a volume element that has no normal vector
Definition: element.hpp:455
NiHu::volume_element::get_dx
dx_return_type get_dx(xi_t const &xi) const
return element location gradient
Definition: element.hpp:334
NiHu::volume_element::xi_t
domain_t::xi_t xi_t
type of the shape functions' independent variable
Definition: element.hpp:210
NiHu::jacobian_computer
Definition: jacobian_computer.hpp:8