Go to the documentation of this file.
21 #ifndef THUNDEREGG_GMG_VCYCLE_H
22 #define THUNDEREGG_GMG_VCYCLE_H
38 int num_pre_sweeps = 1;
39 int num_post_sweeps = 1;
40 int num_coarse_sweeps = 1;
49 for (
int i = 0; i < num_coarse_sweeps; i++) {
53 for (
int i = 0; i < num_pre_sweeps; i++) {
62 this->
visit(coarser_level, coarser_f, coarser_u);
66 for (
int i = 0; i < num_post_sweeps; i++) {
79 :
Cycle<D>(finest_level)
92 extern template class VCycle<2>;
93 extern template class VCycle<3>;
const Smoother< D > & getSmoother() const
Get smoother operator for this level.
Definition: Level.h:138
const Interpolator< D > & getInterpolator() const
Get the interpolation operator for this level.
Definition: Level.h:102
Implementation of a V-cycle.
Definition: VCycle.h:35
void visit(const Level< D > &level, const Vector< D > &f, Vector< D > &u) const override
Virtual visit function that needs to be implemented in derived classes.
Definition: VCycle.h:46
VCycle(const Level< D > &finest_level, const CycleOpts &opts)
Create new V-cycle.
Definition: VCycle.h:78
int post_sweeps
Number of sweeps on up cycle.
Definition: CycleOpts.h:42
const Level & getCoarser() const
get reference to the coarser level.
Definition: Level.h:156
Base abstract class for cycles.
Definition: Cycle.h:40
VCycle< D > * clone() const override
Get a clone of this VCycle.
Definition: VCycle.h:90
int pre_sweeps
Number of sweeps on down cycle.
Definition: CycleOpts.h:38
Represents a level in geometric multi-grid.
Definition: Level.h:38
Vector class for use in thunderegg.
Definition: Vector.h:42
Options for Cycle classes.
Definition: CycleOpts.h:33
Vector< D > getZeroClone() const
Get a vector of the same length initialized to zero.
Definition: Vector.h:601
Vector< D > restrict(const Level< D > &level, const Vector< D > &f, const Vector< D > &u) const
Prepare vectors for coarser level.
Definition: Cycle.h:57
Geometric-Multigrid classes.
Definition: Cycle.h:33
int coarse_sweeps
Number of sweeps on coarse level.
Definition: CycleOpts.h:50
bool coarsest() const
Check if this level is the coarsest level.
Definition: Level.h:174