Computational & Technology Resources
an online resource for computational,
engineering & technology publications
Civil-Comp Proceedings
ISSN 1759-3433
CCP: 81
PROCEEDINGS OF THE TENTH INTERNATIONAL CONFERENCE ON CIVIL, STRUCTURAL AND ENVIRONMENTAL ENGINEERING COMPUTING
Edited by: B.H.V. Topping
Paper 60

An Object-Oriented Framework for Programming Iterative Solution Algorithms

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, "An Object-Oriented Framework for Programming Iterative Solution Algorithms", in B.H.V. Topping, (Editor), "Proceedings of the Tenth International Conference on Civil, Structural and Environmental Engineering Computing", Civil-Comp Press, Stirlingshire, UK, Paper 60, 2005. doi:10.4203/ccp.81.60
Keywords: domain decomposition, object-oriented programming, iterative solution methods, distributed processing.

Summary
Scientific computing is increasingly complex. This complexity is a result not just of the mathematical algorithms, but the increasingly sophisticated computing environments. Perhaps the most important current development is that of distributed computing. One of the key developments in the last few years or so is Microsoft's .NET framework.

In terms of scientific computing this opens up increased opportunity for using distributed computing to solve large-scale numerical problems. .NET and its object-oriented design promises to further enhance the growth of distributed computing. This paper will describe the development of a framework for programming the numerical aspects of iterative solution algorithms.

Very large scale problems are most commonly solved using iterative solution methods, these offering the most efficient use of computer memory and execution time. There are many types of algorithms, and often many variations for each type. Furthermore, the data can be stored in a large variety of ways, including using a single matrix and using domain decomposition format. Moreover, the data can be stored locally, or on remote computers in a distributed environment. A framework is developed that enables this complexity to be handled in an efficient manner. This paper will focus on the conjugate gradient method for symmetric problems. First of all a class, CGSolverGen is developed that implements the basic conjugate gradient algorithm. The key feature of the design is that the class uses an interface object, called ICGMatrix, to represent the matrix A. An interface defines only what an object can do, it says nothing whatsoever about the implementation. The interface ICGMatrix contains the operations for the key matrix-vector operations used in the conjugate gradient algorithm. All matrix-vector operations are implemented via this interface object. Concrete implementations are then developed for three different scenarios:

  • Simple matrices.
  • Domain-decomposition approaches.
  • Schur complement approach.
For the simple matrix implementation, the implementation of ICGMatrix uses a single matrix to contain A, albeit using a sparse storage scheme, and the various operations are implemented using this matrix.

Domain decomposition methods are widely used for distributed computing, being appropriate for this because they parcel the work up into large packages which can be carried out concurrently. The key feature is that they make use of the fact that the matrix is highly structured.

The matrix-vector operations can be carried out separately for each subdomain. These can be carried out sequentially on the same computer, or concurrently on several networked computers. An implementation of ICGMatrix is presented that works for works for both locally and remotely stored objects.

The framework is then demonstrated to work for the Schur complement approach. This approach "eliminates" the internal degrees of freedom, and then operates on a modified version of Knn. One advantage of this is that it improves the condition number, thus reducing the number of iterations required. ICGMatrix is implemented.

Although the details of the matrix-vector operations are quite different, the principle of what is being calculated is not. The object-oriented design enables advantage to be taken of this and there is no need to modify the CGSolverGen class at all. All that is needed in order to implement a different solution type is to supply CGSolverGen with the appropriate ICGMatrix object. The distributed aspects are implemented using the .NET framework and the C# language.

The paper presents a software design approach that allows flexible development of algorithms. The framework described has been implemented in a finite element program, and speed-up results are presented. The flexibility arises from the fact that the solver class contains information specific only to the algorithm. Aspects related to how the matrix is stored, and how matrix-vector operations are carried out are hidden in ICGMatrix. Widely different implementations can then be implemented in a simple manner.

References
1
R.I. Mackie, "Distributed Finite Element Analysis and the .NET Framework", in Proceedings of the Ninth International Conference on Civil and Structural Engineering Computing, B.H.V. Topping, (Editor), Civil-Comp Press, Stirling, United Kingdom, paper 136, 2003. doi:10.4203/ccp.77.136
2
R.I. Mackie, "Domain Decomposition Methods: .NET, Objects, Elements and Algorithms", in Proceedings of the Fourth International Conference on Engineering Computing Technology, B.H.V. Topping and C.A. Mota-Soares (Editors), Civil-Comp Press, Stirling, United Kingdom, paper 89, 2004. doi:10.4203/ccp.80.89

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 £135 +P&P)