FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
none_filter.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/lafem/dense_vector.hpp>
10#include <kernel/lafem/dense_vector_blocked.hpp>
11
12namespace FEAT
13{
14 namespace LAFEM
15 {
25 template<
26 typename DataType_,
27 typename IndexType_ = Index>
29 {
30 public:
32 typedef DataType_ DataType;
34 typedef IndexType_ IndexType;
35
38
40 template <typename DT2_ = DataType_, typename IT2_ = IndexType_>
42
44 template <typename DataType2_, typename IndexType2_>
46
47 static constexpr bool is_global = false;
48 static constexpr bool is_local = true;
49
52
54 NoneFilter clone(CloneMode /*clone_mode*/ = CloneMode::Deep) const
55 {
56 return NoneFilter();
57 }
58
60 void clone(const NoneFilter & /*other*/, CloneMode /*clone_mode*/ = CloneMode::Deep)
61 {
62 // do nothing
63 }
64
65 template<typename DT2_, typename IT2_>
66 void convert(const NoneFilter<DT2_, IT2_>&)
67 {
68 }
69
71 std::size_t bytes() const
72 {
73 return 0;
74 }
75
82 void filter_rhs(VectorType& DOXY(vector)) const
83 {
84 }
85
92 void filter_sol(VectorType& DOXY(vector)) const
93 {
94 }
95
102 void filter_def(VectorType& DOXY(vector)) const
103 {
104 }
105
112 void filter_cor(VectorType& DOXY(vector)) const
113 {
114 }
115
122 template<typename MT_>
123 void filter_mat(MT_& DOXY(matrix)) const
124 {
125 }
126
134 Index size() const
135 {
136 return size_info;
137 }
138
147 {
148 return size();
149 }
150 }; // class NoneFilter<...>
151
161 template<
162 typename DataType_,
163 typename IndexType_,
164 int block_size_
165 >
167 {
168 public:
170 typedef DataType_ DataType;
172 typedef IndexType_ IndexType;
173
174 static constexpr int block_size = block_size_;
175
178
180 template <typename DT2_ = DataType_, typename IT2_ = IndexType_, int BS_ = block_size_>
182
184 template <typename DataType2_, typename IndexType2_, int block_size2_>
186
189
192 {
193 return NoneFilterBlocked();
194 }
195
197 void clone(const NoneFilterBlocked & /*other*/, CloneMode /*clone_mode*/ = CloneMode::Deep)
198 {
199 // do nothing
200 }
201
202 template<typename DT2_, typename IT2_>
204 {
205 }
206
208 std::size_t bytes() const
209 {
210 return 0;
211 }
212
219 void filter_rhs(VectorType& DOXY(vector)) const
220 {
221 }
222
229 void filter_sol(VectorType& DOXY(vector)) const
230 {
231 }
232
239 void filter_def(VectorType& DOXY(vector)) const
240 {
241 }
242
249 void filter_cor(VectorType& DOXY(vector)) const
250 {
251 }
252
259 template<typename MT_>
260 void filter_mat(MT_& DOXY(matrix)) const
261 {
262 }
263
271 Index size() const
272 {
273 return size_info;
274 }
275
284 {
285 return block_size * size_info;
286 }
287 }; // class NoneFilterBlocked<...>
288 } // namespace LAFEM
289} // namespace FEAT
Blocked Dense data vector class template.
Dense data vector class template.
Blocked None Filter class template.
NoneFilterBlocked clone(CloneMode=CloneMode::Deep) const
Creates a (empty) clone of itself.
void clone(const NoneFilterBlocked &, CloneMode=CloneMode::Deep)
Clones data from another NoneFilterBlocked.
void filter_def(VectorType &vector) const
Applies the filter onto a defect vector.
Index size() const
Gets optional size information.
DataType_ DataType
data-type typedef
Index size_info
Size of the space this filter usually acts upon, to be set by user.
IndexType_ IndexType
index-type typedef
void filter_rhs(VectorType &vector) const
Applies the filter onto the right-hand-side vector.
void filter_mat(MT_ &matrix) const
Applies the filter onto a system matrix.
void filter_sol(VectorType &vector) const
Applies the filter onto the solution vector.
DenseVectorBlocked< DataType, IndexType, block_size > VectorType
our supported vector type
void filter_cor(VectorType &vector) const
Applies the filter onto a correction vector.
std::size_t bytes() const
Returns the total amount of bytes allocated.
Index size_raw() const
Gets optional raw size information.
None Filter class template.
Definition: none_filter.hpp:29
void filter_rhs(VectorType &vector) const
Applies the filter onto the right-hand-side vector.
Definition: none_filter.hpp:82
DataType_ DataType
data-type typedef
Definition: none_filter.hpp:32
void filter_sol(VectorType &vector) const
Applies the filter onto the solution vector.
Definition: none_filter.hpp:92
void filter_mat(MT_ &matrix) const
Applies the filter onto a system matrix.
NoneFilter clone(CloneMode=CloneMode::Deep) const
Creates a (empty) clone of itself.
Definition: none_filter.hpp:54
Index size() const
Gets optional size information.
IndexType_ IndexType
index-type typedef
Definition: none_filter.hpp:34
DenseVector< DataType, IndexType > VectorType
our supported vector type
Definition: none_filter.hpp:37
void clone(const NoneFilter &, CloneMode=CloneMode::Deep)
Clones data from another NoneFilter.
Definition: none_filter.hpp:60
Index size_raw() const
Gets optional raw size information.
Index size_info
Size of the space this filter usually acts upon, to be set by user.
Definition: none_filter.hpp:51
void filter_def(VectorType &vector) const
Applies the filter onto a defect vector.
void filter_cor(VectorType &vector) const
Applies the filter onto a correction vector.
std::size_t bytes() const
Returns the total amount of bytes allocated.
Definition: none_filter.hpp:71
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.