FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
element.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/space/element_base.hpp>
10#include <kernel/space/dof_assignment_base.hpp>
11#include <kernel/space/dof_mapping_common.hpp>
12#include <kernel/space/bernstein2/dof_traits.hpp>
13#include <kernel/space/bernstein2/evaluator.hpp>
14#include <kernel/space/bernstein2/node_functional.hpp>
15
16namespace FEAT
17{
18 namespace Space
19 {
26 namespace Bernstein2
27 {
36 template<typename Trafo_>
37 class Element :
38 public ElementBase<Trafo_>
39 {
40 public:
44 typedef Trafo_ TrafoType;
46 typedef typename TrafoType::MeshType MeshType;
48 typedef typename TrafoType::ShapeType ShapeType;
49
51 static constexpr bool have_node_func = 1;
52
54 static constexpr int local_degree = 2;
55
58
60 template<
61 typename TrafoEvaluator_,
62 typename DataType_ = typename TrafoEvaluator_::DataType>
64 {
65 private:
67 typedef typename TrafoEvaluator_::EvalPolicy EvalPolicy;
68
70 static constexpr int num_loc_dofs = DofMappingType::dof_count;
71
74
75 public:
78 };
79
81 template<
82 int shape_dim_,
83 typename DataType_ = Real>
85 {
86 public:
89 };
90
92 template<
93 int shape_dim_,
94 typename DataType_ = Real>
96 {
98 public:
101 };
102
103 public:
110 explicit Element(TrafoType& trafo)
111 : BaseClass(trafo)
112 {
113 }
114
116 virtual ~Element()
117 {
118 }
119
122 {
123 DofMappingType dof_map(*this);
124 return dof_map.get_num_global_dofs();
125 }
126
128 static String name()
129 {
130 return "Bernstein2";
131 }
132 }; // class Element
133 } // namespace Bernstein2
134 } // namespace Space
135} // namespace FEAT
Dof-Assignment class wrapper template.
Definition: element.hpp:85
DofAssignmentUniform< Element, shape_dim_, DataType_, DofTraits, ShapeType > Type
Dof-Assignment type.
Definition: element.hpp:88
Space evaluator class wrapper template.
Definition: element.hpp:64
TrafoEvaluator_::EvalPolicy EvalPolicy
evaluation policy
Definition: element.hpp:67
static constexpr int num_loc_dofs
number of local dofs := number of vertices per cell
Definition: element.hpp:70
Bernstein2::Evaluator< Element, TrafoEvaluator_, Traits > Type
space evaluator type
Definition: element.hpp:77
StandardScalarEvalTraits< EvalPolicy, num_loc_dofs, DataType_ > Traits
space evaluation traits
Definition: element.hpp:73
Node-Functional class wrapper template.
Definition: element.hpp:96
Bernstein2::NodeFunctional< Element, FaceType, DataType_ > Type
node functional type
Definition: element.hpp:100
Standard Bernstein-2 Finite-Element space class template.
Definition: element.hpp:39
Index get_num_dofs() const
Returns the number of dofs.
Definition: element.hpp:121
static String name()
Returns the name of the element.
Definition: element.hpp:128
static constexpr int local_degree
Local Polynomial degree count.
Definition: element.hpp:54
static constexpr bool have_node_func
node functionals available
Definition: element.hpp:51
TrafoType::ShapeType ShapeType
shape type
Definition: element.hpp:48
ElementBase< Trafo_ > BaseClass
base-class typedef
Definition: element.hpp:42
TrafoType::MeshType MeshType
mesh type
Definition: element.hpp:46
DofMappingUniform< Element, Bernstein2::DofTraits, ShapeType > DofMappingType
Dof-Mapping class.
Definition: element.hpp:57
Trafo_ TrafoType
transformation type
Definition: element.hpp:44
virtual ~Element()
virtual destructor
Definition: element.hpp:116
Element(TrafoType &trafo)
Constructor.
Definition: element.hpp:110
Bernstein-2 Element Evaluator class template declaration.
Definition: evaluator.hpp:36
Uniform Dof-Assignment class template.
Uniform Dof-Mapping class template.
Index get_num_global_dofs() const
Return the number of global dofs.
Finite-Element base class.
Standard scalar evaluator traits class template.
Definition: base.hpp:44
String class implementation.
Definition: string.hpp:46
FEAT namespace.
Definition: adjactor.hpp:12
double Real
Real data type.
std::uint64_t Index
Index data type.
Face traits tag struct template.
Definition: shape.hpp:106