Public Member Functions | |
MGSmootherContinuous (const MGDoFHandler< 1, 1 > &mg_dof, const unsigned int steps) | |
template<int dim, int spacedim> | |
MGSmootherContinuous (const MGDoFHandler< dim, spacedim > &mg_dof, const unsigned int steps) | |
void | set_zero_interior_boundary (const unsigned int level, VECTOR &u) const |
void | set_steps (const unsigned int steps) |
unsigned int | get_steps () const |
Private Member Functions | |
MGSmootherContinuous () | |
Private Attributes | |
unsigned int | steps |
std::vector< std::vector < unsigned int > > | interior_boundary_dofs |
Base class for multigrid smoothers. It implements some functionality for setting the values of vectors at interior boundaries (i.e. boundaries between differing levels of the triangulation) to zero, by building a list of these degrees of freedom's indices at construction time.
MGSmootherContinuous< VECTOR >::MGSmootherContinuous | ( | ) | [private] |
Default constructor. Made private to prevent it being called, which is necessary since this could circumvent the set-up of the list if interior boundary dofs.
MGSmootherContinuous< VECTOR >::MGSmootherContinuous | ( | const MGDoFHandler< 1, 1 > & | mg_dof, | |
const unsigned int | steps | |||
) |
Constructor. This one collects the indices of the degrees of freedom on the interior boundaries between the different levels, which are needed by the function set_zero_interior_boundaries
.
Since this function is implemented a bit different in 1d (there are no faces of cells, just vertices), there are actually two sets of constructors, namely this one for 1d and the following one for all other dimensions. Really amusing about this text is, that there is no 1d implementation.
MGSmootherContinuous< VECTOR >::MGSmootherContinuous | ( | const MGDoFHandler< dim, spacedim > & | mg_dof, | |
const unsigned int | steps | |||
) | [inline] |
Constructor. This one collects the indices of the degrees of freedom on the interior boundaries between the different levels, which are needed by the function set_zero_interior_boundaries
.
The parameter steps indicates the number of smoothing steps to be executed by smooth
.
void MGSmootherContinuous< VECTOR >::set_zero_interior_boundary | ( | const unsigned int | level, | |
VECTOR & | u | |||
) | const |
Reset the values of the degrees of freedom on interior boundaries between different levels to zero in the given data vector u
.
Since the coarsest level (level==0
) has no interior boundaries, this function does nothing in this case.
void MGSmootherContinuous< VECTOR >::set_steps | ( | const unsigned int | steps | ) |
Modify the number of smoothing steps.
unsigned int MGSmootherContinuous< VECTOR >::get_steps | ( | ) | const |
How many steps should be used?
unsigned int MGSmootherContinuous< VECTOR >::steps [private] |
Number of smoothing steps.
std::vector<std::vector<unsigned int> > MGSmootherContinuous< VECTOR >::interior_boundary_dofs [private] |
For each level, we store a list of degree of freedom indices which are located on interior boundaries between differing levels of the triangulation. Since the coarsest level has no interior boundary dofs, the first entry refers to the second level.
These arrays are set by the constructor. The entries for each level are sorted ascendingly.