Reference documentation for deal.II version 9.0.0
Public Types | Public Member Functions | Private Attributes | List of all members
MeanValueFilter Class Reference

#include <deal.II/lac/matrix_lib.h>

Inheritance diagram for MeanValueFilter:
[legend]

Public Types

typedef types::global_dof_index size_type
 

Public Member Functions

 MeanValueFilter (const size_type component=numbers::invalid_size_type)
 
template<typename number >
void filter (Vector< number > &v) const
 
template<typename number >
void filter (BlockVector< number > &v) const
 
template<typename number >
void vmult (Vector< number > &dst, const Vector< number > &src) const
 
template<typename number >
void vmult_add (Vector< number > &dst, const Vector< number > &src) const
 
template<typename number >
void vmult (BlockVector< number > &dst, const BlockVector< number > &src) const
 
template<typename number >
void vmult_add (BlockVector< number > &dst, const BlockVector< number > &src) const
 
template<typename VectorType >
void Tvmult (VectorType &, const VectorType &) const
 
template<typename VectorType >
void Tvmult_add (VectorType &, const VectorType &) const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (const char *identifier=nullptr) const
 
void unsubscribe (const char *identifier=nullptr) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

const size_type component
 

Additional Inherited Members

- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

Mean value filter. The vmult() functions of this matrix filter out mean values of the vector. If the vector is of type BlockVector, then an additional parameter selects a single component for this operation.

In mathematical terms, this class acts as if it was the matrix \(I-\frac 1n{\mathbf 1}_n{\mathbf 1}_n^T\) where \({\mathbf 1}_n\) is a vector of size \(n\) that has only ones as its entries. Thus, taking the dot product between a vector \(\mathbf v\) and \(\frac 1n {\mathbf 1}_n\) yields the mean value of the entries of \({\mathbf v}\). Consequently, \( \left[I-\frac 1n{\mathbf 1}_n{\mathbf 1}_n^T\right] \mathbf v = \mathbf v - \left[\frac 1n {\mathbf v} \cdot {\mathbf 1}_n\right]{\mathbf 1}_n\) subtracts from every vector element the mean value of all elements.

Deprecated:
Use a LinearOperator, or a BlockLinearOperator instead. you can construct such a filter by using mean_value_filter, or block_diagonal_operator (with a mean_value_filter block), respectively.
Author
Guido Kanschat, 2002, 2003

Definition at line 54 of file matrix_lib.h.

Member Typedef Documentation

◆ size_type

Declare type for container size.

Definition at line 60 of file matrix_lib.h.

Constructor & Destructor Documentation

◆ MeanValueFilter()

MeanValueFilter::MeanValueFilter ( const size_type  component = numbers::invalid_size_type)

Constructor, optionally selecting a component.

Definition at line 21 of file matrix_lib.cc.

Member Function Documentation

◆ filter() [1/2]

template<typename number >
void MeanValueFilter::filter ( Vector< number > &  v) const

Subtract mean value from v.

◆ filter() [2/2]

template<typename number >
void MeanValueFilter::filter ( BlockVector< number > &  v) const

Subtract mean value from v.

◆ vmult() [1/2]

template<typename number >
void MeanValueFilter::vmult ( Vector< number > &  dst,
const Vector< number > &  src 
) const

Return the source vector with subtracted mean value.

◆ vmult_add() [1/2]

template<typename number >
void MeanValueFilter::vmult_add ( Vector< number > &  dst,
const Vector< number > &  src 
) const

Add source vector with subtracted mean value to dest.

◆ vmult() [2/2]

template<typename number >
void MeanValueFilter::vmult ( BlockVector< number > &  dst,
const BlockVector< number > &  src 
) const

Return the source vector with subtracted mean value in selected component.

◆ vmult_add() [2/2]

template<typename number >
void MeanValueFilter::vmult_add ( BlockVector< number > &  dst,
const BlockVector< number > &  src 
) const

Add a source to dest, where the mean value in the selected component is subtracted.

◆ Tvmult()

template<typename VectorType >
void MeanValueFilter::Tvmult ( VectorType &  ,
const VectorType &   
) const
inline

Not implemented.

Definition at line 137 of file matrix_lib.h.

◆ Tvmult_add()

template<typename VectorType >
void MeanValueFilter::Tvmult_add ( VectorType &  ,
const VectorType &   
) const
inline

Not implemented.

Definition at line 145 of file matrix_lib.h.

Member Data Documentation

◆ component

const size_type MeanValueFilter::component
private

Component for filtering block vectors.

Definition at line 126 of file matrix_lib.h.


The documentation for this class was generated from the following files: