10#include <kernel/lafem/sparse_matrix_bcsr.hpp>
11#include <kernel/lafem/dense_vector_blocked.hpp>
12#include <kernel/lafem/sparse_vector_blocked.hpp>
13#include <kernel/lafem/arch/slip_filter_block.hpp>
81 template <
typename DT2_ = DT_,
typename IT2_ = IT_>
85 template <
typename DT2_ = DT_,
typename IT2_ = IT_>
88 static_assert(
block_size > 1,
"block_size has to be >= 2 in SlipFilter!");
122 _nu(std::move(other.
_nu)),
132 _sv = std::forward<
decltype(other._sv)>(other._sv);
133 _nu = std::forward<
decltype(other._nu)>(other._nu);
147 other.clone(*
this, clone_mode);
154 _nu.clone(other.get_nu(), clone_mode);
155 _sv.clone(other.get_filter_vector(), clone_mode);
159 template<
typename DT2_,
typename IT2_,
int BS_>
162 _nu.convert(other.get_nu());
163 _sv.convert(other.get_filter_vector());
176 return _nu.bytes() +
_sv.bytes();
184 const SparseVectorBlocked<DT_, IT_, block_size>& get_filter_vector()
const
189 SparseVectorBlocked<DT_, IT_, block_size>& get_nu()
193 const SparseVectorBlocked<DT_, IT_, block_size>& get_nu()
const
208 return _sv.size_raw();
214 return _sv.num_nzes();
220 return _sv.num_nzes_raw();
249 Arch::SlipFilterBlock::template exec<DT_, IT_, block_size_>(
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Blocked Dense data vector class template.
Index size() const
Returns the size of this vector, i.e. its number of entries.
Memory::Arbiter & elements_arbiter()
Returns a reference to the element array arbiter.
Slip Filter class template.
DT_ DataType
data-type typedef
Index size() const
Returns the total native size of the filter.
void convert(const SlipFilter< DT2_, IT2_, BS_ > &other)
Converts data from another UnitFilter.
void filter_rhs(VectorType &vector) const
Applies the filter onto the right-hand-side vector.
Index num_nzes_raw() const
Returns the raw number of non-zero entries in the filter.
SparseVectorBlocked< DT_, IT_, block_size_ > _sv
This will contain the data for filtering.
Tiny::Vector< DataType, block_size > ValueType
Value type.
SparseVectorBlocked< DT_, IT_, block_size_ > _nu
This will contain the pointwise outer unit normal in all vertices.
void filter_sol(VectorType &vector) const
Applies the filter onto the solution vector.
Index size_raw() const
Returns the total raw size of the filter.
void clear()
Clears the underlying data (namely the SparseVector)
bool hollow() const
Checks whether the filter does not contain any non-zero elements.
void clone(const SlipFilter &other, CloneMode clone_mode=CloneMode::Deep)
Clones data from another SlipFilter.
void filter_def(VectorType &vector) const
Applies the filter onto a defect vector.
IT_ IndexType
index-type typedef
static constexpr int block_size
The block size.
std::size_t bytes() const
Returns the total amount of bytes allocated.
SlipFilter & operator=(SlipFilter &&other)
move-assignment operator
Index num_nzes() const
Returns the number of non-zero entries in the filter.
SlipFilter clone(CloneMode clone_mode=CloneMode::Deep) const
Creates a clone of itself.
DenseVectorBlocked< DT_, IT_, block_size_ > VectorType
Our supported vector type.
SlipFilter(SlipFilter &&other)
move-ctor
SlipFilter()
default constructor
SlipFilter(Index num_vertices, Index num_dofs, Index num_nzes)
Constructor.
void filter_cor(VectorType &vector) const
Applies the filter onto a correction vector.
virtual ~SlipFilter()
virtual destructor
bool empty() const
Checks whether the size of the filter is zero.
Sparse vector class template.
Tiny Vector class template.
std::uint64_t Index
Index data type.