PrimFuncMthdCC< T > Class Template Reference

Class of the Method of Primitive Functions for the integration of the cell-centered grid function that are constant on the cells. More...

#include <PrimFuncMethod.hpp>

Collaboration diagram for PrimFuncMthdCC< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void PreProcess (PrimFuncMthdKernFactor< T > **the_kernel_factors, MultiArray< T > &u)
 Prepares the method for given data (initializes the data structures and computes the cell integrals).
void AddIntegral (T factor, MultiArray< T > &u, MultiArray< T > &integral, MultiArray< T > *x_factor=NULL)
 Computes the integral for a given 'u', multiplies it by a given factor and adds to a given vector.
void PostProcess ()
 Releases the allocated memory, ...
 PrimFuncMthdCC ()
 Constructor.
 ~PrimFuncMthdCC ()
 Destructor.

Detailed Description

template<typename T>
class PrimFuncMthdCC< T >

Class of the Method of Primitive Functions for the integration of the cell-centered grid function that are constant on the cells.

Method of use:
First, the the kernel should be described using the array of the pointers to the PrimFuncMthdKernFactor<T> structures and an object of the method should be created. Then you should preprocess the method for this kernel and the grid sizes of the grid function in the integrand. After that you may compute the integral for any grid functions on this grid as many times as you need using the Compute function of the method's object. At the end you should release the allocated memory etc. using PreProcess (or destroy the object).

Note:
We declare the template of the class. This template depends on the type 'T' that should be a real-value type like 'double' or 'float'. 'T' is the type of the values of the grid function and the kernel.


Constructor & Destructor Documentation

template<typename T>
PrimFuncMthdCC< T >::PrimFuncMthdCC (  )  [inline]

Constructor.

template<typename T>
PrimFuncMthdCC< T >::~PrimFuncMthdCC (  )  [inline]

Destructor.


Member Function Documentation

template<typename T>
void PrimFuncMthdCC< T >::PreProcess ( PrimFuncMthdKernFactor< T > **  the_kernel_factors,
MultiArray< T > &  u 
) [inline]

Prepares the method for given data (initializes the data structures and computes the cell integrals).

Parameters:
[in] the_kernel_factors Data to preprocess for
[in] u The grid function in the integrand
Note:
PreProcess does not use the values of 'u' but only the sizes of the grids. Thus, the grid sizes must be initialized, but the cell values of the function can be changed after the call of PreProcess .

template<typename T>
void PrimFuncMthdCC< T >::AddIntegral ( factor,
MultiArray< T > &  u,
MultiArray< T > &  integral,
MultiArray< T > *  x_factor = NULL 
) [inline]

Computes the integral for a given 'u', multiplies it by a given factor and adds to a given vector.

If x_factor != NULL then the function multiplies the computed integral also by the given grid function * x_factor. The values of this grid function should correspond to the grid-cell centers of the grid.

Parameters:
[in] factor The factor to multiply the integral by
[in] u The grid function in the integrand
[in] integral To add the integral to
[in] x_factor The factor that depends on 'x' only

template<typename T>
void PrimFuncMthdCC< T >::PostProcess (  )  [inline]

Releases the allocated memory, ...


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