FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
element_base.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/dof_mapping_base.hpp>
10#include <kernel/space/evaluator_base.hpp>
11
12namespace FEAT
13{
14 namespace Space
15 {
23 template<typename Trafo_>
25 {
26 public:
28 typedef Trafo_ TrafoType;
30 typedef typename TrafoType::MeshType MeshType;
32 typedef typename TrafoType::ShapeType ShapeType;
33
35 static constexpr int shape_dim = ShapeType::dimension;
37 static constexpr int world_dim = MeshType::world_dim;
38
39 /*
40 * \brief Specifies whether the element has node functionals
41 *
42 * If this value is 1, the element implements node functionals, i.e. the Type member of the
43 * nested NodeFunctional class template is defined.
44 */
45 static constexpr bool have_node_func = false;
46
47 // Note:
48 // The following block serves as an element interface documentation and is therefore only
49 // visible to doxygen. The actual functionality has to be supplied by the implementation.
50#ifdef DOXYGEN
61 template<
62 typename TrafoEvaluator_,
63 typename DataType_ = typename TrafoEvaluator_::DataType>
65 {
66 public:
68 typedef ... Type;
69 };
70
80 static constexpr int local_degree = ...;
81
85 typedef ... DofMappingType;
86
96 template<
97 int shape_dim_,
98 typename DataType_ = Real>
100 {
101 public:
103 typedef ... Type;
104 };
105
119 template<
120 int shape_dim_,
121 typename DataType_ = Real>
123 {
124 public:
126 typedef ... Type;
127 };
128
136
140 String name() const;
141#endif // DOXYGEN
142
143 private:
148
149 protected:
152
161 explicit ElementBase(TrafoType& trafo)
162 : _trafo(trafo)
163 {
164 }
165
166 public:
174 {
175 return _trafo;
176 }
177
179 const TrafoType& get_trafo() const
180 {
181 return _trafo;
182 }
183
191 {
192 return get_trafo().get_mesh();
193 }
194
196 const MeshType& get_mesh() const
197 {
198 return get_trafo().get_mesh();
199 }
200
209 bool operator==(const ElementBase& other) const
210 {
211 return this == &other;
212 }
213 }; // class ElementBase<...>
214 } // namespace Space
215} // namespace FEAT
Dof-Assignment class wrapper template.
Space evaluator class wrapper template.
typedef Type
space evaluator type
Node-Functional class wrapper template.
typedef Type
node-functional type
Finite-Element base class.
MeshType & get_mesh()
Returns a reference to the underlying mesh.
TrafoType::ShapeType ShapeType
shape type
ElementBase(const ElementBase &)
deleted copy-constructor
ElementBase & operator=(const ElementBase &)
deleted assignment-operator
Index get_num_dofs() const
Returns the number of dofs.
ElementBase(TrafoType &trafo)
Constructor.
static constexpr int shape_dim
shape dimension
TrafoType & _trafo
transformation reference
const MeshType & get_mesh() const
Returns a reference to the underlying mesh.
static constexpr int local_degree
Local Polynomial degree count.
typedef DofMappingType
Dof-Mapping class.
TrafoType::MeshType MeshType
mesh type
String name() const
Returns the name of the element.
const TrafoType & get_trafo() const
Returns a reference to the trafo.
static constexpr int world_dim
our image/world dimension
Trafo_ TrafoType
transformation type
bool operator==(const ElementBase &other) const
Comparison operator.
TrafoType & get_trafo()
Returns a reference to the trafo.
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.