ThunderEgg  1.0.0
ThunderEgg::GMG::Cycle< D > Class Template Referenceabstract

Base abstract class for cycles. More...

#include <Cycle.h>

Inheritance diagram for ThunderEgg::GMG::Cycle< D >:
Collaboration diagram for ThunderEgg::GMG::Cycle< D >:

Public Member Functions

 Cycle (const Level< D > &finest_level)
 Create new cycle object. More...
 
void apply (const Vector< D > &f, Vector< D > &u) const
 Run one iteration of the cycle. More...
 
const Level< D > & getFinestLevel () const
 Get the finest Level. More...
 
- Public Member Functions inherited from ThunderEgg::Operator< D >
virtual ~Operator ()
 Destroy the Operator object.
 
virtual Operator< D > * clone () const =0
 Clone this operator. More...
 

Protected Member Functions

Vector< D > restrict (const Level< D > &level, const Vector< D > &f, const Vector< D > &u) const
 Prepare vectors for coarser level. More...
 
virtual void visit (const Level< D > &level, const Vector< D > &f, Vector< D > &u) const =0
 Virtual visit function that needs to be implemented in derived classes. More...
 

Detailed Description

template<int D>
class ThunderEgg::GMG::Cycle< D >

Base abstract class for cycles.

There is an abstract visit() function for base classes to implement.

Constructor & Destructor Documentation

◆ Cycle()

template<int D>
ThunderEgg::GMG::Cycle< D >::Cycle ( const Level< D > &  finest_level)
inline

Create new cycle object.

Parameters
finest_levelthe finest level object.

Member Function Documentation

◆ apply()

template<int D>
void ThunderEgg::GMG::Cycle< D >::apply ( const Vector< D > &  f,
Vector< D > &  u 
) const
inlinevirtual

Run one iteration of the cycle.

Performs one cycle on on the system Au=f where A is the operator for the finest level.

Parameters
fthe RHS vector.
uthe solution vector.

Implements ThunderEgg::Operator< D >.

◆ getFinestLevel()

template<int D>
const Level<D>& ThunderEgg::GMG::Cycle< D >::getFinestLevel ( ) const
inline

Get the finest Level.

Returns
const Level<D>& the Level

◆ restrict()

template<int D>
Vector<D> ThunderEgg::GMG::Cycle< D >::restrict ( const Level< D > &  level,
const Vector< D > &  f,
const Vector< D > &  u 
) const
inlineprotected

Prepare vectors for coarser level.

Parameters
levelthe current level
fthe rhs vector cooresponding to the level
uthe solution vector cooresponding to the level
Returns
Vector<D> the restricted residual vector

◆ visit()

template<int D>
virtual void ThunderEgg::GMG::Cycle< D >::visit ( const Level< D > &  level,
const Vector< D > &  f,
Vector< D > &  u 
) const
protectedpure virtual

Virtual visit function that needs to be implemented in derived classes.

Parameters
levelthe level currently begin visited.
fthe rhs vector cooresponding to the level
uthe solution vector cooresponding to the level

Implemented in ThunderEgg::GMG::FMGCycle< D >, ThunderEgg::GMG::WCycle< D >, and ThunderEgg::GMG::VCycle< D >.


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