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/cai_dou_san_she_ye/dof_traits.hpp>
13#include <kernel/space/cai_dou_san_she_ye/evaluator.hpp>
14#include <kernel/space/cai_dou_san_she_ye/node_functional.hpp>
15
16namespace FEAT
17{
18 namespace Space
19 {
23 namespace CaiDouSanSheYe
24 {
40 template<typename Trafo_>
41 class Element :
42 public ElementBase<Trafo_>
43 {
44 public:
48 typedef Trafo_ TrafoType;
50 typedef typename TrafoType::MeshType MeshType;
52 typedef typename TrafoType::ShapeType ShapeType;
53
55 static constexpr bool have_node_func = true;
56
58 static constexpr int local_degree = 2;
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 = Shape::FaceTraits<ShapeType, ShapeType::dimension-1>::count + 1;
72
75
76 public:
79 };
80
83
85 template<
86 int shape_dim_,
87 typename DataType_ = Real>
89 {
90 public:
93 };
94
96 template<
97 int shape_dim_,
98 typename DataType_ = Real>
100 {
101 private:
103 static constexpr int codim = ShapeType::dimension - shape_dim_;
104
105 public:
108 };
109
110 public:
117 explicit Element(TrafoType& trafo)
118 : BaseClass(trafo)
119 {
120 }
121
123 virtual ~Element()
124 {
125 }
126
129 {
130 // number of DOFs = number of facets in the mesh + number of elements
131 return this->get_mesh().get_num_entities(ShapeType::dimension - 1) + this->get_mesh().get_num_elements();
132 }
133
135 static String name()
136 {
137 return "CaiDouSanSheYe";
138 }
139 }; // class Element
140 } // namespace CaiDouSanSheYe
141 } // namespace Space
142} // namespace FEAT
Dof-Assignment class wrapper template.
Definition: element.hpp:89
DofAssignmentUniform< Element, shape_dim_, DataType_, DofTraits, ShapeType > Type
Dof-Assignment type.
Definition: element.hpp:92
Space evaluator class wrapper template.
Definition: element.hpp:65
CaiDouSanSheYe::Evaluator< Element, TrafoEvaluator_, Traits > Type
space evaluator type
Definition: element.hpp:78
TrafoEvaluator_::EvalPolicy EvalPolicy
evaluation policy
Definition: element.hpp:68
StandardScalarEvalTraits< EvalPolicy, num_loc_dofs, DataType_ > Traits
space evaluation traits
Definition: element.hpp:74
static constexpr int num_loc_dofs
number of local dofs := number of facets per cell
Definition: element.hpp:71
Node-Functional class wrapper template.
Definition: element.hpp:100
CaiDouSanSheYe::NodeFunctional< Element, ShapeType, codim, DataType_ > Type
node functional type
Definition: element.hpp:107
static constexpr int codim
co-dimension
Definition: element.hpp:103
Cai-Douglas-Santos-Sheen-Ye element class template.
Definition: element.hpp:43
Trafo_ TrafoType
transformation type
Definition: element.hpp:48
Element(TrafoType &trafo)
Constructor.
Definition: element.hpp:117
TrafoType::ShapeType ShapeType
shape type
Definition: element.hpp:52
static constexpr bool have_node_func
node functionals available
Definition: element.hpp:55
static String name()
Returns the name of the element.
Definition: element.hpp:135
static constexpr int local_degree
Local Polynomial degree count.
Definition: element.hpp:58
Index get_num_dofs() const
Returns the number of dofs.
Definition: element.hpp:128
ElementBase< Trafo_ > BaseClass
base-class typedef
Definition: element.hpp:46
virtual ~Element()
virtual destructor
Definition: element.hpp:123
TrafoType::MeshType MeshType
mesh type
Definition: element.hpp:50
DofMappingUniform< Element, CaiDouSanSheYe::DofTraits, ShapeType > DofMappingType
Dof-Mapping class.
Definition: element.hpp:82
Cai-Douglas-Santos-Sheen-Ye Element Evaluator class template declaration.
Definition: evaluator.hpp:34
Uniform Dof-Assignment class template.
Uniform 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.
Face traits tag struct template.
Definition: shape.hpp:106