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 Lagrange3
16 {
24 template<typename Shape_, int dim_>
25 struct DofTraits
26 {
28 static constexpr int count = 0;
29 };
30
31 template<typename Shape_>
32 struct DofTraits<Shape_, 0>
33 {
35 static constexpr int count = 1;
36 };
37
38 template<int shape_dim_>
39 struct DofTraits<Shape::Simplex<shape_dim_>, 1>
40 {
42 static constexpr int count = 2;
43 };
44
45 template<int shape_dim_>
46 struct DofTraits<Shape::Simplex<shape_dim_>, 2>
47 {
49 static constexpr int count = 1;
50 };
51
52 template<int shape_dim_, int face_dim_>
53 struct DofTraits<Shape::Hypercube<shape_dim_>, face_dim_>
54 {
56 static constexpr int count = (1 << face_dim_);
57 };
58
59 // this one is only required for disambiguation
60 template<int shape_dim_>
61 struct DofTraits<Shape::Hypercube<shape_dim_>, 0>
62 {
64 static constexpr int count = 1;
65 };
66 } // namespace Lagrange3
67 } // namespace Space
68} // namespace FEAT
FEAT namespace.
Definition: adjactor.hpp:12
Lagrange-3 Dof-Traits class template.
Definition: dof_traits.hpp:26
static constexpr int count
no dofs for any shape dimension > 0
Definition: dof_traits.hpp:28