DiffFlux1Osg< T > Class Template Reference

The flux functions for the FV-discretization (cf. GenLinVcFV.hpp ) of the diffusion equations of the 2nd order with a GENERAL (spd) diffusion tensor on the STRUCTURED GRIDS. More...

#include <DiffFlux1Osg.hpp>

Collaboration diagram for DiffFlux1Osg< T >:

Collaboration graph
[legend]
List of all members.

Public Types

enum  t_bc_type { DIRICHLET, ZERO_FLUX, TRANSMISSION }

Public Member Functions

void Init (int the_dim, double *the_cube_sizes, int the_bc_type)
 Sets the parameters of the problem.
int Dimension () const
 Returns the dimensionality of the problem.
double DomainSize (int dir) const
 Returns the size of the domain in the given direction.
double * 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.
 DiffFlux1Osg ()
 Constructor.
virtual ~DiffFlux1Osg ()
 Virtual destructor.

Protected Member Functions

virtual T * diff_tensor_row (int row, MultiIndex &I, const Array< int > &grid_lengths)=0
 Returns the pointer to the row of the diffusion tensor for a given inner FV face.
virtual T dirichlet_value (int row, MultiIndex &I, const Array< int > &grid_lengths)
 Returns the value of the Dirichlet BC for a given point on the boundary.

Detailed Description

template<typename T>
class DiffFlux1Osg< T >

The flux functions for the FV-discretization (cf. GenLinVcFV.hpp ) of the diffusion equations of the 2nd order with a GENERAL (spd) diffusion tensor on the STRUCTURED GRIDS.


Member Enumeration Documentation

template<typename T>
enum DiffFlux1Osg::t_bc_type

Enumerator:
DIRICHLET  the dirichlet bc
ZERO_FLUX  the zero-flux bc
TRANSMISSION  the transmission bc


Constructor & Destructor Documentation

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

Constructor.

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

Virtual destructor.


Member Function Documentation

template<typename T>
virtual T* DiffFlux1Osg< T >::diff_tensor_row ( int  row,
MultiIndex I,
const Array< int > &  grid_lengths 
) [protected, pure virtual]

Returns the pointer to the row of the diffusion tensor for a given inner FV face.

The row should be kept in the memory at least till the next call of this function. The index 'I' specifies the FV face in the 'row' direction, i.e. all the components of 'I' except for 'face' count the grid cells, and 'I [row]' counts the grid lines

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

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

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

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

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

Sets the parameters of the problem.

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

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

Returns the dimensionality of the problem.

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

Returns the size of the domain in the given direction.

Parameters:
[in] dir The direction

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

Returns pointer to the array with the dom. sizes.

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

Prints the parameters of the flux functions.

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

Computes the grid steps etc.

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

Assembles the flux through an inner CV face.

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

Assembles the flux through a boundary CV face.

template<typename T>
T DiffFlux1Osg< 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 DiffFlux1Osg< T >::PostProcess ( SparseMatrix< T > &  A  )  [inline]

assembles the Dirichlet BC in the matrix

template<typename T>
void DiffFlux1Osg< 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