FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
node_functional_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/base.hpp>
10#include <kernel/analytic/function.hpp>
11
12namespace FEAT
13{
14 namespace Space
15 {
26 template<
27 typename Space_,
28 typename DataType_>
30 {
31 public:
33 typedef Space_ SpaceType;
35 typedef DataType_ DataType;
36
37#ifdef DOXYGEN
39 static constexpr Index max_assigned_dofs = ...
40#endif // DOXYGEN
41
42 protected:
44 const SpaceType& _space;
47
49 explicit NodeFunctionalBase(const SpaceType& space) :
50 _space(space),
52 {
53 }
54
55 public:
62 void prepare(Index cell_index)
63 {
64 _cell_index = cell_index;
65 }
66
70 void finish()
71 {
73 }
74
75#ifdef DOXYGEN
80
103 template<
104 typename NodeData_,
105 typename Function_>
106 void operator()(NodeData_& node_data, const Function_& function) const;
107#endif // DOXYGEN
108 }; // class NodeFunctionalBase<...>
109
117 template<
118 typename Space_,
119 typename DataType_>
121 public NodeFunctionalBase<Space_, DataType_>
122 {
123 public:
124 static constexpr Index max_assigned_dofs = Index(0);
125
126 private:
129
130 public:
132 explicit NodeFunctionalNull(const Space_& space) :
133 BaseClass(space)
134 {
135 }
136
139 {
140 return max_assigned_dofs;
141 }
142
144 template<
145 typename NodeData_,
146 typename Function_>
147 void operator()(NodeData_& DOXY(node_data), const Function_& DOXY(function)) const
148 {
149 XABORTM("invalid call of NodeFunctionalNull::operator()()");
150 }
151 }; // class NodeFunctionalNull<...>
152 } // namespace Space
153} // namespace FEAT
#define XABORTM(msg)
Abortion macro definition with custom message.
Definition: assertion.hpp:192
Node-functional base class template.
Index _cell_index
currently active cell index
void finish()
Releases the node-functional from the current cell.
void operator()(NodeData_ &node_data, const Function_ &function) const
Evaluation operator.
NodeFunctionalBase(const SpaceType &space)
protected constructor
void prepare(Index cell_index)
Prepares the node-functional for a given cell.
static constexpr Index max_assigned_dofs
specifies the maximum number of assigned DOFs
int get_num_assigned_dofs() const
Returns the number of assigned dofs on the current cell.
Null-Node-Functional class template.
NodeFunctionalNull(const Space_ &space)
constructor
int get_num_assigned_dofs() const
Returns the number of assigned dofs on the current cell.
NodeFunctionalBase< Space_, DataType_ > BaseClass
base-class typedef
void operator()(NodeData_ &node_data, const Function_ &function) const
Evaluation operator.
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.