LinCCTransfer< T > Class Template Reference

Class templates for multilinear transfer operators for cell centered grid functions. More...

#include <LinCCTransfer.hpp>

Inheritance diagram for LinCCTransfer< T >:

Inheritance graph
[legend]
Collaboration diagram for LinCCTransfer< 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)
 The prolongation.
void Restrict (MultiVector< T > &src, MultiVector< T > &dst)
 The restriction.
 LinCCTransfer (unsigned the_disp_type)
 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.
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 LinCCTransfer< T >

Class templates for multilinear transfer operators for cell centered grid functions.

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

Date:
Feb. 4, 2005 - created


Constructor & Destructor Documentation

template<typename T>
LinCCTransfer< T >::LinCCTransfer ( unsigned  the_disp_type  )  [inline]

Constructor which sets the display type.


Member Function Documentation

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

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

Implements SysTransfer< T >.

template<typename T>
bool LinCCTransfer< 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 LinCCTransfer< T >::Prolong ( MultiVector< T > &  src,
MultiVector< T > &  dst 
) [inline, virtual]

The prolongation.

The prolongation 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
[in] dst The result (the sizes must be initialized!)

Implements Transfer< T >.

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

The restriction.

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

Implements Transfer< T >.

template<typename T>
void LinCCTransfer< 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 LinCCTransfer< 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 LinCCTransfer< 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 LinCCTransfer< 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:16 2007 for SG2 by  doxygen 1.5.2