InterpolationAtPoint< T > Class Template Reference

Interpolates a partial solution linearly at a given point and adds this value multiplied by a given factor to the sparse grid solution. More...

#include <SGrid.hpp>

Inheritance diagram for InterpolationAtPoint< T >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

T & Solution ()
 Returns the reference to the solution.
void Rewind ()
 Sets the values to zero.
void AddGridVec (T factor, GridVec< T > &vec)
 Adds a grid function to the current combination.
 InterpolationAtPoint (int the_size, Array< double > &the_position, Array< double > &the_shifts, int the_vec_no=0)
 InterpolationAtPoint (int the_size, Array< double > &the_position, double the_shift=0, int the_vec_no=0)
virtual ~InterpolationAtPoint ()
 Virtual destructor.

Detailed Description

template<typename T>
class InterpolationAtPoint< T >

Interpolates a partial solution linearly at a given point and adds this value 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:
  1. The point at which the value should be computed, may not lie in the shift area but only inside a grid cell or in a cell edge/side. Thus, for the shifts > 0 you may NOT specify a point on the boundary.
  2. The point where should be specified by its coordinates in the unit hypercube.


Constructor & Destructor Documentation

template<typename T>
InterpolationAtPoint< T >::InterpolationAtPoint ( int  the_size,
Array< double > &  the_position,
Array< double > &  the_shifts,
int  the_vec_no = 0 
) [inline]

template<typename T>
InterpolationAtPoint< T >::InterpolationAtPoint ( int  the_size,
Array< double > &  the_position,
double  the_shift = 0,
int  the_vec_no = 0 
) [inline]

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

Virtual destructor.


Member Function Documentation

template<typename T>
T& InterpolationAtPoint< T >::Solution (  )  [inline]

Returns the reference to the solution.

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

Sets the values to zero.

Implements GridVecInterpolation< T >.

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