Rheolef  7.1
an efficient C++ finite element environment
reference_element_aux.icc
Go to the documentation of this file.
1 #ifndef _RHEOLEF_REFERENCE_ELEMENT_AUX_ICC
2 #define _RHEOLEF_REFERENCE_ELEMENT_AUX_ICC
3 //
24 // utility: TODO: move in reference element as member function
25 //
26 // author: Pierre.Saramito@imag.fr
27 //
28 // date: 2 september 2017
29 //
30 // note: copied from rheolef/fem/lib/Pk.cc
31 
32 #include "rheolef/reference_element.h"
33 
34 namespace rheolef {
35 
36 template<class T>
37 void
39  reference_element hat_K,
41 {
42  switch (hat_K.variant()) {
43  case reference_element::p: c = point_basic<T> (0); break;
44  case reference_element::e: c = point_basic<T> (0.5); break;
45  case reference_element::t: c = point_basic<T> (T(1)/T(3), T(1)/T(3)); break;
46  case reference_element::q: c = point_basic<T> (0, 0); break;
47  case reference_element::T: c = point_basic<T> (0.25, 0.25, 0.25); break;
48  case reference_element::P: c = point_basic<T> (T(1)/T(3), T(1)/T(3), 0); break;
49  case reference_element::H: c = point_basic<T> (0, 0, 0); break;
50  default: error_macro ("unexpected element type `"<<hat_K.name()<<"'");
51  }
52 }
53 // TODO: move in reference_element as:
54 // reference_element::ilat2loc_inod (hat_K, degree, ilat);
55 static
56 size_t
57 ilat2loc_inod (
58  reference_element hat_K,
59  size_t degree,
60  const point_basic<size_t>& ilat)
61 {
62  switch (hat_K.variant()) {
63  case reference_element::p: return reference_element_p::ilat2loc_inod (degree, ilat);
64  case reference_element::e: return reference_element_e::ilat2loc_inod (degree, ilat);
65  case reference_element::t: return reference_element_t::ilat2loc_inod (degree, ilat);
66  case reference_element::q: return reference_element_q::ilat2loc_inod (degree, ilat);
67  case reference_element::T: return reference_element_T::ilat2loc_inod (degree, ilat);
68  case reference_element::P: return reference_element_P::ilat2loc_inod (degree, ilat);
69  case reference_element::H: return reference_element_H::ilat2loc_inod (degree, ilat);
70  }
71  return 0;
72 }
73 
74 }//namespace rheolef
75 #endif // _RHEOLEF_REFERENCE_ELEMENT_AUX_ICC
rheolef::reference_element::e
static const variant_type e
Definition: reference_element.h:76
rheolef::reference_element_t::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:413
rheolef::reference_element::H
static const variant_type H
Definition: reference_element.h:81
rheolef::point_basic
Definition: point.h:87
rheolef::reference_element_P::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:695
rheolef::reference_element_e::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:350
rheolef::reference_element_T::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:582
rheolef::reference_element::T
static const variant_type T
Definition: reference_element.h:79
rheolef::reference_element_p::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:291
rheolef::reference_element
see the reference_element page for the full documentation
Definition: reference_element.h:66
rheolef::reference_element_q::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:481
rheolef::reference_element::name
char name() const
Definition: reference_element.h:100
rheolef::reference_element::variant
variant_type variant() const
Definition: reference_element.h:99
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
error_macro
#define error_macro(message)
Definition: dis_macros.h:49
rheolef::reference_element_H::ilat2loc_inod
static size_type ilat2loc_inod(size_type order, const point_basic< size_type > &ilat)
Definition: reference_element.cc:790
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
rheolef::reference_element::p
static const variant_type p
Definition: reference_element.h:75
rheolef::reference_element::q
static const variant_type q
Definition: reference_element.h:78
rheolef::reference_element::P
static const variant_type P
Definition: reference_element.h:80
rheolef::reference_element::t
static const variant_type t
Definition: reference_element.h:77
rheolef::reference_element_barycenter
void reference_element_barycenter(reference_element hat_K, point_basic< T > &c)
Definition: reference_element_aux.icc:38
mkgeo_ball.c
int c
Definition: mkgeo_ball.sh:153
T
Expr1::float_type T
Definition: field_expr.h:261