Reference documentation for deal.II version GIT 969cfe8cd8 2022-06-28 20:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | List of all members
MGSmootherIdentity< VectorType > Class Template Reference

#include <deal.II/multigrid/mg_smoother.h>

Inheritance diagram for MGSmootherIdentity< VectorType >:
[legend]

Public Member Functions

virtual void smooth (const unsigned int level, VectorType &u, const VectorType &rhs) const
 
virtual void clear ()
 
virtual void apply (const unsigned int level, VectorType &u, const VectorType &rhs) const
 

Subscriptor functionality

Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class.

void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 
std::atomic< unsigned int > counter
 
std::map< std::string, unsigned int > counter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 
static std::mutex mutex
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
void check_no_subscribers () const noexcept
 

Detailed Description

template<typename VectorType>
class MGSmootherIdentity< VectorType >

Smoother doing nothing. This class is not useful for many applications other than for testing some multigrid procedures. Also some applications might get convergence without smoothing and then this class brings you the cheapest possible multigrid.

Definition at line 138 of file mg_smoother.h.

Member Function Documentation

◆ smooth()

template<typename VectorType >
virtual void MGSmootherIdentity< VectorType >::smooth ( const unsigned int  level,
VectorType &  u,
const VectorType &  rhs 
) const
virtual

Implementation of the interface for Multigrid. This function does nothing, which by comparison with the definition of this function means that the smoothing operator equals the null operator.

Implements MGSmootherBase< VectorType >.

◆ clear()

template<typename VectorType >
virtual void MGSmootherIdentity< VectorType >::clear ( )
virtual

Release matrices.

Implements MGSmootherBase< VectorType >.

◆ apply()

template<typename VectorType >
void MGSmootherBase< VectorType >::apply ( const unsigned int  level,
VectorType &  u,
const VectorType &  rhs 
) const
virtualinherited

As opposed to the smooth() function, this function applies the action of the smoothing, overwriting the previous content in the vector u. This function must be equivalent to the following code

u = 0;
smooth(level, u, rhs);
virtual void smooth(const unsigned int level, VectorType &u, const VectorType &rhs) const
unsigned int level
Definition: grid_out.cc:4607

but can usually be implemented more efficiently than the former. If a particular smoother does not override the apply() method, the default implementation as described here is used.

In the multigrid preconditioner interfaces, the apply() method is used for the pre-smoothing operation because the previous content in the solution vector needs to be overwritten for a new incoming residual. On the other hand, all subsequent operations need to smooth the content already present in the vector u given the right hand side, which is done by smooth().

Reimplemented in MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >, mg::SmootherRelaxation< RelaxationType, VectorType >, and MGSmootherRelaxation< MatrixType, RelaxationType, VectorType >.

Definition at line 35 of file mg_base.cc.


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