reference_element_aux.icc
Go to the documentation of this file.
#ifndef _RHEOLEF_REFERENCE_ELEMENT_AUX_ICC
#define _RHEOLEF_REFERENCE_ELEMENT_AUX_ICC
//
// utility: TODO: move in reference element as member function
//
// author: Pierre.Saramito@imag.fr
//
// date: 2 september 2017
//
// note: copied from rheolef/fem/lib/Pk.cc
#include "rheolef/reference_element.h"
namespace rheolef {
template<class T>
void
reference_element_barycenter (
reference_element hat_K,
point_basic<T>& c)
{
switch (hat_K.variant()) {
case reference_element::p: c = point_basic<T> (0); break;
case reference_element::e: c = point_basic<T> (0.5); break;
case reference_element::t: c = point_basic<T> (T(1)/T(3), T(1)/T(3)); break;
case reference_element::q: c = point_basic<T> (0, 0); break;
case reference_element::T: c = point_basic<T> (0.25, 0.25, 0.25); break;
case reference_element::P: c = point_basic<T> (T(1)/T(3), T(1)/T(3), 0); break;
case reference_element::H: c = point_basic<T> (0, 0, 0); break;
default: error_macro ("unexpected element type `"<<hat_K.name()<<"'");
}
}
// TODO: move in reference_element as:
// reference_element::ilat2loc_inod (hat_K, degree, ilat);
static
size_t
ilat2loc_inod (
reference_element hat_K,
size_t degree,
const point_basic<size_t>& ilat)
{
switch (hat_K.variant()) {
case reference_element::p: return reference_element_p::ilat2loc_inod (degree, ilat);
case reference_element::e: return reference_element_e::ilat2loc_inod (degree, ilat);
case reference_element::t: return reference_element_t::ilat2loc_inod (degree, ilat);
case reference_element::q: return reference_element_q::ilat2loc_inod (degree, ilat);
case reference_element::T: return reference_element_T::ilat2loc_inod (degree, ilat);
case reference_element::P: return reference_element_P::ilat2loc_inod (degree, ilat);
case reference_element::H: return reference_element_H::ilat2loc_inod (degree, ilat);
}
return 0;
}
}//namespace rheolef
#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
mkgeo_ball.c
c
Definition: mkgeo_ball.sh:153
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
T
Expr1::float_type T
Definition: field_expr.h:218