ConstTransfer< T > Class Template Reference

Class templates for transfer operators based on ansatz functions that are constant on the elements over bisected grids. More...

#include <ConstTransfer.hpp>

Inheritance diagram for ConstTransfer< T >:

Inheritance graph
[legend]
Collaboration diagram for ConstTransfer< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void PrintParam ()
 Prints the name of the transfer object and (optionally) the parameters.
virtual bool ProperGrids (const Array< int > &p_domain_size, const Array< int > &p_range_size)
 Returns true if the grid sizes may correspond to the domain and the range of the prolongation (or the range and the domain of the restriction).
void Prolong (MultiVector< T > &src, MultiVector< T > &dst)
 Prolongs the coarse grid.
void Restrict (MultiVector< T > &src, MultiVector< T > &dst)
 The restriction.
 ConstTransfer (unsigned the_disp_type=SG_DISP_NO)
 Constructor which sets the display type.

Static Public Member Functions

static void copy_from_coarse_grid (int init_dim, MultiVector< T > &src, MultiIndex &src_index, MultiVector< T > &dst, MultiIndex &dst_index)
 Copies the values of the coarse grid cells to the corresponding ('lower left' in 2D) cells of the fine grid.
static void spread_subgrids (int init_dim, const Array< int > &coarse_sizes, MultiVector< T > &vec, MultiIndex &index)
 Recursively copies the values from the 'coarse grid cells' to the neighbouring cells. The 'coarse grid cells' should be initialized.
static void integr_subgrids (int init_dim, const Array< int > &coarse_sizes, MultiVector< T > &vec, MultiIndex &index)
 Computes the restriction on the subgrids.
static void copy_from_fine_grid (int init_dim, MultiVector< T > &src, MultiIndex &src_index, MultiVector< T > &dst, MultiIndex &dst_index)
 Copies the values of the 'coarse grid cells' of a fine grid to the corresponding cells of the coarse grid.

Detailed Description

template<typename T>
class ConstTransfer< T >

Class templates for transfer operators based on ansatz functions that are constant on the elements over bisected grids.

The templates depend on a type T. This type should satisfy the conditions listed in 'small_matrix.hpp' for small matrices.

Date:
Nov. 24, 2004 - created


Constructor & Destructor Documentation

template<typename T>
ConstTransfer< T >::ConstTransfer ( unsigned  the_disp_type = SG_DISP_NO  )  [inline]

Constructor which sets the display type.


Member Function Documentation

template<typename T>
void ConstTransfer< T >::PrintParam (  )  [inline, virtual]

Prints the name of the transfer object and (optionally) the parameters.

Implements SysTransfer< T >.

template<typename T>
virtual bool ConstTransfer< T >::ProperGrids ( const Array< int > &  p_domain_size,
const Array< int > &  p_range_size 
) [inline, virtual]

Returns true if the grid sizes may correspond to the domain and the range of the prolongation (or the range and the domain of the restriction).

Note:
The grid sizes corresponding to the same dimensions should be either halved or equal.
Parameters:
[in] p_domain_size For the domain of the prolongation
[in] p_range_size For the range of the prolongation

Implements Transfer< T >.

template<typename T>
void ConstTransfer< T >::Prolong ( MultiVector< T > &  src,
MultiVector< T > &  dst 
) [inline, virtual]

Prolongs the coarse grid.

It is implemented as computation of halved sums of manyfolds of the grid. We do it recursively and start with the manyfolds of the smallest dimensionality.

Parameters:
[in] src The vector to prolong
[out] dst The result (the sizes must be initialized!)

Implements Transfer< T >.

template<typename T>
void ConstTransfer< T >::Restrict ( MultiVector< T > &  src,
MultiVector< T > &  dst 
) [inline, virtual]

The restriction.

Parameters:
[in] src The vector to restrict
[out] dst The result (the sizes must be initialized!)

Implements Transfer< T >.

template<typename T>
void ConstTransfer< T >::copy_from_coarse_grid ( int  init_dim,
MultiVector< T > &  src,
MultiIndex src_index,
MultiVector< T > &  dst,
MultiIndex dst_index 
) [inline, static]

Copies the values of the coarse grid cells to the corresponding ('lower left' in 2D) cells of the fine grid.

Parameters:
[in] init_dim The dimension index to start with
[in] src The coarse grid vector
[in] src_index The initial index for the coarse grid
[in] dst The fine grid vector
[in] dst_index The initial index for the fine grid

template<typename T>
void ConstTransfer< T >::spread_subgrids ( int  init_dim,
const Array< int > &  coarse_sizes,
MultiVector< T > &  vec,
MultiIndex index 
) [inline, static]

Recursively copies the values from the 'coarse grid cells' to the neighbouring cells. The 'coarse grid cells' should be initialized.

Parameters:
[in] init_dim The dimension index to start with
[in] coarse_sizes The coarse grid sizes
[in] vec The vector to process
[in] index The initial index

template<typename T>
void ConstTransfer< T >::integr_subgrids ( int  init_dim,
const Array< int > &  coarse_sizes,
MultiVector< T > &  vec,
MultiIndex index 
) [inline, static]

Computes the restriction on the subgrids.

Parameters:
[in] init_dim The dimension index to start with
[in] coarse_sizes The coarse grid sizes
[in] vec The vector to process
[in] index The initial index

template<typename T>
void ConstTransfer< T >::copy_from_fine_grid ( int  init_dim,
MultiVector< T > &  src,
MultiIndex src_index,
MultiVector< T > &  dst,
MultiIndex dst_index 
) [inline, static]

Copies the values of the 'coarse grid cells' of a fine grid to the corresponding cells of the coarse grid.

Parameters:
[in] init_dim The dimension index to start with
[in] src The fine grid vector
[in] src_index The initial index for the fine grid
[in] dst The coarse grid vector
[in] dst_index The initial index for the coarse grid


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 12:34:08 2007 for SG2 by  doxygen 1.5.2