GridInterpolation< T > Class Template Reference

Interpolates a partial solution at every point of a given grid and adds the result multiplied by a given factor to the sparse grid solution. More...

#include <SGrid.hpp>

Inheritance diagram for GridInterpolation< T >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

void Rewind ()
 Sets the values to zero.
void AddGridVec (T factor, GridVec< T > &vec)
 Adds a grid function to the current combination.
 GridInterpolation (MultiVector< T > &the_dst, Array< double > &the_dst_shifts, Array< double > &the_src_shifts, int the_vec_no=0, bool is_const_near_bnd=0)
 Specifies all the data explicitly.
 GridInterpolation (MultiVector< T > &the_dst, double the_dst_shift, Array< double > &the_src_shifts, int the_vec_no=0, bool is_const_near_bnd=0)
 Specifies equal sparse grid shifts.
 GridInterpolation (MultiVector< T > &the_dst, Array< double > &the_dst_shifts, double the_src_shift=0, int the_vec_no=0, bool is_const_near_bnd=0)
 Specifies equal partial solution's grid shifts.
 GridInterpolation (MultiVector< T > &the_dst, double the_dst_shift=0, double the_src_shift=0, int the_vec_no=0, int vec_size=1, bool is_const_near_bnd=0)
 Specifies equal shifts.
virtual ~GridInterpolation ()
 Virtual destructor.

Detailed Description

template<typename T>
class GridInterpolation< T >

Interpolates a partial solution at every point of a given grid and adds the result multiplied by a given factor to the sparse grid solution.

This accumulator works with different types of grids: those having the dofs in the nodes, containing the boundary nodes or not, and those that with the dofs in the centers of the cells or on the cell edges/sides. The type of the grid is specified by the array of the shifts of the first/last grid points from the boundary: For every dimension there is the value specifying this shift in the units of the grid step. The possible values are in particular 0 for the node-centered grids with the boundary nodes, 0.5 for the cell-centered grids, 1 for the node-centered grids without the boundary nodes.

Note:
The grid types should be specified for the grid of the partial solution and for the grid of the sparse grid solution. These types may be different.


Constructor & Destructor Documentation

template<typename T>
GridInterpolation< T >::GridInterpolation ( MultiVector< T > &  the_dst,
Array< double > &  the_dst_shifts,
Array< double > &  the_src_shifts,
int  the_vec_no = 0,
bool  is_const_near_bnd = 0 
) [inline]

Specifies all the data explicitly.

Parameters:
[in] the_dst To accumulate the sparse grid solution in
[in] the_dst_shifts The shifts of 'the_dst' grid
[in] the_src_shifts The shifts of partial solution
[in] the_vec_no The index of the grid function
[in] is_const_near_bnd s. above

template<typename T>
GridInterpolation< T >::GridInterpolation ( MultiVector< T > &  the_dst,
double  the_dst_shift,
Array< double > &  the_src_shifts,
int  the_vec_no = 0,
bool  is_const_near_bnd = 0 
) [inline]

Specifies equal sparse grid shifts.

Parameters:
[in] the_dst To accumulate the sparse grid solution in
[in] the_dst_shift The shifts of 'the_dst' grid
[in] the_src_shifts The shifts of partial solution
[in] the_vec_no The index of the grid function
[in] is_const_near_bnd s. above

template<typename T>
GridInterpolation< T >::GridInterpolation ( MultiVector< T > &  the_dst,
Array< double > &  the_dst_shifts,
double  the_src_shift = 0,
int  the_vec_no = 0,
bool  is_const_near_bnd = 0 
) [inline]

Specifies equal partial solution's grid shifts.

Parameters:
[in] the_dst To accumulate the sparse grid solution in
[in] the_dst_shifts The shifts of 'the_dst' grid
[in] the_src_shift The shifts of partial solution
[in] the_vec_no The index of the grid function
[in] is_const_near_bnd s. above

template<typename T>
GridInterpolation< T >::GridInterpolation ( MultiVector< T > &  the_dst,
double  the_dst_shift = 0,
double  the_src_shift = 0,
int  the_vec_no = 0,
int  vec_size = 1,
bool  is_const_near_bnd = 0 
) [inline]

Specifies equal shifts.

Parameters:
[in] the_dst To accumulate the sparse grid solution in
[in] the_dst_shift The shifts of 'the_dst' grid
[in] the_src_shift The shifts of partial solution
[in] the_vec_no # of the grid function in the GridVec's
[in] vec_size Number of dofs in a grid point
[in] is_const_near_bnd s. above

template<typename T>
virtual GridInterpolation< T >::~GridInterpolation (  )  [inline, virtual]

Virtual destructor.


Member Function Documentation

template<typename T>
void GridInterpolation< T >::Rewind (  )  [inline, virtual]

Sets the values to zero.

Implements GridVecInterpolation< T >.

template<typename T>
void GridInterpolation< T >::AddGridVec ( factor,
GridVec< T > &  vec 
) [inline, virtual]

Adds a grid function to the current combination.

Parameters:
[in] factor The factor to multiply the grid function by
[in] vec The grid function to add

Implements GridVecInterpolation< T >.


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