FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
dof_mapping_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
11namespace FEAT
12{
13 namespace Space
14 {
33 template<typename Space_>
35 {
36 public:
38 typedef Space_ SpaceType;
40 typedef typename SpaceType::ShapeType ShapeType;
41
42 protected:
47
49 explicit DofMappingBase(const SpaceType& space) :
50 _space(space),
52 {
53 }
54
55 public:
56
63 void prepare(Index cell_index)
64 {
65 _cell_index = cell_index;
66 }
67
71 void finish()
72 {
73 // reset cell index
75 }
76
81 {
82 return _cell_index;
83 }
84
85#ifdef DOXYGEN
92 int get_num_local_dofs() const;
93
101
111 Index get_index(int local_dof_idx) const;
112#endif // DOXYGEN
113 }; // class DofMappingBase<...>
114 } // namespace Space
115} // namespace FEAT
Mapping from mesh cells to Dof that have support on them.
DofMappingBase(const SpaceType &space)
constructor
const SpaceType & _space
space reference
SpaceType::ShapeType ShapeType
shape typedef
void finish()
Releases the dof-mapping from the current cell.
int get_num_local_dofs() const
Returns the number of local dofs.
void prepare(Index cell_index)
Prepares the dof-mapping for a given cell.
Index get_current_cell_index() const
Returns the current cell-index.
Index _cell_index
currently active cell index
Index get_num_global_dofs() const
Return the number of global dofs.
Index get_index(int local_dof_idx) const
Returns the mapped dof index.
Space_ SpaceType
space typedef
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.