QuOc

 

Public Types | Public Member Functions | Protected Attributes

mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType > Class Template Reference

#include <smoother.h>

Inheritance diagram for mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >:
mg::Smoother< VectorType, BlockOpType > aol::Op< VectorType >

List of all members.

Public Types

typedef VectorType::DataType DataType

Public Member Functions

 BlockGaussSeidelSelectiveSmoother (const BlockOpType &Op, const int Iter=50, const DataType Relax=1.0, aol::GaussSeidelSweepingMode Gss=aol::GAUSS_SEIDEL_SYMMETRIC)
 BlockGaussSeidelSelectiveSmoother (const BlockOpType &Op, const aol::BitVector &SweepMask, const int Iter=50, const DataType Relax=1.0, aol::GaussSeidelSweepingMode Gss=aol::GAUSS_SEIDEL_SYMMETRIC)
virtual void setRelax (const DataType Relax)
virtual void apply (const VectorType &Arg, VectorType &Dest) const
 implement this in derived classes.

Protected Attributes

aol::GaussSeidelSweepingMode _gss
aol::BlockGaussSeidelSelectiveSweeper
< DataType, BlockOpType > 
_sweeper

Detailed Description

template<typename VectorType, typename BlockOpType>
class mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >

Block Gauss-Seidel smoother that only operates on subset of vector entries specified by a bitField.

Author:
Schwen

Definition at line 292 of file smoother.h.


Member Typedef Documentation

template<typename VectorType , typename BlockOpType >
typedef VectorType::DataType mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::DataType

Reimplemented from mg::Smoother< VectorType, BlockOpType >.

Definition at line 295 of file smoother.h.


Constructor & Destructor Documentation

template<typename VectorType , typename BlockOpType >
mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::BlockGaussSeidelSelectiveSmoother ( const BlockOpType &  Op,
const int  Iter = 50,
const DataType  Relax = 1.0,
aol::GaussSeidelSweepingMode  Gss = aol::GAUSS_SEIDEL_SYMMETRIC 
) [inline]

Definition at line 302 of file smoother.h.

      : Smoother<VectorType, BlockOpType> ( Op, Iter, Relax ), _gss ( Gss ), _sweeper ( Op, Relax ) {
    throw aol::Exception ( "mg::BlockGaussSeidelSelectiveSmoother: this constructor exists only for compatibility but must not be called. Please specify sweepMask! ", __FILE__, __LINE__ );
  }

template<typename VectorType , typename BlockOpType >
mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::BlockGaussSeidelSelectiveSmoother ( const BlockOpType &  Op,
const aol::BitVector SweepMask,
const int  Iter = 50,
const DataType  Relax = 1.0,
aol::GaussSeidelSweepingMode  Gss = aol::GAUSS_SEIDEL_SYMMETRIC 
) [inline]

Definition at line 311 of file smoother.h.

      : Smoother<VectorType, BlockOpType> ( Op, Iter, Relax ), _gss ( Gss ), _sweeper ( Op, Relax, SweepMask ) {}


Member Function Documentation

template<typename VectorType , typename BlockOpType >
virtual void mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::apply ( const VectorType &  Arg,
VectorType &  Dest 
) const [inline, virtual]

implement this in derived classes.

Implements mg::Smoother< VectorType, BlockOpType >.

Definition at line 326 of file smoother.h.

References mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::_gss, mg::Smoother< VectorType, BlockOpType >::_numIter, mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::_sweeper, aol::BlockGaussSeidelSweeper< RealType, BlockOpType >::apply(), aol::GAUSS_SEIDEL_BACKWARD, aol::GAUSS_SEIDEL_EVEN_ONLY, aol::GAUSS_SEIDEL_FORWARD, aol::GAUSS_SEIDEL_ODD_ONLY, aol::GAUSS_SEIDEL_RED_BLACK, aol::GAUSS_SEIDEL_SYMMETRIC, aol::GAUSS_SEIDEL_ZEBRA2, aol::GAUSS_SEIDEL_ZEBRA2_BACKWARD, aol::GAUSS_SEIDEL_ZEBRA2_FORWARD, and aol::GAUSS_SEIDEL_ZEBRA2_SYMMETRIC.

                                                                       {
    for ( int iter = 0; iter < this->_numIter; ++iter ) {
      switch ( _gss ) {
      case aol::GAUSS_SEIDEL_FORWARD:
        _sweeper.apply( Arg, Dest, aol::GAUSS_SEIDEL_FORWARD );
        break;
      case aol::GAUSS_SEIDEL_SYMMETRIC:
        _sweeper.apply( Arg, Dest, ( iter % 2 ? aol::GAUSS_SEIDEL_BACKWARD : aol::GAUSS_SEIDEL_FORWARD ) );
        break;
      case aol::GAUSS_SEIDEL_RED_BLACK: 
        _sweeper.apply( Arg, Dest, aol::GAUSS_SEIDEL_EVEN_ONLY );
        _sweeper.apply( Arg, Dest, aol::GAUSS_SEIDEL_ODD_ONLY );
        break; 
      case aol::GAUSS_SEIDEL_ZEBRA2:
        _sweeper.apply ( Arg, Dest, aol::GAUSS_SEIDEL_ZEBRA2_FORWARD ); 
        break;
      case aol::GAUSS_SEIDEL_ZEBRA2_SYMMETRIC:
        _sweeper.apply( Arg, Dest, ( iter % 2 == 1 ? aol::GAUSS_SEIDEL_ZEBRA2_BACKWARD : aol::GAUSS_SEIDEL_ZEBRA2_FORWARD ) );
        break;
      default:
        throw aol::Exception("mg::GaussSeidelSmoother::apply: No Gauss-Seidel sweeping mode selected", __FILE__, __LINE__ );
        break;
      }
    }
  }

template<typename VectorType , typename BlockOpType >
virtual void mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::setRelax ( const DataType  Relax  )  [inline, virtual]

Member Data Documentation

template<typename VectorType , typename BlockOpType >
aol::GaussSeidelSweepingMode mg::BlockGaussSeidelSelectiveSmoother< VectorType, BlockOpType >::_gss [protected]

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

Generated on Fri Sep 9 2011 21:09:22 for QuocMesh by doxygen 1.7.1