Computational & Technology Resources
an online resource for computational,
engineering & technology publications
Civil-Comp Proceedings
ISSN 1759-3433
CCP: 84
PROCEEDINGS OF THE FIFTH INTERNATIONAL CONFERENCE ON ENGINEERING COMPUTATIONAL TECHNOLOGY
Edited by: B.H.V. Topping, G. Montero and R. Montenegro
Paper 111

Object-Oriented Design of Pre-conditioned Iterative Equation Solvers using .NET

R.I. Mackie

Civil Engineering, Faculty of Engineering and Physical Sciences, University of Dundee, United Kingdom

Full Bibliographic Reference for this paper
R.I. Mackie, "Object-Oriented Design of Pre-conditioned Iterative Equation Solvers using .NET", in B.H.V. Topping, G. Montero, R. Montenegro, (Editors), "Proceedings of the Fifth International Conference on Engineering Computational Technology", Civil-Comp Press, Stirlingshire, UK, Paper 111, 2006. doi:10.4203/ccp.84.111
Keywords: domain decomposition, object-oriented programming, software components, iterative solution methods, distributed processing.

Summary
This paper builds upon work described in an earlier paper that was concerned with the development of an object-based framework for iterative equation solution used in a finite element program that used distributed analysis [1]. This paper takes this work a step further. The previous work dealt solely with the conjugate gradient algorithm without pre-conditioning. In this paper pre-conditioning is added to the framework, increasing its utility. In the previous paper the use of interfaces was as a key element of the design, in this paper the use of interfaces in designing numerical software is further developed, making the framework almost entirely component based.

The framework itself is developed using .NET and is programmed in C#. The design is achieved by combining bottom-up and top-down approaches. The bottom-up part involves the basic mathematical entities such as vectors, matrices and sub-domains. The top-down part deals with the conjugate gradient and pre-conditioning aspects. Designing a framework consists of the following steps:

  1. Designing components or interfaces that represent the various entities.
  2. Designing classes that implement interfaces
  3. Designing classes that use objects representing interfaces to achieve goals, in this case solving equations.

Interfaces represent the various entities and their capabilities. The key principle that is followed in the design of interfaces is that both arguments to methods, and return types from methods and properties must be either basic types (such as int, double, bool etc) or interfaces. Adopting this principle maximises the flexibility of the interface, making it totally independent of implementation, and will be referred to as interface compliance. Objects are used to implement both individual interfaces, and to create utility classes that carry out activities such as solving equations, or to enable several components to work together. If an object is interface compliant then it will have maximum flexibility.

The low-level components define the basic operations and methods that are associated with that entity, e.g. vectors. In addition classes are developed that implement the various interfaces. The key to good design of a low-level component is to ensure that it specifies the basic operations that might be expected of it. The high-level objects were designed in a different manner, working from the top down and seeing what is required of the components.

The top-down part works down from the conjugate-gradient solver. One class, CGSolver, is developed that implements the conjugate-gradient algorithm. In order to make it independent of the data structure used to store the equations, the data used, is represented by an interface ICGMatrix. ICGmatrix represents the matrix of coefficients, the right-hand side and solution vectors.

A simple interface is designed to represent pre-conditioning. A class CGMatrixGenPC is developed that implements ICGMatrix for the simple case. Different pre-conditioning methods can be implemented by simply "plugging" them into the CGMatrixGenPC.

CGMatrixSubDomPC implements ICGMatrix for the domain-decomposition case. The important features of the design for the sub-domain implementation are:

  • CGMatrixSubDomPC carries out most of its operations asynchronously, making it suitable for distributed computing.
  • GSubDomPC is interface compliant and can be used with any objects that implement the ISubDomain and IPreConStd interfaces.
  • If a preconditioning technique can be used with a simple matrix and follows the IPreConStd interface, then it can be used for the domain decomposition case without any further programming.

It is demonstrated that the framework is very flexible, allowing both small and large scale additions without necessitating recreation of the whole framework.

It is concluded that the use of interfaces (adopting a component-oriented approach) enables much more flexible software to be developed. Chow and Heroux [2] stated, "General software for preconditioning the iterative solution of linear systems is greatly lagging behind the literature. This is partly because specific problems need specific matrix and pre-conditioner data structures". It is believed that the use of component-oriented software may help to remedy this deficiency.

References
1
R.I. Mackie, "An Object-Oriented Framework for Programming Iterative Solution Algorithms", in Proceedings of the Tenth International Conference on Civil, Structural and Environmental Engineering Computing, B.H.V. Topping, (Editor), Civil-Comp Press, Stirling, United Kingdom, paper 60, 2005. doi:10.4203/ccp.81.60
2
Chow, E., and Heroux, M.A., "An object-oriented framework for block pre-conditioning", ACM Transactions on Mathematical Software, 24, 159-183, (1998) doi:10.1145/290200.287639

purchase the full-text of this paper (price £20)

go to the previous paper
go to the next paper
return to the table of contents
return to the book description
purchase this book (price £105 +P&P)