KASKADE 7 development version
Public Member Functions | List of all members
MultilevelTransfer< Space, Grid > Class Template Reference

#include <mgtools.hh>

Detailed Description

template<class Space, class Grid>
class MultilevelTransfer< Space, Grid >
Class that computes and stores prolongation matrices between grid levels.

Template parameter "Space" has to be a function space over a LevelGridView, e.g. 
typedef FEFunctionSpace<ContinuousLagrangeMapper<double,Grid::LevelGridView> > H1LevelSpace ;

Example usage (see io/lossystorage.hh):
      LevelGridView gv = gridManager.grid().levelView( coarseLevel ) ;
      Space space( gridManager, gv, order ) ;
      Spaces spaces( &space ) ;
      VariableSet varSet( spaces, "y" ) ;
      typename VariableSet::VariableSet x( varSet ) ;

      // [e.g. set values for x on the coarse level]

      MultilevelTransfer<H1LevelSpace,Grid>  mlTransfer( gridManager, order, coarseLevel ) ;

      // prolongation from coarse grid to levels 1, ..., maxLevel :

      for( int l = coarseLevel ; l < maxLevel ; l++ )  {
        gv = gridManager.grid().levelView(l+1) ;
        space.setGridView(gv) ;
        std::unique_ptr<Dune::BlockVector<StorageValueType> > newCoeff=mlTransfer.apply(l, *boost::fusion::at_c<0>(x.data)) ;
 *boost::fusion::at_c<0>(x.data) = *newCoeff ;
      }

TODO: connect to refinement signal for automatic re-calculation in case of grid changes

Definition at line 450 of file mgtools.hh.

Public Member Functions

 MultilevelTransfer (GridManager< Grid > &gridMan_, int order_=1, int startlevel_=0)
 
 ~MultilevelTransfer ()
 
void out (std::ostream &o) const
 
TransferData< Space, MultilevelCoarseningPolicy >::TransferMatrix * operator[] (int level) const
 Access transfer matrix. More...
 
template<class StorageValue >
std::unique_ptr< Dune::BlockVector< StorageValue > > apply (int level, Dune::BlockVector< StorageValue > const &oldCoeff) const
 Apply transfer matrix to coefficients. More...
 

Constructor & Destructor Documentation

◆ MultilevelTransfer()

template<class Space , class Grid >
MultilevelTransfer< Space, Grid >::MultilevelTransfer ( GridManager< Grid > &  gridMan_,
int  order_ = 1,
int  startlevel_ = 0 
)
inline

Definition at line 456 of file mgtools.hh.

◆ ~MultilevelTransfer()

template<class Space , class Grid >
MultilevelTransfer< Space, Grid >::~MultilevelTransfer ( )
inline

Definition at line 472 of file mgtools.hh.

Member Function Documentation

◆ apply()

template<class Space , class Grid >
template<class StorageValue >
std::unique_ptr< Dune::BlockVector< StorageValue > > MultilevelTransfer< Space, Grid >::apply ( int  level,
Dune::BlockVector< StorageValue > const &  oldCoeff 
) const
inline

Apply transfer matrix to coefficients.

Definition at line 494 of file mgtools.hh.

◆ operator[]()

template<class Space , class Grid >
TransferData< Space, MultilevelCoarseningPolicy >::TransferMatrix * MultilevelTransfer< Space, Grid >::operator[] ( int  level) const
inline

Access transfer matrix.

Definition at line 487 of file mgtools.hh.

◆ out()

template<class Space , class Grid >
void MultilevelTransfer< Space, Grid >::out ( std::ostream &  o) const
inline

Definition at line 477 of file mgtools.hh.


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