DiffFlux2Osg< T > Class Template Reference

The flux functions for the FV-discretization (cf. GenLinVcFV.hpp ) of the scalar 3rd-order PDE on the structured grid. More...

#include <DiffFlux2Osg.hpp>

List of all members.

Public Member Functions

void Init (int the_dim, T *the_cube_sizes)
 Initializes the parameters and the data of the module.
int Dimension () const
 Returns the dimensionality of the problem.
DomainSize (int dir) const
 Returns the size of the domain in the given direction.
T * DomainSizes ()
 Returns pointer to the array with the dom. sizes.
void PrintParam ()
 Prints the parameters of the flux functions.
void PreProcess (SparseMatrix< T > &A)
 Computes the grid steps etc.
void AssembleInnerFaceFlux (T factor, int face, MultiIndex &I, SparseMatrix< T > &A)
 Assembles the flux through an inner CV face.
void AssembleBndFaceFlux (T factor, int face, MultiIndex &I, SparseMatrix< T > &A)
 Assembles the flux through a boundary CV face.
det_J (MultiIndex &I, const Array< int > &grid_sizes)
 Returns the volume of a control volume.
void PostProcess (SparseMatrix< T > &A)
 Assembles the Dirichlet BC in the matrix.
void AssembleDirichlet (MultiArray< T > &u)
 Assembles the Dirichlet BC in the vectors.
 DiffFlux2Osg ()
 Constructor.
virtual ~DiffFlux2Osg ()
 Virtual destructor.

Protected Member Functions

virtual void get_tensor (int n_dir, MultiIndex &I, const Array< int > &grid_lengths, T **t_2, T **t_3)=0
 Returns the pointers to the row of the diffusion tensor and the matrix of the 3rd-order tensor for a given inner FV face. The array 't_2' of the entries of the diffusion tensor keeps d (dimensionality) components of the row. For the 3rd-order coefficients, 't_3' points to the array of d^2 elements of the matrix. All these data should be kept in the memory at least till the next call of this function. The index 'I' specifies the FV face in the 'n_dir' direction, i.e. all the components of 'I' except for 'face' count the grid cells, and 'I [row]' counts the grid lines.
virtual T dirichlet_value (int bnd, MultiIndex &I, const Array< int > &grid_lengths)
 Returns the value $g_0$ of the Dirichlet BC for a given point on the boundary.
virtual T normal_value (int bnd, MultiIndex &I, Array< int > &grid_lengths)
 Returns the value $g_1$ at the boundary.


Detailed Description

template<typename T>
class DiffFlux2Osg< T >

The flux functions for the FV-discretization (cf. GenLinVcFV.hpp ) of the scalar 3rd-order PDE on the structured grid.

The boundary conditions:

Currently, $g_1 = 0$ (although the function for this value is present).

Date:
Apr. 18, 2006 - created


Constructor & Destructor Documentation

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

Constructor.

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

Virtual destructor.


Member Function Documentation

template<typename T>
virtual void DiffFlux2Osg< T >::get_tensor ( int  n_dir,
MultiIndex I,
const Array< int > &  grid_lengths,
T **  t_2,
T **  t_3 
) [protected, pure virtual]

Returns the pointers to the row of the diffusion tensor and the matrix of the 3rd-order tensor for a given inner FV face. The array 't_2' of the entries of the diffusion tensor keeps d (dimensionality) components of the row. For the 3rd-order coefficients, 't_3' points to the array of d^2 elements of the matrix. All these data should be kept in the memory at least till the next call of this function. The index 'I' specifies the FV face in the 'n_dir' direction, i.e. all the components of 'I' except for 'face' count the grid cells, and 'I [row]' counts the grid lines.

Parameters:
[in] n_dir The first index in the tensor
[in] I Multi-index of the face
[in] grid_lengths The grid sizes
[in] t_2 The components of the diffusion tensor
[in] t_3 The components of the 3-rd-order tensor

template<typename T>
virtual T DiffFlux2Osg< T >::dirichlet_value ( int  bnd,
MultiIndex I,
const Array< int > &  grid_lengths 
) [inline, protected, virtual]

Returns the value $g_0$ of the Dirichlet BC for a given point on the boundary.

Parameters:
[in] bnd # of the index of the boundary face
[in] I Multi-index of the face
[in] grid_lengths The grid sizes

template<typename T>
virtual T DiffFlux2Osg< T >::normal_value ( int  bnd,
MultiIndex I,
Array< int > &  grid_lengths 
) [inline, protected, virtual]

Returns the value $g_1$ at the boundary.

Parameters:
[in] bnd # of the index of the boundary face
[in] I Multi-index of the face
[in] grid_lengths The grid sizes

template<typename T>
void DiffFlux2Osg< T >::Init ( int  the_dim,
T *  the_cube_sizes 
) [inline]

Initializes the parameters and the data of the module.

Parameters:
[in] the_dim The dimensionality of the problem
[in] the_cube_sizes The sizes of the domain (an array of 'dim' elements)

template<typename T>
int DiffFlux2Osg< T >::Dimension (  )  const [inline]

Returns the dimensionality of the problem.

template<typename T>
T DiffFlux2Osg< T >::DomainSize ( int  dir  )  const [inline]

Returns the size of the domain in the given direction.

Parameters:
[in] dir The direction

template<typename T>
T* DiffFlux2Osg< T >::DomainSizes (  )  [inline]

Returns pointer to the array with the dom. sizes.

template<typename T>
void DiffFlux2Osg< T >::PrintParam (  )  [inline]

Prints the parameters of the flux functions.

template<typename T>
void DiffFlux2Osg< T >::PreProcess ( SparseMatrix< T > &  A  )  [inline]

Computes the grid steps etc.

template<typename T>
void DiffFlux2Osg< T >::AssembleInnerFaceFlux ( factor,
int  face,
MultiIndex I,
SparseMatrix< T > &  A 
) [inline]

Assembles the flux through an inner CV face.

For debugging only: ** cout << "%%%% Diff.flux for " << face << " @ " << I << ", C = (" << tensor [0] << ", " << tensor [1] << ", " << tensor [2] << ')' << endl;

template<typename T>
void DiffFlux2Osg< T >::AssembleBndFaceFlux ( factor,
int  face,
MultiIndex I,
SparseMatrix< T > &  A 
) [inline]

Assembles the flux through a boundary CV face.

template<typename T>
T DiffFlux2Osg< T >::det_J ( MultiIndex I,
const Array< int > &  grid_sizes 
) [inline]

Returns the volume of a control volume.

Parameters:
[in] I The vertex index
[in] grid_sizes The grid sizes for the index

template<typename T>
void DiffFlux2Osg< T >::PostProcess ( SparseMatrix< T > &  A  )  [inline]

Assembles the Dirichlet BC in the matrix.

template<typename T>
void DiffFlux2Osg< T >::AssembleDirichlet ( MultiArray< T > &  u  )  [inline]

Assembles the Dirichlet BC in the vectors.


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