9#include <kernel/lafem/dense_vector.hpp>
10#include <kernel/util/dist.hpp>
21 template<
typename DT_,
typename IT_>
33 template<
typename DT2_,
typename IT2_>
37 template <
typename DataType2_,
typename IndexType2_>
137 _comm = other.get_comm();
145 template<
typename DT2_,
typename IT2_>
148 if((
void*)
this == (
void*)&other)
151 _comm = other.get_comm();
194 const Dist::Comm* get_comm()
const
200 std::size_t bytes()
const
void allreduce(const void *sendbuf, void *recvbuf, std::size_t count, const Datatype &datatype, const Operation &op) const
Blocking All-Reduce.
Mean Filter class template.
void filter_rhs(VectorType &vector) const
Applies the filter onto the right-hand-side vector.
virtual ~MeanFilter()
virtual destructor
const Dist::Comm * _comm
communicator
DataType _volume
weight volume
VectorType _vec_prim
primal weighting vector
MeanFilter & operator=(MeanFilter &&other)
move-assign operator
VectorType _vec_freq
frequency vector
void clone(const MeanFilter &other, LAFEM::CloneMode clone_mode=LAFEM::CloneMode::Deep)
Clones data from another MeanFilter.
VectorType::IndexType IndexType
index-type typedef
void convert(const MeanFilter< DT2_, IT2_ > &other)
Conversion method.
VectorType _vec_dual
dual weighting vector
void filter_cor(VectorType &vector) const
Applies the filter onto a correction vector.
void filter_def(VectorType &vector) const
Applies the filter onto a defect vector.
void filter_sol(VectorType &vector) const
Applies the filter onto the solution vector.
MeanFilter(VectorType &&vec_prim, VectorType &&vec_dual, VectorType &&vec_freq, const Dist::Comm *comm)
Constructor.
LAFEM::DenseVector< DT_, IT_ > VectorType
vector-type typedef
MeanFilter clone(LAFEM::CloneMode clone_mode=LAFEM::CloneMode::Deep) const
Creates a clone of itself.
VectorType::DataType DataType
data-type typedef
MeanFilter(MeanFilter &&other)
move ctor
std::size_t bytes() const
Returns the total amount of bytes allocated.
bool empty() const
Checks whether the container is empty.
Dense data vector class template.
void convert(const DenseVector< DT2_, IT2_ > &other)
Conversion method.
DataType dot(const DenseVector &x) const
Calculate .
DataType triple_dot(const DenseVector &x, const DenseVector &y) const
Calculate .
DT_ DataType
Our datatype.
IT_ IndexType
Our indextype.
void axpy(const DenseVector &x, const DT_ alpha=DT_(1))
Calculate .
DenseVector clone(CloneMode clone_mode=CloneMode::Deep) const
Clone operation.
const Operation op_sum(MPI_SUM)
Operation wrapper for MPI_SUM.