FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
dof_traits.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
9#include <kernel/shape.hpp>
10
11namespace FEAT
12{
13 namespace Space
14 {
15 namespace Hermite3
16 {
22 template<typename Shape_, int dim_>
23 struct DofTraits
24 {
25 static constexpr int count = 0;
26 };
27
28 template<int shape_dim_>
29 struct DofTraits<Shape::Simplex<shape_dim_>, 0>
30 {
32 static constexpr int count = shape_dim_ + 1;
33 };
34
35 template<int shape_dim_>
36 struct DofTraits<Shape::Simplex<shape_dim_>, shape_dim_>
37 {
39 static constexpr int count = MetaMath::Binomial<shape_dim_ + 3, 3>::value - (shape_dim_ + 1)*(shape_dim_ + 1);
40 };
41
42 template<int shape_dim_>
43 struct DofTraits<Shape::Hypercube<shape_dim_>, 0>
44 {
46 static constexpr int count = shape_dim_ + 1;
47 };
48
49 template<int shape_dim_>
50 struct DofTraits<Shape::Hypercube<shape_dim_>, shape_dim_>
51 {
53 static constexpr int count = ((1 << shape_dim_) - (shape_dim_ + 1)) * (1 << shape_dim_);
54 };
55 } // namespace Hermite3
56 } // namespace Space
57} // namespace FEAT
FEAT namespace.
Definition: adjactor.hpp:12
Binomial template meta-program.
Definition: meta_math.hpp:69
Hermite-3 Dof-Traits class template.
Definition: dof_traits.hpp:24