Embedding multigrid algorithms in the PZ environment

The PZ environment was modified and extended to include algorithms which will simplify the development of multigrid algorithms with the PZ environment. These changes should not affect existing software.

There is distinguishment between

 

Changes made to existing classes

Geometric Mapping classes

Computational Element Classes

Matrix classes

The MultAdd and Multiply methods of the matrix classes (TMatrix and derived) have been extended to allow multiplication with a specified stride. This extension is needed because the interpolation matrix computed by the computational grid and elements specifies the interpolation between shapefunctions. However the vectors corresponding to solutions and right hand sides of systems of differential equations group their variables. This extension will also be particularly useful for multiplying a mass matrix with a solution vector in dynamical problems.

A bug which existed in the MultAdd method of most matrix classes has been fixed.

New Classes Developed

TTransfer : A sparse block matrix class

The transfer matrix between a fine grid and a coarse grid is typically very sparse. Moreover, in high order interpolation, the sparsity of the matrix is block oriented : the equations associated with a side of an element, with the interior of the element and with the vertices of the element form tightly coupled blocks of equations.

The TTransfer class implements a yale sparse matrix type storage form of matrices. This is one of the most efficient storage patterns known to the author and still allows to implement computationally efficient matrix vector multiplications. Due to its particular storage pattern, the user must supply the elements one row at a time, but the order of the rows may be arbitrary. There are no methods to delete elements, nor to add elements in an arbitrary manner. Arbitrary elements cannot be accessed, but the matrix vector multiplication (with stride != 1) has been implemented.

The public methods of the TTransfer class are :

TTransform : a simple transformation class

The TTransform class maps a point in space to another point through a linear transformation followed by a translation. The dimension of the transformation can be one-, two- or three dimensional and needs to be specified at construction. Although the transformation class includes regular full matrix objects (type TFMatrix), it does not use dynamic memory allocation. It is therefore suited for use as local objects. Two methods are provided to modify a transformation : one in which the user specifies the transformation matrices and another where two transformations are multiplied to form the combined transformation. A method is provided to apply the transformation to a vector and put the result in a second vector. The vectors may not be the same. The public interface of the transformation class is :

TMultGenGrid : a class to generated a geometric grid with several levels

TMultGenGrid is an extension of the TGenGrid class developed by M. Santana, which allows to generate a grid with several uniform refinements in one step. Considering the TGeoGrid class holds the entire structure of the refined grid, the TMultGenGrid class still works on a single grid. The public interface of the TMultGenGrid class is :