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/discontinuous/dof_traits.hpp>
13#include <kernel/space/discontinuous/evaluator.hpp>
14#include <kernel/space/discontinuous/node_functional.hpp>
15
16namespace FEAT
17{
18 namespace Space
19 {
23 namespace Discontinuous
24 {
33 template<
34 typename Trafo_,
35 typename Variant_ = Variant::StdPolyP<0> >
36 class Element :
37 public ElementBase<Trafo_>
38 {
39 public:
43 typedef Trafo_ TrafoType;
45 typedef typename TrafoType::MeshType MeshType;
47 typedef typename TrafoType::ShapeType ShapeType;
49 typedef Variant_ VariantTag;
50
52 static constexpr bool have_node_func = true;
53
55 static constexpr int local_degree = VariantTag::local_degree;
56
58 static constexpr int num_local_dofs = DofTraits<DofTag<ShapeType, VariantTag>, ShapeType::dimension>::count;
59
61 template<
62 typename TrafoEvaluator_,
63 typename DataType_ = typename TrafoEvaluator_::DataType>
65 {
66 private:
68 typedef typename TrafoEvaluator_::EvalPolicy EvalPolicy;
69
72
73 public:
76 };
77
80
82 template<
83 int shape_dim_,
84 typename DataType_ = Real>
86 {
87 public:
89 //typedef DofAssignmentSingleEntity<Element, shape_dim_, DataType_, ShapeType::dimension> Type;
91 };
92
94 template<
95 int shape_dim_,
96 typename DataType_ = Real>
98 {
99 private:
101 static constexpr int codim = ShapeType::dimension - shape_dim_;
102
103 public:
106 };
107
108 public:
115 explicit Element(TrafoType& trafo)
116 : BaseClass(trafo)
117 {
118 }
119
121 virtual ~Element()
122 {
123 }
124
127 {
128 // number of DOFs = number of cells in the mesh
129 return this->get_mesh().get_num_entities(ShapeType::dimension) * Index(num_local_dofs);
130 }
131
133 static String name()
134 {
135 return String("Discontinuous<") + Variant_::name() + ">";
136 }
137
138 }; // class Element
139
145 template<typename Trafo_>
147
153 template<typename Trafo_>
155 } // namespace Discontinuous
156 } // namespace Space
157} // namespace FEAT
Dof-Assignment class wrapper template.
Definition: element.hpp:86
DofAssignmentUniform< Element, shape_dim_, DataType_, DofTraits, DofTag< ShapeType, VariantTag > > Type
Dof-Assignment type.
Definition: element.hpp:90
Space evaluator class wrapper template.
Definition: element.hpp:65
TrafoEvaluator_::EvalPolicy EvalPolicy
evaluation policy
Definition: element.hpp:68
Discontinuous::Evaluator< Element, TrafoEvaluator_, Traits, VariantTag > Type
space evaluator type
Definition: element.hpp:75
StandardScalarEvalTraits< EvalPolicy, num_local_dofs, DataType_ > Traits
space evaluation traits
Definition: element.hpp:71
Node-Functional class wrapper template.
Definition: element.hpp:98
Discontinuous::NodeFunctional< Element, codim, VariantTag, DataType_ > Type
node functional type
Definition: element.hpp:105
static constexpr int codim
co-dimension
Definition: element.hpp:101
Discontinuous Finite-Element space class template.
Definition: element.hpp:38
static constexpr bool have_node_func
node functionals available
Definition: element.hpp:52
Trafo_ TrafoType
transformation type
Definition: element.hpp:43
ElementBase< Trafo_ > BaseClass
base-class typedef
Definition: element.hpp:41
Element(TrafoType &trafo)
Constructor.
Definition: element.hpp:115
static constexpr int num_local_dofs
number of local dofs
Definition: element.hpp:58
Index get_num_dofs() const
Returns the number of dofs.
Definition: element.hpp:126
static String name()
Returns the name of the element.
Definition: element.hpp:133
static constexpr int local_degree
Local Polynomial degree count.
Definition: element.hpp:55
Variant_ VariantTag
variant of the element
Definition: element.hpp:49
DofMappingSingleEntity< Element, 0, num_local_dofs > DofMappingType
Dof-Mapping class.
Definition: element.hpp:79
TrafoType::MeshType MeshType
mesh type
Definition: element.hpp:45
virtual ~Element()
virtual destructor
Definition: element.hpp:121
TrafoType::ShapeType ShapeType
shape type
Definition: element.hpp:47
Uniform Dof-Assignment class template.
Single-Entity Dof-Mapping class template.
Finite-Element base class.
MeshType & get_mesh()
Returns a reference to the underlying mesh.
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.
Discontinuous Dof-Traits class template.
Definition: dof_traits.hpp:29