![]() |
KASKADE 7 development version
|
#include <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. | |
| template<class StorageValue> | |
| std::unique_ptr< Dune::BlockVector< StorageValue > > | apply (int level, Dune::BlockVector< StorageValue > const &oldCoeff) const |
| Apply transfer matrix to coefficients. | |
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.
|
inline |
Definition at line 456 of file mgtools.hh.
|
inline |
Definition at line 472 of file mgtools.hh.
|
inline |
Apply transfer matrix to coefficients.
Definition at line 494 of file mgtools.hh.
|
inline |
Access transfer matrix.
Definition at line 487 of file mgtools.hh.
|
inline |
Definition at line 477 of file mgtools.hh.