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/p2bubble/dof_traits.hpp>
13#include <kernel/space/p2bubble/evaluator.hpp>
14#include <kernel/space/p2bubble/node_functional.hpp>
15
16namespace FEAT
17{
18 namespace Space
19 {
27 namespace P2Bubble
28 {
37 template<typename Trafo_>
38 class Element :
39 public ElementBase<Trafo_>
40 {
41 public:
45 typedef Trafo_ TrafoType;
47 typedef typename TrafoType::MeshType MeshType;
49 typedef typename TrafoType::ShapeType ShapeType;
50
52 static constexpr bool have_node_func = 1;
53
55 static constexpr int local_degree = 2;
56
59
61 template<
62 typename TrafoEvaluator_,
63 typename DataType_ = typename TrafoEvaluator_::DataType>
65 {
66 private:
68 typedef typename TrafoEvaluator_::EvalPolicy EvalPolicy;
69
71 static constexpr int num_loc_dofs = DofMappingType::dof_count;
72
75
76 public:
79 };
80
82 template<
83 int shape_dim_,
84 typename DataType_ = Real>
86 {
87 public:
90 };
91
93 template<
94 int shape_dim_,
95 typename DataType_ = Real>
97 {
99 public:
102 };
103
104 public:
111 explicit Element(TrafoType& trafo)
112 : BaseClass(trafo)
113 {
114 }
115
117 virtual ~Element()
118 {
119 }
120
123 {
124 DofMappingType dof_map(*this);
125 return dof_map.get_num_global_dofs();
126 }
127
129 static String name()
130 {
131 return "P2Bubble";
132 }
133 }; // class Element
134 } // namespace P2Bubble
135 } // namespace Space
136} // namespace FEAT
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.
Dof-Assignment class wrapper template.
Definition: element.hpp:86
DofAssignmentUniform< Element, shape_dim_, DataType_, DofTraits, ShapeType > Type
Dof-Assignment type.
Definition: element.hpp:89
Space evaluator class wrapper template.
Definition: element.hpp:65
P2Bubble::Evaluator< Element, TrafoEvaluator_, Traits > Type
space evaluator type
Definition: element.hpp:78
TrafoEvaluator_::EvalPolicy EvalPolicy
evaluation policy
Definition: element.hpp:68
static constexpr int num_loc_dofs
number of local dofs := number of vertices per cell
Definition: element.hpp:71
StandardScalarEvalTraits< EvalPolicy, num_loc_dofs, DataType_ > Traits
space evaluation traits
Definition: element.hpp:74
Node-Functional class wrapper template.
Definition: element.hpp:97
P2Bubble::NodeFunctional< Element, ShapeType, FaceType, DataType_ > Type
node functional type
Definition: element.hpp:101
P2-Bubble Finite-Element space class template.
Definition: element.hpp:40
static constexpr int local_degree
Local Polynomial degree count.
Definition: element.hpp:55
virtual ~Element()
virtual destructor
Definition: element.hpp:117
TrafoType::MeshType MeshType
mesh type
Definition: element.hpp:47
Trafo_ TrafoType
transformation type
Definition: element.hpp:45
ElementBase< Trafo_ > BaseClass
base-class typedef
Definition: element.hpp:43
DofMappingUniform< Element, P2Bubble::DofTraits, ShapeType > DofMappingType
Dof-Mapping class.
Definition: element.hpp:58
Index get_num_dofs() const
Returns the number of dofs.
Definition: element.hpp:122
static constexpr bool have_node_func
node functionals available
Definition: element.hpp:52
TrafoType::ShapeType ShapeType
shape type
Definition: element.hpp:49
Element(TrafoType &trafo)
Constructor.
Definition: element.hpp:111
static String name()
Returns the name of the element.
Definition: element.hpp:129
P2-Bubble Element Evaluator class template declaration.
Definition: evaluator.hpp:35
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