#include <DiffFlux2Osg.hpp>
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. | |
| T | 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. | |
| T | 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 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 at the boundary. | |
The boundary conditions:
(Dirichlet) on the whole boundary
where necessary.
Currently,
(although the function for this value is present).
| DiffFlux2Osg< T >::DiffFlux2Osg | ( | ) | [inline] |
Constructor.
| virtual DiffFlux2Osg< T >::~DiffFlux2Osg | ( | ) | [inline, virtual] |
Virtual destructor.
| 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.
| [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 |
| virtual T DiffFlux2Osg< T >::dirichlet_value | ( | int | bnd, | |
| MultiIndex & | I, | |||
| const Array< int > & | grid_lengths | |||
| ) | [inline, protected, virtual] |
Returns the value
of the Dirichlet BC for a given point on the boundary.
| [in] | bnd | # of the index of the boundary face |
| [in] | I | Multi-index of the face |
| [in] | grid_lengths | The grid sizes |
| virtual T DiffFlux2Osg< T >::normal_value | ( | int | bnd, | |
| MultiIndex & | I, | |||
| Array< int > & | grid_lengths | |||
| ) | [inline, protected, virtual] |
Returns the value
at the boundary.
| [in] | bnd | # of the index of the boundary face |
| [in] | I | Multi-index of the face |
| [in] | grid_lengths | The grid sizes |
| void DiffFlux2Osg< T >::Init | ( | int | the_dim, | |
| T * | the_cube_sizes | |||
| ) | [inline] |
Initializes the parameters and the data of the module.
| [in] | the_dim | The dimensionality of the problem |
| [in] | the_cube_sizes | The sizes of the domain (an array of 'dim' elements) |
| int DiffFlux2Osg< T >::Dimension | ( | ) | const [inline] |
Returns the dimensionality of the problem.
| T DiffFlux2Osg< T >::DomainSize | ( | int | dir | ) | const [inline] |
Returns the size of the domain in the given direction.
| [in] | dir | The direction |
| T* DiffFlux2Osg< T >::DomainSizes | ( | ) | [inline] |
Returns pointer to the array with the dom. sizes.
| void DiffFlux2Osg< T >::PrintParam | ( | ) | [inline] |
Prints the parameters of the flux functions.
| void DiffFlux2Osg< T >::PreProcess | ( | SparseMatrix< T > & | A | ) | [inline] |
Computes the grid steps etc.
| void DiffFlux2Osg< T >::AssembleInnerFaceFlux | ( | T | 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;
| void DiffFlux2Osg< T >::AssembleBndFaceFlux | ( | T | factor, | |
| int | face, | |||
| MultiIndex & | I, | |||
| SparseMatrix< T > & | A | |||
| ) | [inline] |
Assembles the flux through a boundary CV face.
| T DiffFlux2Osg< T >::det_J | ( | MultiIndex & | I, | |
| const Array< int > & | grid_sizes | |||
| ) | [inline] |
Returns the volume of a control volume.
| [in] | I | The vertex index |
| [in] | grid_sizes | The grid sizes for the index |
| void DiffFlux2Osg< T >::PostProcess | ( | SparseMatrix< T > & | A | ) | [inline] |
Assembles the Dirichlet BC in the matrix.
| void DiffFlux2Osg< T >::AssembleDirichlet | ( | MultiArray< T > & | u | ) | [inline] |
Assembles the Dirichlet BC in the vectors.
1.5.2